:root {
    /* Palette drawn from the Visualeyes logo (gold on black) and the office:
       charcoal feature wall, brass fixtures, cream upholstery, warm wood. */
    --primary: #7d5f26;            /* bronze gold - links, accents (AA on cream, beige and white) */
    --primary-gradient: linear-gradient(135deg, #b48a3c 0%, #dcbf72 100%);
    --secondary: #c9a65a;          /* light gold - icons, rules, focus */
    --gold-soft: rgba(201, 166, 90, 0.16);
    --charcoal: #2b2a28;           /* headings, dark bands */
    --charcoal-deep: #1b1a18;      /* footer */
    --bg: #fcfaf6;                 /* cream */
    --bg-light: #f5efe4;           /* warm beige */
    --border: #e6dfd2;
    --text-main: #2b2a28;
    --text-muted: #6e665b;
    --white: #ffffff;
    --card-shadow: 0 10px 25px -5px rgba(61, 48, 24, 0.08), 0 8px 10px -6px rgba(61, 48, 24, 0.06);
    --card-hover-shadow: 0 20px 25px -5px rgba(61, 48, 24, 0.14), 0 10px 10px -6px rgba(61, 48, 24, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 1rem;
    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
    /* Sticky-footer layout: body is a flex column so <main> can grow to fill
       the viewport and <footer> always pins to the bottom even when content
       is short (booking success page, 404, etc). */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--charcoal);
    line-height: 1.2;
    font-weight: 700;
}

h1, h2 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.005em;
}

h1 { font-size: 4rem; line-height: 1.08; }
h2 { font-size: 2.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2.125rem; }
}

/* Small-caps gold label with hairline rules, echoing the "- OPTOMETRY -"
   line in the logo. Used above section headings. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.eyebrow::before,
.eyebrow::after {
    content: '';
    width: 2.25rem;
    height: 1px;
    background: var(--secondary);
}
.eyebrow-left { justify-content: flex-start; }

/* Reusable Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #1f1d1a;
    box-shadow: 0 4px 15px rgba(180, 138, 60, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(180, 138, 60, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--charcoal);
    border: 1px solid rgba(43, 42, 40, 0.35);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.25rem 0;
}

header.scrolled {
    background: rgba(252, 250, 246, 0.9);
    backdrop-filter: blur(12px);
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(61, 48, 24, 0.08);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo { display: inline-flex; align-items: center; }
.logo img {
    height: 46px;
    width: auto;
}
/* Full lockup on desktop; the eye mark alone on phones so the Book button fits. */
.logo .logo-mark { display: none; }
header .btn { white-space: nowrap; }

.nav-links {
    display: flex;
    gap: 2.25rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

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

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Hamburger: three bars that fold into an X when open. Phones and tablets
   only (same breakpoint that hides .nav-links). */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(43, 42, 40, 0.18);
    border-radius: 12px;
    background: rgba(252, 250, 246, 0.85);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
}
.nav-toggle:hover { border-color: var(--primary); }
.nav-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--charcoal);
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu: a full-screen cream sheet that slides in under the header. */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;              /* a sibling of <header> (1000): under the bar, over the page */
    background: var(--bg);
    padding-top: 6.5rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}
.mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}
header.menu-open {
    background: var(--bg);
    box-shadow: none;
}
body.nav-locked { overflow: hidden; }

.mobile-nav-inner { padding-bottom: 3rem; }
.mobile-nav-links { list-style: none; }
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--charcoal);
    text-decoration: none;
}
.mobile-nav-links a::before {
    content: '';
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: var(--secondary);
    flex-shrink: 0;
}
.mobile-nav-links a:hover, .mobile-nav-links a:focus-visible { color: var(--primary); }
.mobile-nav-links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mobile-nav-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mobile-nav-footer .btn { text-align: center; }
.mobile-nav-phone {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--charcoal);
    font-weight: 600;
    font-size: 1.25rem;
    text-decoration: none;
}
.mobile-nav-phone span {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 1200px) {
    .nav-links { gap: 1.5rem; }   /* five links + lockup + Book button must fit down to the 1100px breakpoint */
}
@media (max-width: 1100px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .mobile-nav { display: block; }
}
@media (max-width: 680px) {
    /* Lockup + CTA + toggle need ~610px of row; drop the header CTA before
       the row runs out of room (the hero and the menu sheet carry it). */
    header .nav-cta { display: none; }
}
@media (max-width: 640px) {
    .logo .logo-full { display: none; }
    .logo .logo-mark { display: block; height: 38px; }
    .mobile-nav { padding-top: 6rem; }
}

/* Hero Section - the office banner runs edge to edge; a cream wash on the
   left keeps the headline legible while the frames and wall sign show on the
   right. */
