:root {
    /* Brand Colors */
    --pgs-blue: #5988DA;
    /* PGS Blue */
    --pgs-orange: #FF8400;
    /* PGS Orange */
    --pgs-light-blue: #97CBEA;
    /* secondary */
    --pgs-steel-blue: #73A8E4;
    /* secondary */
    --pgs-yellow-orange: #F2C21A;
    /* secondary */
    --pgs-light-gray: #D3D3D3;
    /* secondary */

    /* Neutral + text */
    --color-bg: #f5f7fb;
    --color-bg-alt: #ffffff;
    --color-text: #1f2933;
    --color-muted: #6b7280;
    --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.12);
    --radius-lg: 18px;
    --radius-md: 12px;
    --max-width: 1120px;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;

    /* Component spacing */
    --card-padding: 1rem;
    --pill-padding-y: 0.4rem;
    --pill-padding-x: 0.7rem;

    /* Font sizes */
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.25rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Gotham Book", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--color-text);
    background: radial-gradient(circle at top left, #ffffff 0, #f3f4f6 40%, #e5e7eb 100%);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo-image {
    height: 56px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, var(--pgs-orange), var(--pgs-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.logo-text-top {
    font-family: "Gotham Bold", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--pgs-blue);
    max-width: 120px;
}

.logo-text-bottom {
    font-family: "Gotham Book", system-ui, sans-serif;
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    max-width: 120px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a {
    position: relative;
    color: var(--color-muted);
    display: inline-block;
    white-space: nowrap;
    /* keep each label on a single line */
}

.nav-links a:hover {
    color: var(--pgs-blue);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.25rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--pgs-blue), var(--pgs-orange));
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:focus-visible {
    outline: 2px solid var(--pgs-blue);
    outline-offset: 0.2rem;
    border-radius: 0.2rem;
}

/* NAV: small-screen spacing & select sizing tweaks */
@media (max-width: 900px) {
    .nav-links {
        gap: 0.75rem;
    }

    .nav-links a {
        font-size: 0.875rem;
    }
}

@media (max-width: 420px) {
    .nav-links a {
        font-size: 0.88rem;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pgs-blue), var(--pgs-steel-blue));
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(89, 136, 218, 0.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(89, 136, 218, 0.55);
}

.btn-outline {
    background: #ffffff;
    color: var(--pgs-blue);
    border: 1px solid var(--pgs-blue);
}

.btn-outline:hover {
    background: var(--pgs-blue);
    color: #ffffff;
}

/* Language toggle visibility */
/* Note: Visibility is controlled by main.js using the 'hidden' attribute.
   The [hidden] selector provides browser-native support, which takes
   precedence over display rules when properly implemented. */
[hidden] {
    display: none !important;
}

/* Language toggle UI */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: #eef2ff;
    font-size: 0.75rem;
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-muted);
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lang-btn-active {
    background: var(--pgs-blue);
    color: #ffffff;
}

/* Mobile nav */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Fix navbar button to prevent size change between languages */
.nav-actions .btn-primary {
    width: 160px;
    font-size: 0.9rem;
}

/* Mobile menu button - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #5988DA; /* Add visible border */
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
    order: -1; /* Ensure it appears first in flex layout */
    align-items: center;
    justify-content: center;
    min-width: 44px; /* Touch target size */
    min-height: 44px;
    border-radius: 8px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: #5988DA; /* PGS Blue */
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-link:hover {
    color: #5988DA; /* PGS Blue */
}

