/**
 * Accessible Branding & Two-Tier Header Styles for Anna Scherer - Praxis für Psychotherapie und Psychoanalyse
 */

/* Google Font: Cormorant Garamond for elegant, classical serif brand title */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&display=swap');

.navbar-mainnavigation .navbar-brand-practice {
    display: inline-flex;
    align-items: center;
    gap: clamp(0.85rem, 2.5vw, 1.5rem);
    text-decoration: none;
    color: inherit;
    padding: 0.35rem 0;
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
    transition: opacity 0.2s ease-in-out;
}

.navbar-mainnavigation .navbar-brand-practice:hover {
    text-decoration: none;
    opacity: 0.92;
}

/* Accessible focus indicator (WCAG 2.4.7 / 2.4.11) */
.navbar-mainnavigation .navbar-brand-practice:focus {
    outline: none;
}

.navbar-mainnavigation .navbar-brand-practice:focus-visible {
    outline: 3px solid var(--bs-primary, #4a6356);
    outline-offset: 5px;
    border-radius: 6px;
}

/* Logo Image Container & Image */
.navbar-mainnavigation .navbar-brand-practice .navbar-brand-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-mainnavigation .navbar-brand-practice .navbar-brand-logo-img {
    display: block;
    width: auto;
    height: auto;
    max-height: clamp(44px, 7vw, 84px);
    object-fit: contain;
}

/* Brand Text Block */
.navbar-mainnavigation .navbar-brand-practice .navbar-brand-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

/* Brand Title: Anna Scherer */
.navbar-mainnavigation .navbar-brand-practice .navbar-brand-name {
    display: block;
    font-family: "Cormorant Garamond", "Palatino Linotype", "Palatino", "Georgia", serif;
    font-size: clamp(1rem, 3vw, 2.2rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.05em;
    color: var(--bs-dark, #26362d);
    text-transform: uppercase;
}

/* Brand Subtitle: Praxis für Psychotherapie und Psychoanalyse */
.navbar-mainnavigation .navbar-brand-practice .navbar-brand-desc {
    display: block;
    font-family: var(--bs-font-sans-serif, "Source Sans Pro", system-ui, -apple-system, sans-serif);
    font-size: clamp(0.58rem, 1.3vw, 0.92rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: clamp(0.06em, 1.2vw, 0.12em);
    text-transform: uppercase;
    color: var(--bs-secondary, #594c42);
    margin-top: 0.2rem;
}

/* ==========================================================================
   Two-Tier Header Layout:
   - Row 1 (.navbar-header-row): Brand (left) + Burger Toggler (right)
     -> Guaranteed single row on mobile; burger menu CANNOT break out downwards!
   - Row 2 (.navbar-menu-row): Dedicated main navigation row
   ========================================================================== */

.navbar-mainnavigation {
    padding-top: 0.75rem !important;
    padding-bottom: 0 !important;
}

.navbar-mainnavigation > .container,
.navbar-mainnavigation > .container-fluid {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

/* Row 1: Brand & Toggler */
.navbar-mainnavigation .navbar-header-row {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.navbar-mainnavigation .navbar-header-row .navbar-brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0.25rem 0 !important;
}

.navbar-mainnavigation .navbar-header-row .navbar-toggler {
    flex: 0 0 auto !important;
    margin-left: 0.75rem !important;
    padding: 0.35rem 0.5rem !important;
    align-self: center !important;
}

/* Row 2: Navigation Menu */
.navbar-mainnavigation .navbar-menu-row {
    width: 100% !important;
}

/* Mobile & Tablet (< 992px): Menu drops down on click below Row 1 */
@media (max-width: 991.98px) {
    .navbar-mainnavigation .navbar-menu-row {
        padding: 0.75rem 0 0.5rem 0 !important;
    }
}

/* Desktop (>= 992px): Brand on Row 1, Navigation menu on Row 2, toggler hidden */
@media (min-width: 992px) {
    .navbar-mainnavigation .navbar-header-row {
        margin-bottom: 0.5rem !important;
    }
    .navbar-mainnavigation .navbar-header-row .navbar-toggler {
        display: none !important;
    }
    .navbar-mainnavigation .navbar-menu-row {
        display: flex !important;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        padding: 0.35rem 0 0.5rem 0 !important;
    }
    .navbar-mainnavigation .navbar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin-left: -0.5rem;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .navbar-mainnavigation .navbar-brand-practice {
        transition: none;
    }
}

/* High contrast preference support */
@media (prefers-contrast: more) {
    .navbar-mainnavigation .navbar-brand-practice .navbar-brand-name {
        color: #000000;
        font-weight: 600;
    }
    .navbar-mainnavigation .navbar-brand-practice .navbar-brand-desc {
        color: #2c221c;
        font-weight: 600;
    }
    .navbar-mainnavigation .navbar-brand-practice:focus-visible {
        outline: 4px solid #000000;
    }
}

/* Mobile fine-tuning (< 576px) */
@media (max-width: 575.98px) {
    .navbar-mainnavigation .navbar-brand-practice {
        gap: 0.85rem;
    }
    .navbar-mainnavigation .navbar-brand-practice .navbar-brand-logo-img {
        max-height: 48px;
    }
    .navbar-mainnavigation .navbar-brand-practice .navbar-brand-name {
        font-size: clamp(0.95rem, 4.4vw, 1.35rem);
        letter-spacing: 0.03em;
    }
    .navbar-mainnavigation .navbar-brand-practice .navbar-brand-desc {
        font-size: clamp(0.52rem, 2.3vw, 0.68rem);
        letter-spacing: 0.06em;
    }
}