.hero {
    position: relative;
    padding: 11rem 0 7rem;
    min-height: 620px;
    display: flex;
    align-items: center;
    background: var(--bg-light) url('/static/images/hero_office.jpg') center right / cover no-repeat;
    background-image: image-set(url(/static/images/hero_office.webp) type("image/webp"), url(/static/images/hero_office.jpg) type("image/jpeg"));
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(252, 250, 246, 0.98) 0%,
        rgba(252, 250, 246, 0.95) 40%,
        rgba(252, 250, 246, 0.6) 62%,
        rgba(252, 250, 246, 0.08) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 600px) 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin: 1.5rem 0 2.5rem;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-call {
    color: var(--charcoal);
    font-weight: 600;
    text-decoration: none;
}
.hero-call span { color: var(--text-muted); font-weight: 400; }
.hero-call:hover { color: var(--primary); }

/* Offset hairline gold frame behind the doctor photo - a nod to the logo's eye. */
.doctor-image { position: relative; }
.doctor-image img { position: relative; z-index: 1; }
.doctor-image picture { display: block; }
.doctor-image::after {
    content: '';
    position: absolute;
    inset: 1.1rem -1.1rem -1.1rem 1.1rem;
    border: 1px solid var(--secondary);
    border-radius: var(--radius);
    z-index: 0;
}

@media (max-width: 900px) {
    .hero { padding: 8rem 0 5rem; min-height: 0; background-position: 68% center; }
    .hero::before { background: rgba(252, 250, 246, 0.9); }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content p { margin: 1.5rem auto 2.5rem; }
    .hero-actions { justify-content: center; }
}

/* Trust strip (charcoal band, like the office feature wall) */
.trust-strip {
    background: var(--charcoal);
    color: #cfc7b9;
    padding: 2.5rem 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.trust-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 1.1;
    color: var(--secondary);
    font-weight: 600;
}
.trust-item span {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.trust-item a { color: inherit; text-decoration: none; }
.trust-item a:hover span { color: var(--white); }
@media (max-width: 768px) {
    .trust-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

/* Phones and small tablets: the 8rem section padding that gives the desktop
   layout its breathing room reads as a blank screen on a 375px phone, so
   every marketing section tightens to 5rem here. */
@media (max-width: 768px) {
    .services, .doctor-bio, .features, .visit, .new-patients { padding: 5rem 0; }
    .insurance { padding: 4rem 0; }
    .cta-banner { padding: 1.5rem 0 5rem; }
}

/* Services Section */
.services {
    padding: 8rem 0;
    background-color: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.service-card {
    padding: 2.5rem 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(138, 106, 43, 0.08);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
    background: linear-gradient(180deg, #ffffff 0%, #f8f3ea 100%);
    border-color: rgba(138, 106, 43, 0.25);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--primary);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-card h3 { font-size: 1.2rem; }

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Insurance */
.insurance {
    padding: 6rem 0;
    background: var(--bg-light);
}
.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    max-width: 880px;
    margin: 0 auto 2.5rem;
}
.plan-card {
    background: var(--white);
    border-radius: var(--radius);
    border-top: 3px solid var(--secondary);
    padding: 2.25rem 2.25rem 2rem;
    box-shadow: var(--card-shadow);
}
.plan-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
}
.plan-card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.plan-card h3 { font-size: 1.25rem; margin-bottom: 0.15rem; }
.plan-card-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.plan-list { list-style: none; }
.plan-list li {
    position: relative;
    padding: 0.55rem 0 0.55rem 1.4rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--charcoal);
}
.plan-list li:last-child { border-bottom: none; }
.plan-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: var(--secondary);
}
.plan-list li span {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 0.35rem;
}
@media (max-width: 720px) {
    .plan-grid { grid-template-columns: 1fr; }
}
.insurance-note {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    max-width: 680px;
    margin: 0 auto;
}
.insurance-note a { color: var(--primary); font-weight: 600; text-decoration: none; }
.insurance-note a:hover { text-decoration: underline; }

/* Doctor Section */
.doctor-bio {
    padding: 8rem 0;
    background-color: var(--bg);
}

.doctor-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 6rem;
    align-items: center;
}

