/* ==========================================================================
   AUGENPARTNER LIMMATTAL AG - MOBILE-FIRST & DESKTOP DESIGN SYSTEM
   Adapted to Official Augenpartner Altstetten (http://127.0.0.1:8080/)
   Official Brand Color: #004b91
   ========================================================================== */

:root {
    --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

    /* Official Augenpartner Blue (from Altstetten) */
    --color-brand: #004b91;          /* --tief */
    --color-brand-dark: #003a71;     /* --tief-dunkel */
    --color-brand-light: #e8f2fa;    /* --himmel-hell */
    --color-brand-sky: #2382c3;      /* --himmel */

    /* Neutrals & Surfaces */
    --color-navy-950: #0c1e21;       /* --text */
    --color-navy-900: #0c1e21;
    --color-slate-800: #0c1e21;      /* main text */
    --color-slate-700: #2d3e42;
    --color-slate-600: #4a5a5e;      /* --text-leise */
    --color-slate-500: #4a5a5e;
    --color-slate-300: #cfe0ee;      /* hover border */
    --color-slate-200: #e2eaef;      /* --linie */
    --color-slate-100: #f4f8fb;      /* --flaeche (page/section bg) */
    --color-slate-50:  #f8fafc;
    --color-white:     #ffffff;

    /* Functional */
    --color-green: #28af78;          /* --gruen */
    --color-green-light: #e6f6ef;    /* --gruen-hell */
    --color-red: #b3261e;            /* --warn */
    --color-red-light: #fdeceb;      /* --warn-hell */

    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;

    /* Altstetten Authentic Shadows */
    --shadow-sm: 0 1px 2px rgba(12, 30, 33, .04), 0 10px 28px -18px rgba(12, 30, 33, .25);
    --shadow-md: 0 2px 4px rgba(12, 30, 33, .05), 0 22px 44px -22px rgba(12, 30, 33, .35);
    --shadow-lg: 0 4px 8px rgba(12, 30, 33, .06), 0 28px 56px -24px rgba(12, 30, 33, .45);
    --shadow-btn: 0 10px 22px -14px rgba(0, 75, 145, 0.9);
    --shadow-btn-hover: 0 14px 26px -14px rgba(0, 75, 145, 0.95);
    --shadow-glass: 0 12px 32px rgba(0, 0, 0, 0.25);
}

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

html, body {
    min-height: 100%;
    font-family: var(--font-body);
    color: var(--color-slate-800);
    background-color: var(--color-slate-100);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   OFFICIAL BRAND HEADER & EMBLEM (augenzentrum-dietikon.ch)
   ========================================================================== */
.site-header-clean {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-slate-200);
    padding: 12px 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.32em;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy-950);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.brand-suffix {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy-950);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.header-right-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch-wrap {
    display: inline-flex;
    align-items: center;
    background: var(--color-slate-100);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-full);
    padding: 2px 4px;
    gap: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-slate-600);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    transition: all 0.15s ease;
}

.lang-btn:hover {
    color: var(--color-brand);
}

.lang-btn.active {
    background: var(--color-white);
    color: var(--color-brand);
    box-shadow: 0 1px 3px rgba(0, 75, 145, 0.18);
    font-weight: 700;
}

.emergency-pill-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-red-light);
    border: 1px solid rgba(179, 38, 30, 0.25);
    color: var(--color-red);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.red-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-red);
}

/* ==========================================================================
   DESKTOP BANNER (OPTIONS 1, 2, 3)
   ========================================================================== */
.main-content-section {
    padding: 24px 0 40px;
}

.desktop-hero-banner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    background: var(--color-white);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
}

.banner-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.2vw, 2.1rem);
    font-weight: 700;
    color: var(--color-navy-950);
    line-height: 1.2;
    margin-bottom: 8px;
}

.banner-desc {
    font-size: 0.95rem;
    color: var(--color-slate-600);
    line-height: 1.5;
}

.desktop-hero-banner > div {
    min-width: 0;
}

.banner-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-slate-200);
    position: relative;
}

.banner-image-wrap .rotator-img,
.banner-image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.banner-image-wrap .rotator-img.active,
.banner-image-wrap img.active {
    opacity: 1;
}

/* ==========================================================================
   THE 4 PRACTICE CARDS (Dietikon, Berikon, Spreitenbach, Altstetten)
   ========================================================================== */
.practices-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.practice-card-box {
    background: var(--color-white);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-lg);
    padding: 18px 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s cubic-bezier(.4, 0, .2, 1), box-shadow 0.18s cubic-bezier(.4, 0, .2, 1), border-color 0.18s ease;
}