@media (max-width: 900px) {
    .nav-links {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Hide Request Appointment button on mobile */
    .nav-actions .btn-primary {
        display: none !important;
    }
}

/* HERO */

/* ==========================================
   OLD HERO STYLES - COMMENTED OUT
   These used ::before pseudo-element with background image overlay
   Replaced by newer card-based layout below
   ========================================== */

/*
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg,
            rgba(15, 23, 42, 0.75) 0%,
            rgba(15, 23, 42, 0.82) 50%,
            rgba(15, 23, 42, 0.88) 100%),
        url("assets/brownsville-hero.webp");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    transform: scale(1.03);
}

@supports not (background-image: url("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=")) {
    .hero::before {
        background-image:
            linear-gradient(180deg,
                rgba(15, 23, 42, 0.75) 0%,
                rgba(15, 23, 42, 0.82) 50%,
                rgba(15, 23, 42, 0.88) 100%),
            url("assets/brownsville-hero.jpg");
    }
}

.hero-subtitle,
.hero-subtitle-es,
.hero-contact-line {
    color: #e5e7eb;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0 1.5rem;
    }

    .hero::before {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.90) 50%, rgba(15, 23, 42, 0.94) 100%), url("assets/brownsville-hero.webp");
        background-position: center bottom;
        background-size: cover;
        transform: scale(1);
    }

    .hero-title,
    .hero-kicker,
    .hero-subtitle,
    .hero-contact-line {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    }
}

.hero-title {
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-title span {
    color: var(--pgs-light-blue);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.hero-badge {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(226, 232, 240, 0.7);
    color: #e5e7eb;
}

.hero-kicker {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--pgs-light-blue);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.75rem;
}

.hero-contact-line {
    font-size: 0.95rem;
    color: #e5e7eb;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-contact-line strong {
    color: var(--pgs-light-blue);
    font-weight: 700;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
*/

/* ==========================================
   ACTIVE HERO STYLES - Card-Based Layout
   ========================================== */

.hero-kicker {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--pgs-light-blue);
    margin-bottom: 0.75rem;
}