.doctor-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.doctor-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.doctor-note {
    background: var(--bg-light);
    border-left: 3px solid var(--secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.5rem;
    margin-top: 0.5rem;
}
.doctor-note p { margin: 0; color: var(--text-main); font-size: 0.98rem; }
.doctor-note strong { color: var(--charcoal); }

@media (max-width: 900px) {
    .doctor-grid { grid-template-columns: 1fr; gap: 4rem; }
    .doctor-image { order: 1; max-width: 480px; margin: 0 auto; }
    .doctor-content { text-align: center; }
    .doctor-note { text-align: left; }
}

/* Feature Section (three cards) */
.features {
    padding: 8rem 0;
    background-color: var(--bg-light);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.25rem 2rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item-icon {
    width: 48px;
    height: 48px;
    background: var(--gold-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.feature-item-content h3 {
    margin-bottom: 0.35rem;
    color: var(--charcoal);
    font-size: 1.1rem;
}

.feature-item-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .feature-list { grid-template-columns: 1fr; }
}

/* Visit / location section - the office photo, darkened to the feature-wall
   charcoal, with the practical details patients actually need. */
.visit {
    position: relative;
    padding: 8rem 0;
    background: url('/static/images/office_interior.jpg') center / cover no-repeat;
    background-image: image-set(url(/static/images/office_interior.webp) type("image/webp"), url(/static/images/office_interior.jpg) type("image/jpeg"));
    color: #e9e2d5;
}
.visit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(27, 26, 24, 0.94) 0%, rgba(27, 26, 24, 0.86) 45%, rgba(27, 26, 24, 0.45) 100%);
}
.visit .container { position: relative; z-index: 1; }
.visit-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.visit .eyebrow { color: var(--secondary); }
.visit .eyebrow::before, .visit .eyebrow::after { background: var(--secondary); }
.visit h2 { color: var(--white); }
.visit-intro { margin-bottom: 2rem; max-width: 520px; }
.visit-areas { margin-bottom: 2rem; max-width: 520px; }
.visit-intro:has(+ .visit-areas) { margin-bottom: 0.75rem; }
.visit h3 {
    color: var(--secondary);
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 1.75rem 0 0.6rem;
}
.visit address { font-style: normal; line-height: 1.7; }
.visit a { color: var(--white); text-decoration: none; }
.visit a:hover { color: var(--secondary); }
.visit-link { font-weight: 600; border-bottom: 1px solid var(--secondary); }
.visit-list { list-style: none; }
.visit-list li { position: relative; padding-left: 1.4rem; margin-bottom: 0.55rem; line-height: 1.55; }
.visit-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: var(--secondary);
}

.visit-card {
    background: rgba(252, 250, 246, 0.97);
    color: var(--text-main);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--card-hover-shadow);
}
.visit-card h3 { color: var(--charcoal); margin: 0 0 1.25rem; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 0.6rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.hours-table th { text-align: left; font-weight: 400; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }
.hours-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.hours-table .closed { color: var(--text-muted); font-weight: 500; }
.hours-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 1rem; line-height: 1.5; }
.visit-card .btn { margin-top: 1.5rem; width: 100%; text-align: center; }
.visit-card .btn, .visit-card .btn:hover { color: #1f1d1a; }

@media (max-width: 900px) {
    .visit-grid { grid-template-columns: 1fr; gap: 3rem; }
    .visit::before { background: rgba(27, 26, 24, 0.88); }
}

/* New patients */
.new-patients { padding: 8rem 0; background: var(--bg); }
.np-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}
.np-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(138, 106, 43, 0.08);
}
.np-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.np-card > p { color: var(--text-muted); margin-bottom: 1.25rem; font-size: 0.95rem; }
.form-links { list-style: none; }
.form-links li { margin-bottom: 0.7rem; }
.form-links a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.form-links a::before {
    content: 'PDF';
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.4rem;
    border: 1px solid rgba(138, 106, 43, 0.4);
    border-radius: 4px;
}
.form-links a:hover { text-decoration: underline; }
.np-card .visit-list li { color: var(--text-main); }
.np-card .visit-list li::before { top: 0.65rem; }
.np-footnote { font-size: 0.875rem; color: var(--text-muted); margin-top: 1.25rem; }
.np-footnote a { color: var(--primary); font-weight: 600; text-decoration: none; }
.np-footnote a:hover { text-decoration: underline; }
@media (max-width: 800px) {
    .np-grid { grid-template-columns: 1fr; }
}

/* FAQ - native <details> accordion (works without script and reads as plain
   text to crawlers): cream cards with a hairline border on the warm beige band
   between New Patients and the CTA. */
.faq { padding: 8rem 0; background: var(--bg-light); }
.faq .section-header { margin-bottom: 3rem; }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 0.75);
    margin-bottom: 0.75rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item[open] {
    border-color: rgba(201, 166, 90, 0.55);
    box-shadow: var(--card-shadow);
}
.faq-item summary {
    display: block;
    position: relative;
    padding: 1.35rem 3.75rem 1.35rem 1.75rem;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--charcoal);
    border-radius: inherit;
    transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--primary); }
.faq-item summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Gold hairline plus on the right; the vertical bar swings onto the
   horizontal one when the item opens, leaving a minus. */
