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

:root {
    --primary-color: #3498db;
    --primary-dark: #1a3a6b;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --gray-color: #95a5a6;
    --white: #ffffff;
    --navy: #0d1b4b;
    --navy-mid: #1a3a6b;
    --navy-light: #0e4f7a;
    --accent: #ff6a00;
    --accent-light: #ffb347;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: var(--white);
    overflow-x: hidden;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Utility top bar ─── */
.utility-bar {
    background: var(--navy);
    color: #c9d8f0;
    font-size: 0.8rem;
    padding: 6px 0;
}
.utility-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.utility-bar a { color: #c9d8f0; text-decoration: none; }
.utility-bar a:hover { color: var(--accent-light); }
.utility-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ─── Header ─── */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.site-header .container {
    /* Wider than the page container: the logo plus nine nav items need ~1250px on one line. */
    max-width: 1360px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
/* The logo has its own cream background, so rounded corners make it sit as a badge on both
   light (site header) and dark (footer, admin bar) backgrounds. */
.logo-img { height: 40px; width: auto; border-radius: 8px; display: block; flex-shrink: 0; }
.logo-text h1 { color: var(--dark-color); font-size: 1.35rem; line-height: 1.1; white-space: nowrap; }
.logo-text h1 span { color: var(--primary-color); }
.logo-text .tagline { color: var(--gray-color); font-size: 0.75rem; letter-spacing: 0.3px; }

.main-nav { display: flex; align-items: center; gap: 1.1rem; }
.main-nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.88rem;
    transition: color 0.2s;
    white-space: nowrap;
}
.main-nav a:hover { color: var(--primary-color); }
.btn-portal {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700 !important;
}
.btn-portal:hover { background: #2980b9; color: var(--white) !important; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--dark-color);
    cursor: pointer;
}

/* ─── Hero carousel ─── */
.hero {
    position: relative;
    color: var(--white);
    min-height: 420px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    /* All slides share one grid cell, stacked on top of each other, so they can slide over each other and
       the hero stays the height of the tallest slide instead of jumping between slides. */
    display: grid;
}
.hero-slide {
    grid-area: 1 / 1;
    display: flex;
    min-height: 420px;
    align-items: center;
    position: relative;
    /* Waiting slides sit just off the right edge; the active one slides in from there while the
       previous one (.leaving) slides out to the left. */
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.9s ease-in-out, visibility 0s linear 0.9s;
}
.hero-slide.active,
.hero-slide.leaving { visibility: visible; transition: transform 0.9s ease-in-out, visibility 0s; }
.hero-slide.active { transform: translateX(0); z-index: 1; }
.hero-slide.leaving { transform: translateX(-100%); }
@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}
/* Text on the left, the slide's picture on the right, vertically centred together. */
.hero-slide .container {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-top: 3.5rem;
    padding-bottom: 5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}
/* Shown no wider than the smallest source image (589px) so it is never upscaled and blurred. */
.hero-img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    justify-self: end;
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.18);
    box-shadow: 0 14px 36px rgba(0,0,0,0.35);
}
@media (max-width: 900px) {
    .hero-slide .container { grid-template-columns: 1fr; gap: 1.8rem; padding-top: 2.5rem; }
    .hero-img { justify-self: start; max-width: 480px; }
}
.hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 1rem;
}
.hero-slide h2 { font-size: 2.4rem; max-width: 640px; margin-bottom: 1rem; }
.hero-slide p { font-size: 1.1rem; max-width: 560px; margin-bottom: 1.8rem; color: #d8eaff; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-dots {
    position: absolute;
    z-index: 2;
    bottom: 18px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 8px;
}
.hero-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none; cursor: pointer; padding: 0;
}
.hero-dot.active { background: var(--accent); }

/* ─── Buttons ─── */
.btn { padding: 0.75rem 1.6rem; border: none; border-radius: 6px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.2s; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: #e65f00; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-block { display: block; width: 100%; text-align: center; }

/* ─── Quick access tiles ─── */
.quick-access {
    margin-top: -55px;
    position: relative;
    z-index: 5;
}
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}
.quick-tile {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    padding: 1.4rem 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid var(--accent);
}
.quick-tile:hover { transform: translateY(-5px); }
.quick-tile .icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.quick-tile span { display: block; font-weight: 700; font-size: 0.88rem; }