/* Shared rows across sibling cards; flex column above is the non-subgrid fallback */
@supports (grid-template-rows: subgrid) {
    .practice-card-box {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: subgrid;
        grid-row: span 6;
        row-gap: 0;
    }

    .practice-card-box > div:first-child {
        display: contents;
    }

    .practice-card-box .practice-name {
        min-height: 0;
    }
}

.practice-card-box:hover {
    border-color: var(--color-slate-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 8px;
    margin-bottom: 8px;
}

/* In the 4-column layout the cards are too narrow for tag + status on one
   line in every language, so stack them uniformly — all cards flip in sync */
@media (min-width: 1100px) {
    .card-top-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

.location-tag {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-brand);
    background: var(--color-brand-light);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.status-open {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-green);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-blue {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-brand-sky);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-lunch {
    font-size: 0.74rem;
    font-weight: 700;
    color: #d97706;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-coming-soon {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--color-brand);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-open, .status-blue, .status-lunch, .status-coming-soon {
    white-space: nowrap;
}

.practice-name {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--color-navy-950);
    line-height: 1.25;
    margin-bottom: 4px;
    min-height: 2.5em;
}

.name-locality {
    display: block;
}

.practice-address {
    font-size: 0.84rem;
    color: var(--color-slate-600);
    margin-bottom: 16px;
}

/* Phone Touch Button */
.phone-touch-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-white);
    border: 1px solid var(--color-slate-300);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 14px;
    color: var(--color-navy-950);
    transition: all 0.18s ease;
}

.phone-touch-btn:hover {
    background: var(--color-brand-light);
    border-color: var(--color-brand-sky);
}

.phone-meta-left {
    display: flex;
    flex-direction: column;
}

.phone-sublabel {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-brand);
    text-transform: uppercase;
}

.phone-value {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--color-navy-950);
    white-space: nowrap;
}

.phone-icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-brand);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s ease;
}

.phone-touch-btn:hover .phone-icon-circle {
    background: var(--color-brand-dark);
}

/* Opening Hours */
.hours-container {
    background: var(--color-slate-100);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

.hours-head {
    font-weight: 700;
    color: var(--color-navy-900);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hours-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    color: var(--color-slate-700);
    margin-top: 2px;
}

.hours-line > :nth-child(2) {
    text-align: right;
}

.nobr {
    white-space: nowrap;
}

/* Booking Actions */
.card-bottom-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.btn-online-booking {
    background: var(--color-brand);
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 12px 18px;
    border-radius: var(--radius-full);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.18s cubic-bezier(.4, 0, .2, 1);
    box-shadow: var(--shadow-btn);
}

.btn-online-booking:hover {
    background: var(--color-brand-dark);
    box-shadow: var(--shadow-btn-hover);
    transform: translateY(-1px);
}

.btn-practice-site {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-brand);
    text-align: center;
    padding: 4px 0;
    transition: color 0.15s ease;
}

.btn-practice-site:hover {
    color: var(--color-brand-dark);
    text-decoration: underline;
}

/* ==========================================================================
   MOBILE QUICK-INTRO & LOCATION CHIPS
   ========================================================================== */
/* Quick-Jump Location Chips (Hidden on desktop, shown on mobile) */
.mobile-quick-intro {
    display: none;
}

.mobile-location-chips {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.loc-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #E2E8F0;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.18s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loc-chip:hover, .loc-chip:active {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: #FFFFFF;
}

/* Light Theme Location Chips (Options 1, 2, 3) */
.mobile-quick-intro .mobile-location-chips .loc-chip {
    background: var(--color-brand-light);
    border: 1px solid var(--color-slate-300);
    color: var(--color-brand);
}

.mobile-quick-intro .mobile-location-chips .loc-chip:hover,
.mobile-quick-intro .mobile-location-chips .loc-chip:active {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: #FFFFFF;
}

@keyframes cardPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(0, 75, 145, 0); }
    50% { transform: scale(1.02); box-shadow: 0 0 24px rgba(0, 75, 145, 0.6); border-color: var(--color-brand-sky); }
    100% { transform: scale(1); }
}

.card-highlight-pulse {
    animation: cardPulse 0.8s ease-out;
}

/* Footer */
.footer-compact {
    background: var(--color-white);
    border-top: 1px solid var(--color-slate-200);
    padding: 16px 0;
    font-size: 0.78rem;
    color: var(--color-slate-500);
    margin-top: 30px;
}

.footer-compact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ==========================================================================
   LEGAL / SUBPAGE STYLES (IMPRESSUM & DATENSCHUTZ)
   ========================================================================== */
.legal-container {
    max-width: 860px;
    margin: 28px auto 40px;
}

.legal-card {
    background: var(--color-white);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    box-shadow: var(--shadow-sm);
}