.faq-item summary::before,
.faq-item summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1.75rem;
    width: 14px;
    height: 2px;
    background: var(--secondary);
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}
.faq-item summary::after { transform: translateY(-50%) rotate(90deg); }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(180deg); }
.faq-answer {
    padding: 0 1.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-main);
}
.faq-answer p { margin-bottom: 0.75rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer ul, .faq-answer ol { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.faq-answer li { margin-bottom: 0.35rem; }
.faq-answer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }
@media (max-width: 768px) {
    .faq { padding: 5rem 0; }
    .faq .section-header { margin-bottom: 2rem; }
    .faq-item summary { padding: 1.1rem 3rem 1.1rem 1.25rem; font-size: 1.15rem; }
    .faq-item summary::before, .faq-item summary::after { right: 1.25rem; }
    .faq-answer { padding: 0 1.25rem 1.25rem; }
}

/* CTA Section */
.cta-banner {
    padding: 2rem 0 7rem;
    background: var(--bg);
}

.cta-box {
    background: var(--charcoal);
    border-radius: 2rem;
    padding: 5rem 2rem;
    text-align: center;
    color: #e9e2d5;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(43, 42, 40, 0.25);
}
.cta-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 300px at 50% 0%, rgba(201, 166, 90, 0.22), transparent 70%);
}
.cta-box > * { position: relative; }
.cta-box .eyebrow { color: var(--secondary); }
.cta-box .eyebrow::before, .cta-box .eyebrow::after { background: var(--secondary); }

.cta-box h2 {
    color: var(--white);
    font-size: 3rem;
}

.cta-box .btn {
    background: var(--primary-gradient);
    color: #1f1d1a;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}
.cta-call { display: block; margin-top: 1.25rem; font-size: 0.95rem; }
.cta-call a { color: var(--white); text-decoration: none; font-weight: 600; }
.cta-call a:hover { color: var(--secondary); }

/* Footer */
footer {
    padding: 6rem 0 3rem;
    background: var(--charcoal-deep);
    color: #b5ad9f;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo img {
    height: 120px;
    width: auto;
    max-width: 100%;
    margin-bottom: 1.25rem;
}

.footer-col h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-hours-title { margin-top: 1.25rem; font-weight: 600; color: #e9e2d5; }
.footer-hours-note { font-size: 0.8rem; color: rgba(181, 173, 159, 0.8); }

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(201, 166, 90, 0.18);
    text-align: center;
    font-size: 0.875rem;
}
.footer-legal-links {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.footer-legal-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-legal-links a:hover { color: var(--white); }
.footer-recaptcha {
    font-size: 0.75rem;
    color: rgba(181, 173, 159, 0.7);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}
.footer-recaptcha a {
    color: inherit;
    text-decoration: underline;
}
.footer-copyright {
    margin: 0;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem 2rem;
    }
    .footer-col:first-child { grid-column: span 2; }
}

@media (max-width: 540px) {
    /* Single-column footer on phones - the 2-col layout at this width
       squeezes the Contact Us column awkwardly. */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-bottom: 2.5rem;
    }
    .footer-col:first-child { grid-column: auto; }
    footer { padding: 4rem 0 2rem; }

    /* Tighten container padding on small screens so content has more room
       to breathe rather than hugging the edges. */
    .container { padding: 0 1.25rem; }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.stagger-reveal {
    opacity: 0;
    transform: translateY(20px);
}

.reveal.active .stagger-reveal {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* ============================================================
   Shared button variants used by schedule + admin pages
   ============================================================ */
.btn-block { display: block; width: 100%; text-align: center; }
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(138, 106, 43, 0.2);
}
.btn-ghost:hover { background: rgba(138, 106, 43, 0.06); }
.btn-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35); }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.required { color: #b91c1c; }
.optional { color: var(--text-muted); font-weight: 400; font-size: 0.875rem; }

/* ============================================================
   Schedule page
   ============================================================ */
.schedule-body { padding-top: 5rem; background: var(--bg-light); min-height: 100vh; }

.schedule-hero { padding: 3rem 0 1rem; }
.schedule-hero-content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.schedule-hero-content p { color: var(--text-muted); font-size: 1.125rem; }

.schedule-section { padding: 2rem 0 4rem; }
.schedule-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 960px) {
    .schedule-grid { grid-template-columns: 1fr; }
}

.schedule-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
}
.schedule-card-title { font-size: 1.25rem; margin-bottom: 1.25rem; }

.schedule-label { display: block; font-weight: 600; color: var(--text-main); margin-bottom: 0.5rem; }
.schedule-input,
.schedule-field input,
.schedule-field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-main);
    transition: border-color 0.2s;
    /* Ensure all inputs/selects have a comfortable 48px+ touch target and
       no 300ms tap delay on touch screens (Tesla's in-car browser etc). */
    min-height: 48px;
    touch-action: manipulation;
}
.schedule-field textarea { min-height: auto; }