@media (max-width: 900px) {
    .quick-access-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
    .quick-access-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Sections ─── */
.section { padding: 4rem 0; }
.section-alt { background: var(--light-color); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; font-size: 0.8rem; }
.section-head h2 { font-size: 2rem; color: var(--dark-color); margin: 0.4rem 0 0.6rem; }
.section-head p { color: var(--gray-color); }

/* ─── Feature grid ─── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.75rem; }
.feature-card { text-align: center; padding: 2rem 1.5rem; border-radius: 10px; background: var(--white); box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.feature-icon { font-size: 2.6rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; color: var(--primary-color); font-size: 1.05rem; }
.feature-card p { color: var(--gray-color); font-size: 0.9rem; }

/* ─── Service cards ─── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem; }
.service-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.service-card-top {
    height: 90px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem;
}
.service-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }
.service-card-body h3 { color: var(--dark-color); margin-bottom: 0.5rem; font-size: 1.05rem; }
.service-card-body p { color: var(--gray-color); font-size: 0.88rem; margin-bottom: 1rem; flex: 1; }
.service-card-body a { color: var(--accent); font-weight: 700; font-size: 0.85rem; text-decoration: none; }
.service-card-body a:hover { text-decoration: underline; }

/* ─── CTA banner ─── */
.cta-banner {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}
.cta-banner h2 { font-size: 1.8rem; margin-bottom: 0.6rem; }
.cta-banner p { color: #d8eaff; margin-bottom: 1.6rem; }

/* ─── Blog / Health Matters ─── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem; }
.blog-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.blog-card-img {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--navy-mid));
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: rgba(255,255,255,0.85);
}
.blog-card-body { padding: 1.4rem; }
.blog-card-body .date { color: var(--gray-color); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; }
.blog-card-body h3 { margin: 0.4rem 0 0.6rem; font-size: 1.05rem; color: var(--dark-color); }
.blog-card-body p { color: var(--gray-color); font-size: 0.88rem; margin-bottom: 0.8rem; }
.blog-card-body a { color: var(--accent); font-weight: 700; font-size: 0.85rem; text-decoration: none; }

/* ─── Page hero (interior pages) ─── */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}
.page-hero h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.page-hero p { color: #d8eaff; max-width: 600px; margin: 0 auto; }
.breadcrumb { font-size: 0.82rem; color: #a9c2e8; margin-bottom: 0.8rem; }
.breadcrumb a { color: #a9c2e8; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-light); }

/* ─── Finder / filter bar ─── */
.finder-bar {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-top: -50px;
    position: relative;
    z-index: 5;
}
.finder-field { flex: 1; min-width: 180px; }
.finder-field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--dark-color); margin-bottom: 0.4rem; }
.finder-field input, .finder-field select {
    width: 100%; padding: 0.65rem 0.8rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.92rem;
}
.finder-field input:focus, .finder-field select:focus { outline: none; border-color: var(--primary-color); }

/* ─── Result cards (locations / physicians) ─── */
.result-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.result-card { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 1.4rem; transition: transform 0.2s, box-shadow 0.2s; }
.result-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.result-card h3 { color: var(--primary-color); margin-bottom: 0.3rem; font-size: 1.05rem; }
.result-card .badge { display: inline-block; background: #e6f4ea; color: #1e7e34; font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 12px; margin-bottom: 0.6rem; }
.result-card .badge.badge-closed { background: #f8d7da; color: #721c24; }
.result-card p { color: var(--gray-color); font-size: 0.88rem; margin-bottom: 0.3rem; }
.result-card .result-actions { margin-top: 1rem; display: flex; gap: 0.6rem; }
.result-empty { text-align: center; color: var(--gray-color); padding: 3rem 0; grid-column: 1 / -1; }

/* ─── Physician avatar ─── */
.physician-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--navy-mid));
    color: var(--white); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.2rem; margin-bottom: 0.8rem;
}

/* ─── Physician photo (placeholder until a photo is set in the admin area) ─── */
.physician-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.physician-card > :not(.physician-photo) { margin-left: 1.4rem; margin-right: 1.4rem; align-self: flex-start; }
.physician-card > h3 { margin-top: 0.2rem; }
.physician-card .result-actions { margin-top: auto; padding: 1rem 0 1.4rem; }
.physician-photo { position: relative; aspect-ratio: 4 / 3; background: #e8f0fa; }
.physician-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.physician-photo-note {
    position: absolute; right: 0.8rem; top: 0.8rem;
    background: rgba(255, 255, 255, 0.9); color: var(--gray-color);
    font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}
/* The initials badge overlaps the bottom edge of the photo. */
.physician-card .physician-avatar {
    margin-top: -28px; position: relative;
    border: 3px solid var(--white); box-sizing: content-box;
}

/* ─── Two column layout ─── */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.two-col-media {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, var(--navy-light) 100%);
    border-radius: 12px;
    min-height: 280px;
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; color: rgba(255,255,255,0.85);
}
.two-col h2 { font-size: 1.9rem; color: var(--dark-color); margin-bottom: 1rem; }
.two-col p { color: var(--gray-color); margin-bottom: 1rem; }
.check-list { list-style: none; margin: 1.2rem 0; }
.check-list li { padding: 0.4rem 0 0.4rem 1.7rem; position: relative; color: var(--dark-color); font-size: 0.94rem; }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--secondary-color); font-weight: 800; }

