/* ================================================
   LOCATIONS PAGE — locations.css
   Page-specific styles for /locations/index.html
   Layered on top of global styles.css
   ================================================ */

/* ------------------------------------------------
   DESIGN TOKENS (page-local overrides / extras)
   ------------------------------------------------ */
:root {
    --teal-pale-loc: rgba(49, 184, 152, 0.10);
    --teal-mist-loc: rgba(49, 184, 152, 0.05);
    --forest-light: #2A5048;
    --text-muted: #7A9090;
}

/* ------------------------------------------------
   REVEAL ANIMATION
   ------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------------
   SECTION HEADER PATTERN
   ------------------------------------------------ */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: var(--type-caption);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 16px;
}

.section-tag-line {
    width: 26px;
    height: 1.5px;
    background: var(--teal);
    opacity: 0.6;
    display: block;
}

.section-h2 {
    font-family: var(--font-serif);
    font-size: var(--type-h1);
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 14px;
}

.section-h2 em {
    font-style: italic;
    color: var(--teal);
}

.section-p {
    font-size: var(--type-body);
    font-weight: 400;
    line-height: var(--lh-body);
    color: var(--text-medium);
    max-width: 480px;
    margin-bottom: 48px;
}

/* ------------------------------------------------
   HERO — .locations-hero (overrides global)
   ------------------------------------------------ */
.locations-hero {
    background: linear-gradient(160deg, var(--forest) 0%, var(--forest-mid) 100%);
    padding: 200px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Teal radial glow accent */
.locations-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(49, 184, 152, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.locations-hero .container {
    position: relative;
    z-index: 1;
}

/* Hero section-tag on dark bg */
.locations-hero .section-tag {
    color: var(--teal-light);
    justify-content: center;
}

.locations-hero .section-tag-line {
    background: var(--teal-light);
}

.locations-hero h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: var(--type-display);
    color: white;
    line-height: 1.1;
    margin-bottom: 20px;
}

.locations-hero h1 em {
    font-style: italic;
    color: var(--teal-light);
}

.locations-hero p {
    font-size: var(--type-body-lg);
    font-weight: 400;
    color: white;
    max-width: 540px;
    margin: 0 auto 40px;
    line-height: 1.75;
}

/* Hero stat pills row */
.hero-stat-pills {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border: 1px solid rgba(49, 184, 152, 0.45);
    border-radius: var(--radius-btn);
    background: rgba(49, 184, 152, 0.08);
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.03em;
    backdrop-filter: blur(4px);
}

.hero-stat-pill svg {
    flex-shrink: 0;
    color: var(--teal-light);
}

/* ------------------------------------------------
   LOCATIONS SECTION WRAPPER
   ------------------------------------------------ */
.locations-section {
    padding: 96px 0;
    background: var(--off-white);
}

.locations-section-header {
    margin-bottom: 48px;
}

/* ------------------------------------------------
   FILTER TABS
   ------------------------------------------------ */
.loc-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.loc-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius-btn);
    border: 1.5px solid transparent;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    background: var(--sand-mid);
    color: var(--text-dark);
    outline: none;
}

.loc-filter-btn:hover {
    background: var(--sand-deep);
    border-color: rgba(49, 184, 152, 0.3);
}

.loc-filter-btn.active {
    background: var(--teal);
    color: rgba(255, 255, 255, 0.9);
    border-color: var(--teal);
    box-shadow: 0 4px 16px rgba(49, 184, 152, 0.28);
}

.loc-filter-btn svg {
    flex-shrink: 0;
}

/* ------------------------------------------------
   LOCATIONS GRID (static cards container)
   ------------------------------------------------ */
.loc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

/* ------------------------------------------------
   LOCATION CARD — .loc-card
   ------------------------------------------------ */
.loc-card {
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid rgba(26, 36, 32, 0.06);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(28, 56, 50, 0.04);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.4s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.loc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(28, 56, 50, 0.10);
    border-color: rgba(49, 184, 152, 0.18);
}

/* Card image area */
.loc-card-img {
    height: 240px;
    background: linear-gradient(145deg, #F5F2EE 0%, #EBE6DF 100%);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.loc-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.loc-card:hover .loc-card-img img {
    transform: scale(1.06);
}

.loc-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(28,56,50,0.04) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}
.loc-card:hover .loc-card-img::after {
    opacity: 1;
}

/* Image placeholder when no image */
.loc-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sand-mid) 0%, var(--sand-deep) 100%);
}

.loc-card-img-placeholder svg {
    color: var(--teal);
    opacity: 0.3;
}

/* Card body */
.loc-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* City + state row */
.loc-card-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.loc-card-city {
    font-family: var(--font-serif);
    font-size: var(--type-h3);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.2;
}

.loc-card-state {
    font-size: var(--type-caption);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal);
    background: var(--teal-pale-loc);
    padding: 2px 10px;
    border-radius: 50px;
    flex-shrink: 0;
}

