/*
 * Immobilien Venerandi – Header 3.1
 * Zweizeilig, kompakt, mehrsprachig und responsiv
 */

.vd-header {
    --vd-cream: #faf8f3;
    --vd-white: #ffffff;
    --vd-green: #17352c;
    --vd-gold: #b68b49;
    --vd-line: rgba(23, 53, 44, .13);
    --vd-header-max: 1480px;

    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 248, 243, .97);
    border-bottom: 1px solid var(--vd-line);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .035);
    backdrop-filter: blur(12px);
}

/* Obere, bewusst niedrige Zeile */
.vd-header-utility {
    border-bottom: 1px solid rgba(23, 53, 44, .08);
}

.vd-header-utility-inner,
.vd-header-main-inner {
    width: min(calc(100% - 32px), var(--vd-header-max));
    margin: 0 auto;
}

.vd-header-utility-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Hauptzeile: Marke und Navigation */
.vd-header-main-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.2vw, 42px);
}

.vd-language-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    font: 700 .69rem/1 Arial, Helvetica, sans-serif;
    letter-spacing: .075em;
}

.vd-language-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 29px;
    height: 24px;
    padding: 0 6px;
    color: var(--vd-green);
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    transition:
        color .2s ease,
        border-color .2s ease,
        background-color .2s ease;
}

.vd-language-switcher a:hover,
.vd-language-switcher a.is-active {
    color: var(--vd-gold);
    border-color: rgba(182, 139, 73, .58);
    background: rgba(182, 139, 73, .06);
}

/* Suche */
.vd-header .vd-search {
    width: 220px;
    height: 31px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(23, 53, 44, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
}

.vd-header .vd-search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--vd-green);
    font: .82rem Arial, Helvetica, sans-serif;
}

.vd-header .vd-search button {
    width: 38px;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-left: 1px solid rgba(23, 53, 44, .10);
    background: rgba(255, 255, 255, .64);
    color: var(--vd-green);
    cursor: pointer;
    font-size: 1rem;
}

/* Markenblock */
.vd-header .vd-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    color: var(--vd-green);
    text-decoration: none;
}

.vd-header .vd-brand-mark {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    display: grid;
    place-items: center;
    border: 4px solid var(--vd-gold);
    border-radius: 50%;
    color: var(--vd-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.45rem;
    font-weight: 700;
    line-height: 1;
}

.vd-header .vd-brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.vd-header .vd-brand-copy strong {
    display:block;
    margin:0;
    color:var(--vd-green);
    font-family:Georgia,"Times New Roman",serif;

    /* endgültige Größe */
    font-size:clamp(1.58rem,1.82vw,2.12rem);

    font-weight:600;
    line-height:1.02;
    letter-spacing:-0.02em;
    white-space:nowrap;
}

.vd-header .vd-brand-copy small {

    margin-top:3px;

    color:var(--vd-gold);

    font-size:.76rem;

    font-weight:700;

    letter-spacing:.055em;

    text-transform:uppercase;

    white-space:nowrap;
}

/*
 * Deutsche Wortmarke:
 * Beide Zeilen erhalten dieselbe feste Breite.
 * text-align-last:justify zieht den Claim exakt bis zur rechten Kante.
 */
.vd-header[data-language="de"] .vd-brand-copy {
    width: 350px;
}

.vd-header[data-language="de"] .vd-brand-copy small {
    width: 100%;
    text-align: justify;
    text-align-last: justify;
}

/* Navigation */
.vd-header .vd-main-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(14px, 1.55vw, 25px);
    min-width: 0;
    margin-left: auto;
}

.vd-header .vd-main-nav > a {
    position: relative;
    padding: 10px 0 8px;
    color: var(--vd-green);
    font: 700 .77rem/1.1 Arial, Helvetica, sans-serif;
    letter-spacing: .075em;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
}

.vd-header .vd-main-nav > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--vd-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
}

.vd-header .vd-main-nav > a:hover,
.vd-header .vd-main-nav > a.is-active {
    color: var(--vd-gold);
}

.vd-header .vd-main-nav > a:hover::after,
.vd-header .vd-main-nav > a.is-active::after {
    transform: scaleX(1);
}

/* Menüknopf wird auf Desktop ausgeblendet */
.vd-header .vd-menu-toggle {
    display: none;
}

/* Mittlere Desktopbreiten */
@media (max-width: 1280px) {
    .vd-header-main-inner {
        gap: 20px;
    }

    .vd-header .vd-main-nav {
        gap: 14px;
    }

    .vd-header .vd-main-nav > a {
        font-size: .71rem;
        letter-spacing: .055em;
    }

    .vd-header[data-language="de"] .vd-brand-copy {
        width: 330px;
    }

    .vd-header .vd-brand-copy strong {
        font-size: 1.95rem;
    }

    .vd-header .vd-brand-copy small {
        font-size: .62rem;
    }
}

/* Tablet und mobile Navigation */
@media (max-width: 1020px) {
    .vd-header-utility-inner,
    .vd-header-main-inner {
        width: min(calc(100% - 26px), var(--vd-header-max));
    }

    .vd-header-main-inner {
        min-height: 74px;
        position: relative;
    }

    .vd-header .vd-search {
        width: 38px;
        height: 30px;
    }

    .vd-header .vd-search input[type="search"] {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        opacity: 0;
        pointer-events: none;
    }

    .vd-header .vd-search button {
        width: 100%;
        border-left: 0;
    }

    .vd-header .vd-menu-toggle {
        width: 44px;
        height: 44px;
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        padding: 0;
        border: 1px solid var(--vd-line);
        border-radius: 12px;
        background: transparent;
        cursor: pointer;
    }

    .vd-header .vd-menu-toggle > span:not(.vd-sr-only) {
        width: 22px;
        height: 2px;
        display: block;
        border-radius: 2px;
        background: var(--vd-green);
        transition: .22s ease;
    }

    .vd-header .vd-main-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 1px);
        z-index: 20;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 18px 18px;
        background: var(--vd-white);
        border: 1px solid var(--vd-line);
        border-radius: 0 0 18px 18px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, .10);
    }

    .vd-header .vd-main-nav.open {
        display: flex;
    }

    .vd-header .vd-main-nav > a {
        padding: 12px 4px;
        border-bottom: 1px solid rgba(23, 53, 44, .08);
    }
}

@media (max-width: 680px) {
    .vd-header-utility-inner {
        min-height: 32px;
    }

    .vd-language-switcher {
        gap: 0;
        font-size: .66rem;
    }

    .vd-language-switcher a {
        min-width: 27px;
        height: 23px;
        padding: 0 5px;
    }

    .vd-header .vd-brand {
        gap: 10px;
    }

    .vd-header .vd-brand-mark {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        border-width: 3px;
        font-size: 2rem;
    }

    .vd-header[data-language="de"] .vd-brand-copy {
        width: 275px;
    }

    .vd-header .vd-brand-copy strong {
        font-size: 1.62rem;
    }

    .vd-header .vd-brand-copy small {
        margin-top: 6px;
        font-size: .52rem;
        letter-spacing: .07em;
    }
}

@media (max-width: 470px) {
    .vd-header-main-inner {
        min-height: 66px;
    }

    .vd-header .vd-brand-mark {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        font-size: 1.7rem;
    }

    .vd-header[data-language="de"] .vd-brand-copy,
    .vd-header .vd-brand-copy {
        width: auto;
    }

    .vd-header .vd-brand-copy strong {
        font-size: 1.34rem;
    }

    .vd-header .vd-brand-copy small {
        display: none;
    }

    .vd-header .vd-menu-toggle {
        width: 40px;
        height: 40px;
    }
}