.hero-title {
    font-family: "Gotham Bold", system-ui, sans-serif;
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.hero-title span {
    color: var(--pgs-blue);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.hero-subtitle-es {
    font-size: 0.95rem;
    color: var(--pgs-steel-blue);
    font-style: italic;
    margin-bottom: 1.3rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

/* Ensure consistent button layout regardless of text length */
.hero-actions .btn-primary {
    min-width: 180px;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        gap: 0.6rem;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-actions .btn-primary {
        min-width: unset;
    }
}

.hero-contact-line {
    font-size: 0.95rem;
    color: var(--color-muted);
}

.hero-contact-line strong {
    color: var(--pgs-blue);
    font-weight: 700;
}

.hero-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

.hero-badge {
    font-size: 0.78rem;
    background: #ffffff;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--color-muted);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--pgs-orange);
}

.stat-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.stat-pill {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.hero {
    position: relative;
    padding: 3.5rem 0 3rem;
    color: #0f172a;
    overflow: hidden;
}

/* Background image behind hero content */
.hero-background {
    position: absolute;
    inset: 0;
    background: url("assets/brownsville-hero.jpg") center center / cover no-repeat;
    z-index: 0;
}

/* Slight dark overlay for readability, but lighter than before */
.hero-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(15, 23, 42, 0.50),
            rgba(15, 23, 42, 0.12));
}

/* Layout: flexible instead of a rigid 2-column grid */
.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: stretch;
}

/* Main hero content card */
.hero-main-panel {
    flex: 1 1 380px;
    max-width: 640px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 22px;
    padding: 1.75rem 1.6rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

/* Right-hand card for additional content */
.hero-card {
    flex: 0 1 320px;
    align-self: flex-end;
    background: radial-gradient(circle at top, var(--pgs-light-blue), var(--pgs-blue));
    border-radius: 24px;
    padding: 1.6rem 1.4rem;
    color: #ffffff;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

/* Calmer “meta” line instead of bright pills */
.hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.hero-meta-item {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        gap: 1.75rem;
    }

    .hero-main-panel {
        padding: 1.5rem 1.25rem;
    }

    .hero-card {
        align-self: stretch;
    }
}


/* Make text readable on white background */
.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #374151;
    /* dark gray for contrast */
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.hero-card::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    right: -40px;
    top: -50px;
}

.hero-card-heading {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.hero-card-pill {
    font-family: "Jakobs Handwriting 2", "Pacifico", cursive;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.hero-card-list {
    list-style: none;
    font-size: 0.9rem;
}

.hero-card-list li {
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hero-card-list span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--pgs-yellow-orange);
    flex-shrink: 0;
}

.hero-hospital-tag {
    margin-top: 1rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* SECTIONS GENERIC */
.section {
    padding: 2.5rem 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

/* Clickable section header with overlay anchor */
.section-header-clickable {
    position: relative;
    cursor: pointer;
}

.section-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.section-header-overlay:focus {
    outline: 2px solid var(--pgs-blue);
    outline-offset: 2px;
    border-radius: var(--radius-md);
}

/* Ensure section header content renders above overlay */
.section-header-clickable > *:not(.section-header-overlay) {
    position: relative;
    z-index: 1;
}

.section-kicker {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--pgs-steel-blue);
    font-weight: 600;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 600;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--color-muted);
}

/* ===== GRID CARDS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    grid-auto-rows: 1fr;
    max-width: 100%;
}

.grid > * {
    max-width: 400px;
    justify-self: start;
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .grid > * {
        max-width: 100%;
    }
}

.card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: var(--card-padding);
    box-shadow: 0 10px 22px rgba(148, 163, 184, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(148, 163, 184, 0.5);
}

.card:has(.card-overlay) {
    cursor: pointer;
}

.card:has(.card-overlay)::before {
    content: '→';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--pgs-blue);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.card:has(.card-overlay):hover::before,
.card:has(.card-overlay):focus-within::before {
    opacity: 0.35;
    transform: translateX(0);
}

.card:has(.card-overlay):hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(148, 163, 184, 0.6);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-lg);
    z-index: 1;
}

.card-overlay:focus {
    outline: 2px solid var(--pgs-blue);
    outline-offset: 2px;
}

:root {
    --pgs-steel-blue: #73A8E4;
}

/* icon container */
.card-icon {
    width: 28px;
    height: 28px;
    color: var(--pgs-steel-blue);
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* place icon + titles nicely */
.card-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* optional: keep pill aligned with the right side */
.card-header-right {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.card-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-avatar {
    width: 64px;
    height: 64px;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.28);
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Base icon behavior */
.card-icon svg {
    transition:
        transform 220ms ease,
        stroke 220ms ease,
        filter 220ms ease;
    transform-origin: center;
}

/* Card hover trigger */
.card:hover .card-icon svg {
    transform: translateY(-2px) scale(1.08);
    filter: drop-shadow(0 2px 4px rgba(115, 168, 228, 0.35));
}

/* Optional: slightly stronger color on hover */
.card:hover .card-icon {
    color: #5f97dc;
    /* slightly darker Steel Blue */
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.card-pill {
    font-size: 0.72rem;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background: rgba(89, 136, 218, 0.12);
    color: var(--pgs-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.card-body {
    font-size: var(--fs-sm);
    color: var(--color-muted);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Re-enable pointer events for interactive elements inside card content */
.card-body a,
.card-body button {
    pointer-events: auto;
}

.card-meta {
    font-size: 0.82rem;
    color: var(--pgs-steel-blue);
    margin-bottom: var(--space-xs);
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Make bullet lists inside cards stay neatly inside the box */
.card ul {
    margin: 0.25rem 0 0;
    /* remove big default margin */
    padding-left: 1.1rem;
    /* gentle indent for bullets */
}

.card li {
    margin-bottom: 0.25rem;
    /* small vertical spacing */
}

/* Safety: prevent long words from breaking out of the card */
.card {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.breadcrumbs {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--color-muted);
}

.breadcrumbs a {
    color: var(--pgs-blue);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.link {
    color: var(--pgs-blue);
    font-weight: 500;
    position: relative;
}

.link::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    bottom: -8px;
    left: -8px;
    z-index: 0;
}

.link:hover {
    text-decoration: underline;
}

/* CONTACT / LOCATIONS */
.locations {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: flex-start;
}

.location-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
}

.location-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1rem 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(148, 163, 184, 0.25);
}

.location-name {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.location-address {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
}

.location-note {
    font-size: 0.85rem;
    color: var(--pgs-steel-blue);
}

.contact-panel {
    background: linear-gradient(135deg, var(--pgs-blue), var(--pgs-light-blue));
    border-radius: 22px;
    padding: 1.2rem 1.2rem;
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.contact-panel-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.contact-panel-line {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    margin-top: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* FOOTER */
/* CONTACT FORM */
.contact-form {
    margin-top: 1.2rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
}

.contact-form-title {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.contact-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.6rem;
}

.contact-form-row label {
    font-size: 0.85rem;
    opacity: 0.95;
}

.contact-form-row input,
.contact-form-row textarea {
    border-radius: 10px;
    border: none;
    padding: 0.4rem 0.55rem;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.contact-form-row input::placeholder,
.contact-form-row textarea::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

.contact-form-row input:focus,
.contact-form-row textarea:focus {
    background: rgba(255, 255, 255, 0.25);
}

.contact-form-button {
    margin-top: 0.3rem;
    font-size: 0.88rem;
}

.contact-form-note {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.4rem 0 1.6rem;
    background: #ffffff;
    margin-top: 2rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--color-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Footer branding with logo */
.footer-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-copyright {
    line-height: 1.4;
}

.footer-logo {
    height: 30px;
    width: auto;
    opacity: 0.85;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-separator {
    color: var(--color-muted);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero {
        padding-top: 2.7rem;
    }

    .locations {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Additional phone-focused tweaks (improve spacing & touch targets) */
@media (max-width: 600px) {

    /* Slightly tighter navbar padding and smaller gaps to fit narrow screens */
    .navbar-inner {
        padding: 0.6rem 0.9rem;
    }

    .nav-actions {
        gap: 0.5rem;
        align-items: center;
    }

    /* Language toggle: larger tap targets and balanced spacing */
    .lang-toggle {
        padding: 0.2rem;
        gap: 0.2rem;
        border-radius: 12px;
    }

    .lang-btn {
        padding: 0.36rem 0.6rem;
        font-size: 0.85rem;
        min-width: 40px;
        line-height: 1;
    }

    /* Ensure primary CTA in the navbar wraps nicely */
    .nav-actions>a.btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.9rem;
    }

    /* Hide Request Appointment button on mobile - hamburger menu replaces it */
    .nav-actions .btn-primary {
        display: none !important;
    }
    
    /* Ensure hamburger menu is visible */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Hide desktop nav links */
    .nav-links {
        display: none !important;
    }

    /* Contact panel: make full-width, reduce padding and improve form spacing */
    .contact-panel {
        padding: 1rem;
        border-radius: 14px;
    }

    .contact-panel-line {
        font-size: 0.95rem;
    }

    .contact-email {
        width: 100%;
        justify-content: flex-start;
        padding: 0.5rem 0.6rem;
        font-size: 0.95rem;
    }

    /* Make inputs and the submit button full width and stack vertically */
    .contact-form-row input,
    .contact-form-row textarea {
        width: 100%;
        padding: 0.5rem 0.6rem;
    }

    .contact-form-button {
        display: block;
        width: 100%;
        padding: 0.6rem 0.75rem;
        margin-top: 0.5rem;
        box-sizing: border-box;
    }

    .contact-form-note {
        font-size: 0.85rem;
    }

    /* Slightly reduce hero vertical spacing on phones */
    .hero {
        padding: 2.2rem 0 1.4rem;
    }

    /* Footer stack on small screens */
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .footer-links {
        gap: 0.5rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
    }
}

/* Extra small screens - improve container padding and spacing */
@media (max-width: 375px) {
    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 0.75rem;
    }

    .hero-main-panel {
        padding: 1.25rem 1rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
}

/* ============================================
   SCROLL ANIMATIONS (Standardized Site-wide)
   ============================================
   
   Animation Specification:
   - Duration: 0.5s (standardized from 0.45s)
   - Easing: ease-out (smoother deceleration)
   - Translate: 20px upward (standardized from 16px)
   - Opacity: 0 → 1 (fade in)
   
   Trigger: 15% of element visible (set in main.js)
   
   DO NOT modify these values without updating
   all instances site-wide for consistency.
   ============================================ */

/* Fail-safe: elements are visible by default */
.animate-on-scroll {
    opacity: 1;
    transform: none;
}

/* Only hide + animate when JS is confirmed running */
.js .animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.js .animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Very small phones: optimize card header for narrow widths */
@media (max-width: 480px) {
    .card-header {
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .card-header-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .card-avatar {
        width: 56px;
        height: 56px;
        aspect-ratio: 1 / 1;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-pill {
        font-size: 0.65rem;
        padding: 0.08rem 0.5rem;
    }
}

/* Ultra-small phones (< 400px): enhanced card header alignment */
@media (max-width: 400px) {
    .card-header {
        gap: 0.3rem;
        flex-wrap: wrap;
    }

    .card-header-main {
        flex: 1 1 auto;
        min-width: 0;
        gap: 0.15rem;
    }

    .card-avatar {
        width: 50px;
        height: 50px;
        aspect-ratio: 1 / 1;
    }

    .card-title {
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .card-pill {
        font-size: 0.62rem;
        padding: 0.06rem 0.45rem;
    }
}

/* Ensure stat pills don't clip on very narrow screens */
@media (max-width: 420px) {
    .stat-bar {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .stat-pill {
        padding: 0.5rem 0.6rem;
    }

    .stat-label {
        font-size: 0.66rem;
    }

    .card-avatar {
        width: 56px;
        height: 56px;
    }

    .stat-value {
        font-size: 0.9rem;
    }
}

/* CONTACT / LOCATIONS (duplicate .link rules removed) */
\n
/* All duplicate contact/location/form rules removed - already defined at lines 655-780 */
\n\n

/* Footer branding with logo */
.footer-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    height: 30px;
    width: auto;
    opacity: 0.85;
}

.footer-logo:hover {
    opacity: 1;
}

/* Force stat cards to be square, readable, and not clipped */
.hero .stat-bar .stat-pill {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px !important;
    /* override any earlier pill radius */
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.hero .stat-bar .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #374151;
    /* dark gray */
}

.hero .stat-bar .stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    /* main text color */
}

/* ===== SPACING & TYPOGRAPHY NORMALIZATION ===== */
/* Spacing variables now defined in :root at top of file */

/* Ensure flexible children can shrink without overflowing */
.card-header,
.card-header-main,
.card-title,
.card-subtitle,
.stat-pill,
.stat-label,
.stat-value {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Card title/subtitle spacing consistency */
.card-title {
    margin: 0 0 var(--space-sm) 0;
    line-height: 1.2;
}

.card-subtitle {
    margin: 0;
    color: var(--color-muted);
}

/* Surgeon social media row - sits within card footer */
.surgeon-social {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    font-size: var(--fs-sm);
    color: var(--color-muted);
}

.surgeon-social-links {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.surgeon-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: #ffffff;
    color: var(--pgs-blue);
    text-decoration: none;
    transition: all 0.15s ease;
}

.surgeon-social-links a i {
    font-size: 14px;
}

.surgeon-social-links a:hover {
    background: var(--pgs-blue);
    color: #ffffff;
    border-color: var(--pgs-blue);
    transform: translateY(-1px);
}

/* Stat bar grid: responsive columns with sensible min width */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-md);
    align-items: center;
}

/* Stat pill normalization */
.stat-pill {
    min-width: 0;
    box-sizing: border-box;
}

.stat-label {
    margin: 0 0 0.15rem 0;
}

.stat-value {
    margin: 0;
    line-height: 1.2;
}

.physician-review {
    margin-top: 2.5rem;
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-left: 3px solid #d1d5db;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.physician-review h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.physician-review p {
    margin: 0;
}

.physician-review strong {
    color: #374151;
    font-weight: 600;
}

.faq-section {
    margin-top: 2.5rem;
}

.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: #fff;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin: 0.75rem 0 0 0;
    color: #374151;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Medium screens (tablets and smaller) */
@media (max-width: 900px) {
    .card {
        padding: 0.85rem;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 2.7rem;
    }

    .locations {
        grid-template-columns: minmax(0, 1fr);
    }

    .map-embed {
        margin-top: 0.75rem;
        overflow: hidden;
        border-radius: 16px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
        border: 1px solid rgba(0, 0, 0, 0.08);
    }

    .map-embed iframe {
        width: 100%;
        height: 200px;
        border: 0;
    }

    @media (min-width: 768px) {
        .map-embed iframe {
            height: 250px;
        }
    }

    .maps-link {
        display: inline-block;
        margin: 0.4rem 0 0.6rem;
        color: var(--pgs-blue);
        font-weight: 600;
        text-decoration: none;
    }

    .maps-link:hover {
        text-decoration: underline;
    }

    /* Map CTA */
    .map-cta {
        margin-top: 0.5rem;
    }

    .btn-small {
        padding: 0.35rem 0.85rem;
        font-size: 0.78rem;
    }

    /* Disable scroll wheel zoom for better mobile UX */
    .map-embed iframe {
        pointer-events: none;
    }

    .map-embed:hover iframe {
        pointer-events: auto;
    }

    .nav-links {
        display: none;
    }
}