/* Address */
.loc-card-address {
    font-size: var(--type-small);
    font-weight: 400;
    color: var(--text-medium);
    margin: 12px 0 8px;
    line-height: 1.5;
}

/* Hours row */
.loc-card-hours {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: var(--type-small);
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.loc-card-hours svg {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--teal);
    opacity: 0.7;
}

/* CTA row */
.loc-card-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.loc-card-cta .btn-loc-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--teal);
    color: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: var(--radius-btn);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    white-space: nowrap;
}

.loc-card-cta .btn-loc-primary:hover {
    background: var(--teal-dim);
    box-shadow: 0 4px 16px rgba(49, 184, 152, 0.28);
    transform: translateY(-1px);
}

.loc-card-cta .loc-phone-link {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-medium);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    white-space: nowrap;
}

.loc-card-cta .loc-phone-link:hover {
    color: var(--teal);
}

.loc-card-cta .loc-phone-link svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

/* ------------------------------------------------
   TELEHEALTH CALLOUT CARD
   ------------------------------------------------ */
.telehealth-callout {
    grid-column: 1 / -1;
    margin-top: 48px;
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 60%, var(--forest-light) 100%);
    border-radius: 14px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 340px;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(28, 56, 50, 0.12);
}
.telehealth-callout-left {
    padding: 48px 56px;
    display: flex;
    align-items: center;
}
.telehealth-callout-img {
    position: relative;
    overflow: hidden;
}
.telehealth-callout-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Decorative glow */
.telehealth-callout::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(49, 184, 152, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

.telehealth-callout-content {
    position: relative;
    z-index: 1;
    max-width: 580px;
}

.telehealth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--type-caption);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal-light);
    margin-bottom: 16px;
}

.telehealth-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal-light);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.telehealth-callout h3 {
    font-family: var(--font-serif);
    font-size: clamp(26px, 2.5vw, 36px);
    font-weight: 400;
    color: white;
    line-height: 1.2;
    margin-bottom: 12px;
}

.telehealth-callout h3 em {
    font-style: italic;
    color: var(--teal-light);
}

.telehealth-callout p {
    font-size: var(--type-body);
    font-weight: 400;
    color: white;
    line-height: var(--lh-body);
    max-width: 460px;
}

.telehealth-callout-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.btn-telehealth {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--teal);
    color: rgba(255, 255, 255, 0.9);
    padding: 14px 28px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn-telehealth:hover {
    background: var(--teal-dim);
    box-shadow: 0 6px 24px rgba(49, 184, 152, 0.38);
    transform: translateY(-2px);
}

.telehealth-states-note {
    font-size: var(--type-caption);
    color: rgba(255, 255, 255, 0.70);
    text-align: right;
    letter-spacing: 0.03em;
}

/* ------------------------------------------------
   DYNAMIC CARDS (main.js renders .location-card)
   Override/supplement the global styles
   ------------------------------------------------ */
#locations-grid {
    display: none; /* Hidden — static cards are the primary display */
}

/* ------------------------------------------------
   CTA SECTION — overrides / additions
   ------------------------------------------------ */
.cta-section .section-tag {
    color: rgba(94, 201, 174, 0.9);
    justify-content: center;
}

.cta-section .section-tag-line {
    background: rgba(94, 201, 174, 0.7);
}

.cta-section .section-h2 {
    color: white;
    text-align: center;
}

.cta-section .section-h2 em {
    color: var(--teal-light);
}

.cta-section .section-p {
    color: white;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Forest-teal CTA button styling */
.btn-cta-forest {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--forest);
    padding: 15px 30px;
    border-radius: var(--radius-btn);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta-forest:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(26, 36, 32, 0.18);
}

.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    padding: 15px 30px;
    border-radius: var(--radius-btn);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-cta-outline:hover {
    border-color: rgba(255, 255, 255, 0.7);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

/* ------------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 1024px) {
    .telehealth-callout {
        grid-template-columns: 1fr;
    }

    .telehealth-callout-left {
        padding: 40px 36px;
    }

    .telehealth-callout-img {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .locations-hero {
        padding: 160px 0 60px;
    }

    .hero-stat-pills {
        gap: 8px;
    }

    .hero-stat-pill {
        font-size: 12px;
        padding: 8px 16px;
    }

    .loc-cards-grid {
        grid-template-columns: 1fr;
    }

    .loc-filter-bar {
        gap: 6px;
    }

    .loc-filter-btn {
        font-size: 12px;
        padding: 8px 16px;
    }

    .telehealth-callout-left {
        padding: 32px 24px;
    }

    .telehealth-callout-img {
        height: 200px;
    }

    .locations-section {
        padding: 64px 0;
    }

    .section-p {
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .loc-card-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .loc-card-cta .btn-loc-primary {
        width: 100%;
        justify-content: center;
    }
}