/* ─── Insurance logos strip ─── */
.insurance-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-top: 2rem; }
.insurance-chip { background: var(--white); border: 1px solid #e3e8ee; border-radius: 8px; padding: 1rem; text-align: center; font-weight: 700; color: var(--dark-color); font-size: 0.85rem; box-shadow: var(--shadow); }

/* ─── Pricing / self-pay table ─── */
.price-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.price-table th { background: var(--navy); color: var(--white); text-align: left; padding: 0.9rem 1.2rem; font-size: 0.85rem; }
.price-table td { padding: 0.9rem 1.2rem; border-bottom: 1px solid #eef2f6; font-size: 0.9rem; color: var(--dark-color); }
.price-table tr:last-child td { border-bottom: none; }
.price-table tr:nth-child(even) { background: #fbfdff; }

/* ─── Contact ─── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-card { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 1rem; display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-card .icon { font-size: 1.6rem; }
.contact-info-card h4 { color: var(--dark-color); margin-bottom: 0.2rem; font-size: 0.95rem; }
.contact-info-card p { color: var(--gray-color); font-size: 0.88rem; }
.contact-form { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 2rem; }
.form-group { margin-bottom: 1.3rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 700; color: var(--dark-color); font-size: 0.88rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.7rem 0.85rem; border: 1px solid #ddd; border-radius: 6px; font-size: 0.95rem; font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-color); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-alert { display: none; padding: 0.9rem 1rem; border-radius: 6px; margin-bottom: 1.2rem; font-size: 0.9rem; font-weight: 600; }
.form-alert.show { display: block; }
.form-alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.form-alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ─── Nav: book appointment CTA ─── */
.btn-book {
    background: var(--accent);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700 !important;
}
.btn-book:hover { background: #e65f00; }

/* ─── Appointment booking ─── */
.booking-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .booking-layout { grid-template-columns: 1fr; } }

.form-section-title {
    color: var(--dark-color);
    font-size: 1.05rem;
    margin: 1.8rem 0 0.3rem;
    padding-top: 1.4rem;
    border-top: 1px solid #eef2f6;
}
.booking-form form > .form-section-title:first-child,
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.form-section-hint { color: var(--gray-color); font-size: 0.85rem; margin-bottom: 1rem; }

.patients-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 0.9rem; }
.patient-card { background: var(--light-color); border: 1px solid #e3e9ef; border-radius: 8px; padding: 1.1rem 1.2rem 0.2rem; }
.patient-card-header {
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; color: var(--dark-color); font-size: 0.92rem; margin-bottom: 0.9rem;
}
.btn-remove-patient {
    background: transparent; border: none; color: var(--danger-color);
    font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 0.2rem 0.4rem;
}
.btn-remove-patient:hover { text-decoration: underline; }

.btn-add-patient {
    display: block; width: 100%; background: var(--white); border: 1px dashed #ccd3da;
    color: var(--primary-color); font-weight: 700; font-size: 0.9rem; padding: 0.7rem;
    border-radius: 6px; cursor: pointer; margin-bottom: 1.5rem;
}
.btn-add-patient:hover { background: #f3f8fd; border-color: var(--primary-color); }

.booking-aside { display: flex; flex-direction: column; gap: 1.2rem; }
.booking-aside-card { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); padding: 1.5rem; }
.booking-aside-card h4 { color: var(--dark-color); margin-bottom: 0.7rem; font-size: 1rem; }
.booking-aside-card p { color: var(--gray-color); font-size: 0.88rem; margin-bottom: 1rem; }
.booking-aside-card ol { color: var(--gray-color); font-size: 0.88rem; padding-left: 1.1rem; }
.booking-aside-card ol li { margin-bottom: 0.6rem; }
.booking-aside-card form .form-group:last-of-type { margin-bottom: 1rem; }

.confirmation-number-box {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background: rgba(255,255,255,0.6); border: 1px dashed rgba(21,87,36,0.4);
    border-radius: 8px; padding: 1rem; margin-top: 0.6rem;
}
.confirmation-number-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.confirmation-number-value { font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; margin: 0.3rem 0; }
.confirmation-number-hint { font-size: 0.78rem; opacity: 0.85; }

.lookup-result {
    display: none; margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 6px;
    font-size: 0.85rem; line-height: 1.5;
}
.lookup-result.show { display: block; }
.lookup-result.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.lookup-result.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ─── Footer ─── */
.site-footer { background: var(--navy); color: #c9d8f0; padding-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 1rem; letter-spacing: 0.3px; }
.footer-col p, .footer-col li { font-size: 0.85rem; color: #a9c2e8; margin-bottom: 0.6rem; }
.footer-col ul { list-style: none; }
.footer-col a { color: #a9c2e8; text-decoration: none; }
.footer-col a:hover { color: var(--accent-light); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; }
.footer-social { display: flex; gap: 0.7rem; margin-top: 1rem; }
.footer-social a {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
}
.footer-social a:hover { background: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 1.2rem 0;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.6rem;
    font-size: 0.8rem; color: #7aabce;
}
.footer-bottom-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-bottom-links a { color: #7aabce; text-decoration: none; }
.footer-bottom-links a:hover { color: var(--accent-light); }

/* ─── Mobile nav ───
   Switches to the slide-out menu below 1300px: narrower than that, the full nav no longer fits
   beside the logo and the two overlap. The mega menus become accordions inside it. */
@media (max-width: 1300px) {
    .main-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 300px; max-width: 88vw; height: 100vh;
        overflow-y: auto;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 1.5rem 1.5rem;
        gap: 1.4rem;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        transition: right 0.3s ease;
        z-index: 1100;
    }
    .main-nav.open { right: 0; }
    .nav-toggle { display: block; }

}
@media (max-width: 900px) {
    .quick-access { margin-top: 1.5rem; }
    .finder-bar { margin-top: 1.5rem; }
    .hero-slide h2 { font-size: 1.7rem; }
}

/* Below the header (z-index 1000), so it dims the page but not the slide-out menu inside the header. */
.nav-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 998;
}
.nav-overlay.visible { display: block; }

/* ─── Mega menu (Find Care / Services / Patients) ───
   On desktop each trigger opens a full-width panel that slides down from under the header
   (clip-path reveal) while its contents drift in, slightly staggered. Moving from one menu to
   another swaps the panel in place instead of replaying the slide. */
.nav-item { position: static; }
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem 0;
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark-color);
    cursor: pointer;
    white-space: nowrap;
}
.nav-trigger:hover, .nav-item.open .nav-trigger { color: var(--primary-color); }
.nav-caret {
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.25s ease;
}
.nav-item.open .nav-caret { transform: rotate(180deg); }
/* Accent bar under the open menu's label. */
.nav-trigger::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -0.95rem;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}
.nav-item.open .nav-trigger::after { transform: scaleX(1); }
.main-nav a.is-current, .nav-item.is-current .nav-trigger { color: var(--primary-color); }

.mega-panel {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--white);
    border-top: 1px solid #e6ebf1;
    box-shadow: 0 18px 40px rgba(13, 27, 75, 0.16);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.38s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.38s;
    z-index: 1001;
}
.nav-item.open .mega-panel {
    clip-path: inset(0 0 -60px 0);
    visibility: visible;
    transition: clip-path 0.38s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}
.mega-panel.instant { transition: none !important; }

.mega-inner {
    max-width: 1360px;
    margin: 0 auto;
    padding: 2rem 20px 2.2rem;
    display: grid;
    grid-template-columns: 320px repeat(2, minmax(0, 260px));
    gap: 2.5rem;
}
.mega-inner > * {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.35s ease;
}
.nav-item.open .mega-inner > * { opacity: 1; transform: none; }
.nav-item.open .mega-inner > :nth-child(1) { transition-delay: 0.05s; }
.nav-item.open .mega-inner > :nth-child(2) { transition-delay: 0.1s; }
.nav-item.open .mega-inner > :nth-child(3) { transition-delay: 0.15s; }
.mega-panel.instant .mega-inner > * { transition: none; }

.mega-feature {
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
}
.mega-feature-art { height: 120px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); }
.mega-feature-art img { max-height: 100px; max-width: 90%; border-radius: 8px; }
.mega-feature-art-icons { gap: 1rem; font-size: 2.2rem; }
.mega-feature-art-icons span {
    width: 62px; height: 62px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.12);
}
.mega-feature-body { padding: 1.1rem 1.3rem 1.4rem; }
.mega-feature-body h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.mega-feature-body p { font-size: 0.88rem; color: #d8eaff; margin-bottom: 1rem; }
.main-nav .mega-cta {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}
.main-nav .mega-cta:hover { background: #e65f00; color: var(--white); }

.mega-col { display: flex; flex-direction: column; }
.mega-col-head {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 700; font-size: 1.02rem; color: var(--dark-color);
    margin-bottom: 0.4rem;
}
.mega-icon { font-size: 1.15rem; }
.mega-col-desc { font-size: 0.85rem; color: #5d6d7e; line-height: 1.5; margin-bottom: 0.8rem; }
.main-nav .mega-col a {
    display: block;
    padding: 0.38rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-color);
    white-space: normal;
    transition: color 0.2s, transform 0.2s;
}
.main-nav .mega-col a:hover { color: var(--primary-color); transform: translateX(4px); }

/* Dims the page under an open menu. */
.mega-backdrop {
    position: fixed; inset: 0;
    background: rgba(13, 27, 75, 0.28);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    z-index: 999;
}
.mega-backdrop.visible { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s; }

@media (prefers-reduced-motion: reduce) {
    .mega-panel, .mega-inner > *, .nav-caret, .nav-trigger::after, .mega-backdrop { transition: none !important; }
}

/* Links from the menus jump to sections; keep them clear of the sticky header. */
section[id], .service-card[id] { scroll-margin-top: 110px; }

/* Phone/tablet: the mega menus open as accordions inside the slide-out menu. Kept after the
   desktop mega-menu rules above so these win. */
@media (max-width: 1300px) {
    .nav-item { width: 100%; }
    .nav-trigger { width: 100%; justify-content: space-between; }
    .nav-trigger::after { display: none; }
    .mega-panel {
        position: static;
        box-shadow: none;
        border-top: none;
        clip-path: none;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .nav-item.open .mega-panel { max-height: 600px; }
    .mega-inner { display: block; padding: 0.4rem 0 0 0.9rem; }
    .mega-inner > * { opacity: 1; transform: none; }
    .mega-feature, .mega-col-desc { display: none; }
    .mega-col { padding: 0.4rem 0; }
    .mega-col-head { font-size: 0.78rem; margin-bottom: 0.2rem; }
    .mega-col a { padding: 0.4rem 0; font-size: 0.92rem; }
    .mega-backdrop { display: none; }
}

/* ─── Patient Portal page ─── */
.coming-soon-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin: 0.6rem 0 0.4rem;
}
.btn-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; background: var(--primary-color); }
.portal-note { font-size: 0.85rem; color: var(--gray-color); margin-top: 0.6rem; }
.portal-signup-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 760px; margin: 0 auto; }
.portal-echeck { align-items: start; }
.portal-echeck h3 { color: var(--dark-color); font-size: 1.2rem; margin-bottom: 0.4rem; }
.portal-echeck .portal-callout {
    background: #eef6fd;
    border-left: 4px solid var(--primary-color);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 0.92rem;
    color: var(--dark-color);
}
.portal-steps { counter-reset: step; list-style: none; margin: 1rem 0 0; padding: 0; }
.portal-steps li {
    counter-increment: step;
    position: relative;
    padding: 0.45rem 0 0.45rem 2.6rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 0.94rem;
}
.portal-steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0.3rem;
    width: 1.8rem; height: 1.8rem; border-radius: 50%;
    background: var(--navy); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}