/* Selects need extra love: suppress the native browser dropdown arrow
   (which renders inconsistently on older Chromium, can overlap hit area,
   and breaks taps near the right edge on Tesla's in-car browser).
   We replace it with a hand-baked inline-SVG arrow that's always
   positioned predictably and add cursor: pointer so it's obviously
   interactive. */
select.schedule-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='%2364748b' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    background-size: 0.7rem auto;
    padding-right: 2.4rem; /* clear room so options never overlap the arrow */
    cursor: pointer;
}
.schedule-input:focus,
.schedule-field input:focus,
.schedule-field textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--gold-soft);
}
.schedule-reason-row { margin-bottom: 1.25rem; }

/* ============================================================
   Custom visit-type dropdown
   Replaces native <select> for cross-browser positioning reliability.
   Styled to match .schedule-input for visual consistency.
   ============================================================ */
.schedule-select {
    position: relative; /* anchor for the absolutely-positioned panel below */
}
.schedule-select-trigger {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 48px;
    touch-action: manipulation;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.schedule-select-trigger:focus,
.schedule-select-trigger:focus-visible {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--gold-soft);
}
.schedule-select-trigger[aria-expanded="true"] {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--gold-soft);
}
.schedule-select-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.schedule-select-chevron {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1;
    transition: transform 0.2s;
}
.schedule-select-trigger[aria-expanded="true"] .schedule-select-chevron {
    transform: rotate(180deg);
}

.schedule-select-panel {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem;
}
.schedule-select-option {
    display: block;
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: transparent;
    border: none;
    border-radius: 0.4rem;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    touch-action: manipulation;
}
.schedule-select-option:hover,
.schedule-select-option:focus-visible {
    background: var(--bg-light);
    outline: none;
}
.schedule-select-option[aria-selected="true"] {
    background: rgba(138, 106, 43, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.schedule-calendar { margin-bottom: 1.5rem; }
.schedule-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.schedule-cal-month { font-weight: 600; color: var(--text-main); }
.schedule-cal-nav {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}
.schedule-cal-nav:hover { background: var(--bg-light); }
.schedule-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}
.schedule-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding-top: 0.5rem;
}
.schedule-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: background-color 0.15s;
}
.schedule-cal-day:hover:not(.disabled):not(.empty) { background: rgba(138, 106, 43, 0.08); }
.schedule-cal-day.disabled { color: #cfc7b9; cursor: not-allowed; }
.schedule-cal-day.empty { cursor: default; }
.schedule-cal-day.today { font-weight: 700; border-color: var(--secondary); }
.schedule-cal-day.selected {
    background: var(--primary-gradient);
    color: #1f1d1a;
    font-weight: 700;
}

.schedule-slots-empty { color: var(--text-muted); font-size: 0.95rem; padding: 0.5rem 0; }
.schedule-slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
}
.schedule-slot {
    padding: 0.625rem 0.5rem;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.15s;
}
.schedule-slot:hover { border-color: var(--secondary); background: rgba(201, 166, 90, 0.06); }
.schedule-slot.selected {
    background: var(--primary-gradient);
    color: #1f1d1a;
    border-color: transparent;
}

.schedule-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.schedule-field-full { grid-column: 1 / -1; }
.schedule-field label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.95rem; }
.schedule-field-error {
    display: block;
    margin-top: 0.4rem;
    color: #b91c1c;
    font-size: 0.85rem;
    line-height: 1.3;
}
.schedule-field.has-error input,
.schedule-field.has-error textarea {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.schedule-summary {
    background: var(--bg-light);
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.schedule-summary-label { color: var(--text-muted); }
.schedule-summary-value { color: var(--text-main); font-weight: 600; }

.schedule-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    font-size: 0.95rem;
}

/* Consent / agreement disclosure shown right above the submit button.
   Sign-in-wrap pattern: visible, conspicuous, links to Terms + Privacy. */
.schedule-consent {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 1rem;
    padding: 0.6rem 0.85rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}
.schedule-consent a {
    color: var(--primary);
    text-decoration: underline;
}
.schedule-consent a:hover { color: var(--charcoal); }
.schedule-consent strong {
    color: var(--text-main);
    font-weight: 600;
}

.schedule-success { padding: 4rem 0; }
.schedule-success-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}
.schedule-success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: var(--primary-gradient);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ============================================================
   Admin shell
   ============================================================ */
.admin-body { background: var(--bg-light); min-height: 100vh; padding-top: 5rem; }
.admin-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    padding: 0.75rem 0;
}
.admin-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.admin-logo { display: flex; align-items: center; gap: 0.5rem; }
.admin-logo img { height: 32px; width: auto; }
.admin-logo .logo-mark { display: none; }
.admin-logo-tag {
    background: var(--primary);
    color: var(--white);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.admin-nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}