.legal-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-slate-200);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--color-brand);
    margin-bottom: 14px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.back-link:hover {
    color: var(--color-brand-dark);
    transform: translateX(-2px);
}

.legal-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: var(--color-navy-950);
    line-height: 1.2;
    margin-bottom: 6px;
}

.legal-subtitle {
    font-size: 0.95rem;
    color: var(--color-slate-600);
}

.legal-section {
    margin-bottom: 28px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy-950);
    margin-bottom: 10px;
}

.legal-section h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--color-navy-900);
    margin-top: 14px;
    margin-bottom: 6px;
}

.legal-section p {
    font-size: 0.92rem;
    color: var(--color-slate-700);
    line-height: 1.6;
    margin-bottom: 10px;
}

.legal-section ul {
    margin-left: 20px;
    margin-bottom: 12px;
    font-size: 0.92rem;
    color: var(--color-slate-700);
    line-height: 1.6;
}

.legal-section li {
    margin-bottom: 6px;
}

.legal-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 14px;
}

.legal-box-item {
    background: var(--color-slate-100);
    border: 1px solid var(--color-slate-200);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.legal-box-item strong {
    color: var(--color-navy-950);
    display: block;
    margin-bottom: 4px;
}

/* ==========================================================================
   TABLET / MID-WIDTH RULES (769px – 1099px: 2x2 card grid, condensed banner)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1099px) {
    .practices-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .desktop-hero-banner {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 20px;
        padding: 20px 22px;
    }
}

@media (max-width: 980px) {
    .emergency-pill-top {
        display: none;
    }
}

/* ==========================================================================
   MOBILE-FIRST RULES (ZERO FLUFF, MAXIMUM SPEED & ACCESSIBILITY)
   ========================================================================== */
@media (max-width: 768px) {
    /* Hide decorative hero banner on mobile so 3 practice boxes are immediately visible */
    .desktop-hero-banner {
        display: none !important;
    }

    /* Brand Header on mobile */
    .site-header-clean {
        padding: 8px 0;
    }

    .brand-icon-img {
        width: 36px;
        height: 36px;
    }

    .brand-name {
        font-size: 1.1rem;
    }

    .brand-suffix {
        font-size: 1.1rem;
    }

    .header-right-meta {
        gap: 8px;
    }

    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Intro header on Mobile (Light Options 1, 2, 3) */
    .mobile-quick-intro {
        display: block;
        text-align: center;
        padding: 10px 14px 16px;
        max-width: 340px;
        margin: 0 auto;
    }

    .mobile-location-chips {
        display: flex;
    }

    .mobile-quick-intro h1 {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--color-navy-950);
        margin-bottom: 6px;
        letter-spacing: -0.02em;
        line-height: 1.25;
    }

    .mobile-quick-intro p {
        font-size: 0.84rem;
        color: var(--color-slate-600);
        line-height: 1.45;
        margin-bottom: 4px;
    }

    /* Practice Cards on Mobile: Vertical Stack with clear tap zones */
    .practices-grid-4 {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .practice-card-box {
        padding: 18px 16px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        scroll-margin-top: 20px;
    }

    .practice-name {
        font-size: 1.22rem;
        font-weight: 700;
        margin-bottom: 3px;
        letter-spacing: -0.01em;
    }

    .practice-address {
        font-size: 0.84rem;
        margin-bottom: 14px;
    }

    /* Thumb-friendly Click-to-Call */
    .phone-touch-btn {
        padding: 11px 14px;
        margin-bottom: 14px;
        min-height: 50px;
        border-radius: var(--radius-md);
    }

    .phone-sublabel {
        font-size: 0.7rem;
    }

    .phone-value {
        font-size: 1.08rem;
        font-weight: 700;
        letter-spacing: 0.02em;
    }

    .phone-icon-circle {
        width: 34px;
        height: 34px;
    }

    /* Hours Container */
    .hours-container {
        padding: 12px 14px;
        font-size: 0.8rem;
        margin-bottom: 16px;
        border-radius: var(--radius-sm);
    }

    .hours-head {
        font-size: 0.76rem;
        margin-bottom: 8px;
    }

    .hours-line {
        margin-bottom: 5px;
    }

    /* Primary & Secondary Action Buttons */
    .card-bottom-actions {
        gap: 10px;
    }

    .btn-online-booking {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 0.92rem;
        font-weight: 600;
        border-radius: var(--radius-full);
        box-shadow: var(--shadow-btn);
    }

    .btn-practice-site {
        font-size: 0.82rem;
        padding: 8px;
    }

    .footer-compact-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        font-size: 0.74rem;
    }

    /* Legal Pages Mobile: Stack Cards Vertically */
    .legal-card {
        padding: 22px 18px;
        border-radius: var(--radius-md);
    }

    .legal-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
}