.cta-banner p a { color: inherit; font-weight: 700; }

/* ─── Photo Gallery (gallery.html + home page preview) ─── */
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-bottom: 2rem; }
.gallery-filter {
    border: 1px solid #d5dde6; background: var(--white); color: var(--dark-color);
    border-radius: 999px; padding: 0.45rem 1.1rem; font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.gallery-filter:hover { border-color: var(--primary-color); color: var(--primary-color); }
.gallery-filter.active { background: var(--primary-color); border-color: var(--primary-color); color: var(--white); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.gallery-item {
    position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: none;
    border-radius: 12px; overflow: hidden; background: #e8eef5; cursor: zoom-in; box-shadow: var(--shadow);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.05); }
.gallery-item:focus-visible { outline: 3px solid var(--primary-color); outline-offset: 3px; }
.gallery-item-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem 0.9rem 0.75rem; text-align: left;
    background: linear-gradient(transparent, rgba(8, 20, 50, 0.82)); color: #fff;
}
.gallery-item-category { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-light); }
.gallery-item-title { display: block; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.gallery-empty { grid-column: 1 / -1; text-align: center; color: var(--gray-color); padding: 3rem 0; }

body.lightbox-open { overflow: hidden; }
.lightbox {
    position: fixed; inset: 0; z-index: 2000; background: rgba(6, 12, 30, 0.92);
    display: flex; align-items: center; justify-content: center; padding: 1.5rem 4.5rem;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: 1100px; width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 13rem); object-fit: contain; border-radius: 8px; background: #111; }
.lightbox-text { color: #e8eef7; text-align: center; max-width: 760px; margin-top: 1rem; overflow-y: auto; max-height: 9rem; }
.lightbox-text h3 { color: #fff; font-size: 1.15rem; margin: 0.15rem 0 0.35rem; }
.lightbox-text p { font-size: 0.92rem; line-height: 1.55; margin: 0 0 0.4rem; white-space: pre-line; }
.lightbox-category { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-light); }
.lightbox-count { display: block; font-size: 0.75rem; color: #9fb0c8; }
.lightbox-close, .lightbox-nav {
    position: absolute; border: none; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.lightbox-close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.8rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2.2rem; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 3px solid var(--accent-light); }
@media (max-width: 700px) {
    .lightbox { padding: 4rem 0.75rem 1rem; }
    .lightbox-nav { top: auto; bottom: 1rem; transform: none; width: 44px; height: 44px; }
    .lightbox-figure img { max-height: calc(100vh - 16rem); }
}

.home-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.home-gallery-grid .gallery-item { cursor: pointer; }
@media (max-width: 800px) { .home-gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.home-gallery-actions { text-align: center; margin-top: 2rem; }

/* ─── About Us page ─── */
.about-welcome { max-width: 860px; }
.about-welcome .section-head { margin-bottom: 1.2rem; }
.about-welcome-img { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto 2.5rem; border-radius: 12px; }
.about-message h2 { color: var(--dark-color); font-size: 1.6rem; margin-bottom: 1rem; }
.about-message p { color: #4a5a6a; font-size: 1.02rem; line-height: 1.75; margin-bottom: 1.1rem; }
.about-message a { color: var(--primary-color); font-weight: 600; }
.about-signoff { margin-top: 1.6rem; color: var(--dark-color) !important; }