.admin-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.admin-nav-links a:hover { color: var(--primary); }
.admin-nav-links a.active { color: var(--primary); border-color: var(--primary); }
.admin-user { display: flex; align-items: center; gap: 0.75rem; }
.admin-user-name { color: var(--text-main); font-weight: 500; font-size: 0.95rem; }

.admin-main { padding: 2rem 0 4rem; }
.admin-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.admin-page-header h1 { font-size: 2rem; margin: 0; }
.admin-page-subtitle { color: var(--text-muted); margin-top: 0.25rem; }

/* ----- Admin toolbar (filter chips + range nav + search) ----- */
.admin-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: var(--white);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.admin-filter-group { display: flex; gap: 0.25rem; }
.admin-chip {
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.admin-chip:hover { background: rgba(138, 106, 43, 0.06); color: var(--primary); }
.admin-chip.active { background: var(--primary); color: var(--white); }

.admin-date-nav { display: flex; align-items: center; gap: 0.5rem; }
.admin-date-label { font-weight: 600; color: var(--text-main); min-width: 180px; text-align: center; }

.admin-search { margin-left: auto; }
.admin-search input {
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    min-width: 260px;
    font-family: inherit;
}
.admin-search input:focus { outline: none; border-color: var(--secondary); }

/* ----- Appointment cards ----- */
.admin-appointments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.admin-empty {
    grid-column: 1 / -1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
    box-shadow: var(--card-shadow);
}
.admin-card {
    aspect-ratio: 1;
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.15s, box-shadow 0.15s;
    border-top: 4px solid var(--primary);
}
.admin-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.admin-card.status-cancelled { border-top-color: #b91c1c; opacity: 0.7; }
.admin-card.status-completed { border-top-color: #059669; }
.admin-card-time { color: var(--primary); font-weight: 600; font-size: 0.95rem; }
.admin-card-name { color: var(--text-main); font-weight: 700; font-size: 1.25rem; margin: 0; }
.admin-card-reason {
    display: inline-block;
    background: rgba(138, 106, 43, 0.08);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    align-self: flex-start;
}
.admin-card-contact { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; margin-top: auto; }
.admin-card-status {
    align-self: flex-start;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
}
.admin-card.status-cancelled .admin-card-status { background: rgba(185, 28, 28, 0.1); color: #b91c1c; }
.admin-card.status-completed .admin-card-status { background: rgba(5, 150, 105, 0.1); color: #047857; }

/* ----- Admin modal ----- */
.admin-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.admin-modal[hidden] { display: none; }
.admin-modal-backdrop { position: absolute; inset: 0; background: rgba(27, 26, 24, 0.55); }
.admin-modal-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 560px;
    width: 100%;
    box-shadow: var(--card-hover-shadow);
    max-height: 90vh;
    overflow-y: auto;
}
.admin-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}
.admin-modal-body { margin: 1rem 0; }
.admin-modal-body dl { display: grid; grid-template-columns: 130px 1fr; gap: 0.5rem 1rem; }
.admin-modal-body dt { color: var(--text-muted); font-size: 0.9rem; }
.admin-modal-body dd { color: var(--text-main); margin: 0; font-size: 0.95rem; }
.admin-modal-internal {
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
    border-radius: 0.4rem;
}
.admin-modal-internal h4 {
    color: #92400e;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}
.admin-modal-internal p {
    color: var(--text-main);
    font-size: 0.9rem;
    white-space: pre-wrap;
    margin: 0;
}
.admin-modal-audit { margin-top: 1.5rem; }
.admin-modal-audit h4 { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.admin-modal-audit ul { list-style: none; padding: 0; margin: 0; }
.admin-modal-audit li { padding: 0.4rem 0; border-bottom: 1px solid #f1ece3; font-size: 0.85rem; color: var(--text-muted); }
.admin-modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.admin-modal-card.admin-modal-wide { max-width: 720px; }

/* ----- Admin login ----- */
.admin-login-body { background: var(--bg-light); padding-top: 0; min-height: 100vh; }
.admin-login-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.admin-login-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--card-shadow);
}
.admin-login-logo img { height: 56px; margin-bottom: 1rem; }
.admin-login-help { color: var(--text-muted); margin-bottom: 1.5rem; }
.admin-login-google { display: flex; justify-content: center; margin-bottom: 1rem; min-height: 44px; }
.admin-login-error {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.admin-login-back {
    display: inline-block;
    margin-top: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.admin-login-back:hover { color: var(--primary); }

/* ----- Admin settings ----- */
.admin-settings-section {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
}
.admin-settings-section h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.admin-section-help { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.admin-settings-status {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.admin-settings-status.ok { background: rgba(5, 150, 105, 0.1); color: #047857; }
.admin-settings-status.err { background: rgba(239, 68, 68, 0.08); color: #b91c1c; }

.admin-reasons { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.admin-reason-row {
    display: grid;
    grid-template-columns: 24px 1.5fr 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    transition: opacity 0.15s, transform 0.15s, background-color 0.15s;
}
.admin-reason-row.dragging { opacity: 0.4; }
.admin-reason-row.drag-over {
    background: rgba(138, 106, 43, 0.06);
    box-shadow: inset 0 2px 0 var(--primary);
    border-radius: 0.5rem;
}
.admin-drag-handle {
    cursor: grab;
    color: var(--text-muted);
    text-align: center;
    font-size: 1.1rem;
    user-select: none;
    line-height: 1;
}
.admin-drag-handle:active { cursor: grabbing; }
.admin-reason-row input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font-size: 0.95rem;
    font-family: inherit;
}
.admin-reason-row input:focus { outline: none; border-color: var(--secondary); }

.admin-hours { display: flex; flex-direction: column; gap: 0.5rem; }
.admin-hours-row {
    /* day | Open | "from" | start | "to" | end  (the lunch row spans beneath) */
    display: grid;
    grid-template-columns: 110px auto auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.5rem 0.6rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}
.admin-hours-row label { font-weight: 600; }
.admin-hours-row input[type="time"] {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font-family: inherit;
    background: var(--white);
    max-width: 180px;
    width: 100%;
}
.admin-hours-closed { color: var(--text-muted); font-style: italic; grid-column: 2 / 6; }
/* Optional mid-day closure ("Closed for lunch") sits on its own line under
   the open/close inputs, indented past the day name. */
.admin-hours-break {
    grid-column: 2 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
    font-size: 0.9rem;
}
.admin-hours-break input[type="time"] { width: auto; }
.admin-hours-break label { font-weight: 500; color: var(--text-muted); }
.admin-hours-break span { color: var(--text-muted); font-size: 0.85rem; }
.admin-hours-row input[type="time"]:disabled { opacity: 0.45; cursor: not-allowed; }

.admin-blockoffs { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.admin-blockoff-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}
.admin-blockoff-add {
    display: grid;
    grid-template-columns: auto auto auto 1fr auto;
    gap: 0.5rem;
    align-items: center;
}
.admin-blockoff-add input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    font-family: inherit;
}

.admin-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem 0.5rem;
}
.admin-icon-btn:hover { color: #b91c1c; }

/* ============================================================
   404 page (shared marketing + admin variants)
   ============================================================ */
.not-found-main {
    min-height: calc(100vh - 8rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.5rem;
}
.not-found-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
}
.not-found-code {
    font-size: 5rem;
    font-weight: 800;
    color: transparent;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.not-found-card h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.not-found-card p { color: var(--text-muted); margin-bottom: 1.75rem; }
.not-found-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.admin-not-found { min-height: 100vh; padding-top: 4rem; }

/* ============================================================
   Legal pages (Privacy Policy, Terms of Service)
   Plain readable typography, narrower than marketing layout
   ============================================================ */
.legal-page {
    padding: 7rem 0 4rem; /* 5rem to clear fixed nav + 2rem visual breathing room */
    background: var(--bg-light);
    color: var(--text-main);
}
.legal-container {
    max-width: 760px; /* narrower for readability */
}
.legal-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.legal-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.legal-effective {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}
.legal-section {
    margin-bottom: 2rem;
    scroll-margin-top: 6rem; /* anchored sections (#sms) clear the fixed nav */
}
.legal-section h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.legal-section h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin: 1.25rem 0 0.5rem;
}
.legal-section p,
.legal-section li {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}
.legal-section ul {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}
.legal-section ul li { margin-bottom: 0.4rem; }
.legal-section a {
    color: var(--primary);
    text-decoration: underline;
}
.legal-section a:hover { color: var(--charcoal); }
.legal-section strong { color: var(--text-main); font-weight: 600; }

@media (max-width: 540px) {
    .legal-page { padding: 6rem 0 3rem; }
    .legal-header h1 { font-size: 2rem; }
    .legal-section h2 { font-size: 1.1rem; }
}

/* ============================================================
   Admin mobile - tighten layouts for narrow viewports
   ============================================================ */
@media (max-width: 768px) {
    /* ----- Nav: wrap tabs onto a 2nd row, hide username, shrink logo ----- */
    .admin-body { padding-top: 6.5rem; } /* taller because nav now wraps to 2 rows */
    .admin-header { padding: 0.5rem 0; }
    .admin-nav-wrapper { flex-wrap: wrap; gap: 0.5rem 0.75rem; }
    .admin-logo img { height: 26px; }
    .admin-logo-tag { font-size: 0.65rem; padding: 0.1rem 0.45rem; }
    .admin-user-name { display: none; }
    .admin-nav-links {
        order: 3;
        flex-basis: 100%;
        gap: 1.25rem;
        font-size: 0.95rem;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }
    .admin-nav-links::-webkit-scrollbar { display: none; }
    .admin-nav-links a { white-space: nowrap; padding: 0.25rem 0; }

    /* ----- Page header: stack title above primary action ----- */
    .admin-page-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .admin-page-header h1 { font-size: 1.5rem; }
    .admin-page-header > .btn,
    .admin-page-header > a.btn { align-self: stretch; text-align: center; }

    /* ----- Toolbar: stack chip group / nav / search ----- */
    .admin-toolbar { padding: 0.75rem; gap: 0.5rem; }
    .admin-filter-group { width: 100%; justify-content: space-between; }
    .admin-date-nav { width: 100%; justify-content: center; }
    .admin-date-label { min-width: auto; flex: 1; text-align: center; font-size: 0.95rem; }
    .admin-search { margin-left: 0; width: 100%; }
    .admin-search input { width: 100%; min-width: 0; }

    /* ----- Appointment cards: drop forced square, allow natural height ----- */
    .admin-card { aspect-ratio: auto; min-height: 200px; }

    /* ----- Modal: near-full-screen on phones ----- */
    .admin-modal { padding: 0.5rem; }
    .admin-modal-card,
    .admin-modal-card.admin-modal-wide {
        padding: 1.5rem;
        max-width: 100%;
        max-height: 95vh;
    }
    .admin-modal-body dl { grid-template-columns: 90px 1fr; gap: 0.4rem 0.75rem; font-size: 0.9rem; }
    .admin-modal-footer { flex-direction: column-reverse; align-items: stretch; }
    .admin-modal-footer .btn { width: 100%; text-align: center; }

    /* ----- Settings sections ----- */
    .admin-settings-section { padding: 1.25rem; }
    .admin-settings-section h2 { font-size: 1.1rem; }

    /* Reasons: label full-width, id+duration+remove on row 2 */
    .admin-reason-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding: 0.5rem;
        background: var(--bg-light);
        border-radius: 0.5rem;
    }
    .admin-reason-row input { padding: 0.5rem 0.65rem; font-size: 0.95rem; }
    .admin-reason-row input[data-field="label"] { flex-basis: 100%; }
    .admin-reason-row input[data-field="id"] { flex: 1 1 50%; min-width: 0; }
    .admin-reason-row input[data-field="durationMin"] { flex: 0 0 90px; }
    .admin-reason-row .admin-icon-btn { flex: 0 0 auto; }

    /* Hours: day on its own line, open + from/to inputs on row 2 */
    .admin-hours-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem;
        background: var(--bg-light);
        border-radius: 0.5rem;
        grid-template-columns: none; /* override desktop grid */
    }
    .admin-hours-row > label:first-child {
        flex-basis: 100%;
        font-size: 0.95rem;
        color: var(--text-main);
    }
    .admin-hours-row input[type="time"] { flex: 1 1 120px; min-width: 0; }
    .admin-hours-row > span { color: var(--text-muted); font-size: 0.85rem; }
    .admin-hours-break { flex-basis: 100%; }
    .admin-hours-break label { flex-basis: 100%; }
    .admin-hours-break input[type="time"] { flex: 1 1 110px; min-width: 0; }
    .admin-logo .logo-full { display: none; }
    .admin-logo .logo-mark { display: block; height: 28px; }

    /* Block-off list rows: 3 column collapse without label */
    .admin-blockoff-row { grid-template-columns: 1fr 1fr auto; font-size: 0.9rem; }

    /* Block-off add: stack on phone */
    .admin-blockoff-add {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        grid-template-columns: none;
    }
    .admin-blockoff-add input[type="date"] { flex: 1 1 45%; min-width: 0; padding: 0.5rem 0.65rem; }
    .admin-blockoff-add > span { align-self: center; color: var(--text-muted); font-size: 0.85rem; }
    .admin-blockoff-add input[type="text"] { flex-basis: 100%; padding: 0.5rem 0.65rem; }
    .admin-blockoff-add .btn { flex-basis: 100%; }
}

@media (max-width: 540px) {
    /* Reasons fully stacked: label, id, duration+delete on three lines */
    .admin-reason-row { gap: 0.35rem; }
    .admin-reason-row input[data-field="id"] { flex-basis: 100%; }
    .admin-reason-row input[data-field="durationMin"] { flex: 1; }

    /* Modal padding even tighter */
    .admin-modal-card,
    .admin-modal-card.admin-modal-wide { padding: 1.25rem; }

    /* Smaller card min-height */
    .admin-card { min-height: 180px; padding: 1rem; }
    .admin-card-name { font-size: 1.1rem; }
}
