/* ==========================================================
   ZKR REAL ESTATE — HEADER
   Desktop + Sticky + Mobile + Location Dropdown
   ========================================================== */


/* ==========================================================
   VARIABLES
   ========================================================== */

:root {
    --zkr-header-paper: #f4f2ed;
    --zkr-header-ink: #0b0b0b;
    --zkr-header-light: #f4f2ed;
}


/* ==========================================================
   HEADER BASE
   ========================================================== */

.zkr-site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    z-index: 9990;

    width: 100%;

    background: transparent;
    color: var(--zkr-header-light);

    transition:
        background .35s ease,
        color .35s ease,
        border-color .35s ease,
        box-shadow .35s ease;

    overflow: visible;
}


/* WordPress admin bar */

body.admin-bar .zkr-site-header {
    top: 32px;
}


/* ==========================================================
   HEADER INNER
   ========================================================== */

.zkr-header-inner {
    position: relative;

    width: min(calc(100% - 80px), 1600px);
    min-height: 86px;

    margin: 0 auto;

    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);

    align-items: center;

    gap: 35px;

    overflow: visible;
}


/* ==========================================================
   BRAND
   ========================================================== */

.zkr-header-brand {
    position: relative;

    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;

    width: max-content;

    color: inherit;
    text-decoration: none;

    z-index: 3;
}


.zkr-header-logo {
    display: block;

    margin: 0;

    font-family:
        "Didot",
        "Bodoni MT",
        "Times New Roman",
        serif;

    font-size: 28px;
    font-weight: 400;
    font-style: italic;

    line-height: .95;
    letter-spacing: -.03em;

    white-space: nowrap;

    color: inherit;
}


.zkr-header-tagline {
    display: block;

    margin-top: 7px;

    font-size: 7px;
    font-weight: 400;
    line-height: 1;

    letter-spacing: .02em;

    color: inherit;

    opacity: .72;
}


/* ==========================================================
   DESKTOP NAVIGATION
   ========================================================== */

.zkr-header-nav {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: clamp(24px, 2.4vw, 44px);

    height: 100%;

    overflow: visible;
}


.zkr-header-nav > a,
.zkr-header-location__parent {
    position: relative;

    display: inline-flex;
    align-items: center;

    margin: 0;
    padding: 10px 0;

    border: 0;

    background: transparent;

    font-family: inherit;
    font-size: 9px;
    font-weight: 500;
    line-height: 1;

    letter-spacing: .08em;

    text-transform: uppercase;
    text-decoration: none;

    white-space: nowrap;

    color: inherit;

    cursor: pointer;

    opacity: .82;

    transition:
        opacity .2s ease;
}


.zkr-header-nav > a:hover,
.zkr-header-location__parent:hover {
    opacity: 1;
}


/* Ligne subtile au hover */

.zkr-header-nav > a::after {
    content: "";

    position: absolute;

    left: 0;
    right: 100%;
    bottom: 3px;

    height: 1px;

    background: currentColor;

    transition:
        right .25s ease;
}


.zkr-header-nav > a:hover::after {
    right: 0;
}


/* ==========================================================
   CONTACT
   ========================================================== */

.zkr-header-contact {
    justify-self: end;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 112px;

    padding: 16px 24px;

    border:
        1px solid
        rgba(255, 255, 255, .48);

    border-radius: 999px;

    color: inherit;
    text-decoration: none;

    font-size: 9px;
    font-weight: 500;
    line-height: 1;

    letter-spacing: .10em;
    text-transform: uppercase;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}


@media (hover: hover) {

    .zkr-header-contact:hover {
        background: var(--zkr-header-light);
        color: var(--zkr-header-ink);

        border-color: var(--zkr-header-light);

        transform: translateY(-1px);
    }

}


/* ==========================================================
   HOME — HEADER AU-DESSUS DU HERO
   ========================================================== */

body.home .zkr-site-header:not(.is-scrolled) {
    background: transparent;

    color: var(--zkr-header-light);

    border-bottom:
        1px solid
        rgba(255, 255, 255, .08);
}


body.home
.zkr-site-header:not(.is-scrolled)
.zkr-header-contact {
    border-color:
        rgba(255, 255, 255, .48);
}


/* ==========================================================
   HEADER SCROLLÉ
   ========================================================== */


/* ==========================================================
   PAGES INTERNES
   ========================================================== */

body:not(.home)
.zkr-site-header {
    background:
        rgba(244, 242, 237, .96);

    color: var(--zkr-header-ink);

    border-bottom:
        1px solid
        rgba(11, 11, 11, .10);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


body:not(.home)
.zkr-site-header
.zkr-header-contact {
    border-color:
        rgba(11, 11, 11, .28);
}


@media (hover: hover) {

    body:not(.home)
    .zkr-site-header
    .zkr-header-contact:hover {
        background:
            var(--zkr-header-ink);

        color:
            var(--zkr-header-paper);

        border-color:
            var(--zkr-header-ink);
    }

}


/* ==========================================================
   LOCATION — DESKTOP GROUP
   Compatible avec DIV ou DETAILS
   ========================================================== */

.zkr-header-location {
    position: relative;

    display: flex;
    align-items: center;

    height: 100%;

    margin: 0;
    padding: 0;

    overflow: visible;
}


/* DETAILS — suppression du marqueur natif */


/* LOCATION */

.zkr-header-nav
.zkr-header-location__parent {
    gap: 5px;
}


/* On neutralise la ligne hover des autres liens */

.zkr-header-location__parent::before {
    display: none;
}


/* Petite flèche */

.zkr-header-nav
.zkr-header-location__parent::after {
    content: "⌄";

    position: static;

    display: inline-block;

    width: auto;
    height: auto;

    margin: 0 0 0 4px;

    background: none;

    font-size: 8px;
    line-height: 1;

    opacity: .55;

    transform: translateY(-1px);

    transition:
        transform .2s ease;
}


/* ==========================================================
   LOCATION — DROPDOWN
   ========================================================== */

.zkr-header-location__dropdown {
    position: absolute;

    top: calc(100% - 4px);
    left: 50%;

    z-index: 99999;

    min-width: 190px;

    padding: 7px;

    background: var(--zkr-header-paper);

    border:
        1px solid
        rgba(11, 11, 11, .10);

    box-shadow:
        0 20px 55px
        rgba(0, 0, 0, .12);


    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform:
        translateX(-50%)
        translateY(-5px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}


/* Pont invisible pour ne pas perdre le hover */

.zkr-header-location__dropdown::before {
    content: "";

    position: absolute;

    top: -18px;
    left: 0;
    right: 0;

    height: 18px;
}


/* ==========================================================
   LOCATION — LIENS
   ========================================================== */

.zkr-header-nav
.zkr-header-location__dropdown
> a {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin: 0;
    padding: 12px 13px;

    border: 0;

    background: transparent;

    color: var(--zkr-header-ink);

    font-size: 9px;
    font-weight: 500;
    line-height: 1.2;

    letter-spacing: .08em;

    text-transform: uppercase;
    text-decoration: none;

    white-space: nowrap;

    opacity: .62;

    transition:
        background .2s ease,
        opacity .2s ease;
}


/* On neutralise les pseudo-éléments du menu principal */

.zkr-header-nav
.zkr-header-location__dropdown
> a::before {
    display: none;
}


.zkr-header-nav
.zkr-header-location__dropdown
> a::after {
    content: "↗";

    position: static;

    display: inline-block;

    width: auto;
    height: auto;

    margin-left: 22px;

    background: none;

    font-size: 10px;

    opacity: .45;

    transform: none;
}


/* ==========================================================
   LOCATION — OUVERTURE
   ========================================================== */


/* OUVERTURE AU SURVOL */

.zkr-header-location:hover
.zkr-header-location__dropdown,

.zkr-header-location:focus-within
.zkr-header-location__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform:
        translateX(-50%)
        translateY(0);
}


/* Rotation de la petite flèche */

.zkr-header-location:hover
.zkr-header-location__parent::after,

.zkr-header-location:focus-within
.zkr-header-location__parent::after {
    transform:
        translateY(-1px)
        rotate(180deg);
}


/* Hover Kuala Lumpur */

.zkr-header-location__dropdown
> a:hover {
    opacity: 1;

    background:
        rgba(11, 11, 11, .05);
}




/* ==========================================================
   MOBILE MENU BUTTON
   ========================================================== */

.zkr-mobile-menu-button {
    display: none;
    justify-self: end;

    margin: 0;
    padding: 12px 0;

    border: 0;
    background: transparent;

    color: inherit;

    font-family: inherit;
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: .12em;
    text-transform: uppercase;

    cursor: pointer;
    z-index: 10002;
}

body.zkr-menu-open {
    overflow: hidden;
}


/* ==========================================================
   MOBILE FULLSCREEN MENU
   ========================================================== */

.zkr-mobile-menu {
    position: fixed;

    inset: 0;

    z-index: 9999;

    display: flex;

    background: #0b0b0b;
    color: #f4f2ed;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-8px);

    transition:
        opacity .3s ease,
        visibility .3s ease,
        transform .3s ease;
}


.zkr-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateY(0);
}


.zkr-mobile-menu-inner {
    width: 100%;
    min-height: 100%;

    padding:
        110px
        30px
        45px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow-y: auto;
}


/* ==========================================================
   MOBILE NAVIGATION
   ========================================================== */

.zkr-mobile-navigation {
    width: 100%;

    display: flex;
    flex-direction: column;
}


.zkr-mobile-navigation > a,
.zkr-mobile-location-parent {
    position: relative;

    display: grid;

    grid-template-columns:
        45px
        1fr;

    align-items: center;

    width: 100%;

    padding: 17px 0;

    border-bottom:
        1px solid
        rgba(244, 242, 237, .15);

    color: #f4f2ed;

    text-decoration: none;

    font-family:
        "Didot",
        "Bodoni MT",
        "Times New Roman",
        serif;

    font-size: clamp(34px, 10vw, 56px);
    font-weight: 400;
    line-height: .95;

    letter-spacing: -.025em;

    text-transform: uppercase;
}


.zkr-mobile-navigation
> a
> span,

.zkr-mobile-location-parent
> span {
    align-self: start;

    padding-top: 5px;

    font-family: inherit;

    font-size: 8px;
    font-weight: 400;

    line-height: 1;

    letter-spacing: .12em;

    color:
        rgba(244, 242, 237, .40);
}


/* ==========================================================
   MOBILE — LOCATION SUBNAV
   ========================================================== */

.zkr-mobile-location-subnav {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding:
        14px
        0
        16px
        45px;

    border-bottom:
        1px solid
        rgba(244, 242, 237, .15);
}


.zkr-mobile-navigation
.zkr-mobile-location-subnav
> a {
    display: inline-flex;
    align-items: center;

    width: max-content;

    margin: 0;
    padding: 0;

    border: 0;

    color: #f4f2ed;

    text-decoration: none;
    text-transform: uppercase;

    font-family: inherit;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;

    letter-spacing: .10em;

    opacity: .46;

    transition:
        opacity .2s ease,
        transform .2s ease;
}


.zkr-mobile-navigation
.zkr-mobile-location-subnav
> a::before {
    content: "—";

    margin-right: 9px;

    opacity: .50;
}


@media (hover: hover) {

    .zkr-mobile-navigation
    .zkr-mobile-location-subnav
    > a:hover {
        opacity: 1;

        transform:
            translateX(3px);
    }

}


/* ==========================================================
   TABLET / MOBILE
   ========================================================== */

@media (max-width: 980px) {

    .zkr-header-inner {
        width: calc(100% - 42px);
        min-height: 72px;

        grid-template-columns:
            1fr
            auto;

        gap: 20px;
    }


    .zkr-header-nav,
    .zkr-header-contact {
        display: none;
    }


    .zkr-mobile-menu-button {
        display: block;
    }


    .zkr-header-logo {
        font-size: 23px;
    }


    .zkr-header-tagline {
        margin-top: 5px;

        font-size: 6px;
    }

}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

    body.admin-bar
    .zkr-site-header {
        top: 46px;
    }


    .zkr-header-inner {
        width: calc(100% - 32px);
        min-height: 68px;
    }


    .zkr-mobile-menu-inner {
        padding:
            95px
            21px
            35px;
    }


    .zkr-mobile-navigation > a,
    .zkr-mobile-location-parent {
        padding: 15px 0;

        font-size:
            clamp(
                31px,
                9.5vw,
                46px
            );
    }


    .zkr-mobile-location-subnav {
        padding-left: 40px;
    }

}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 390px) {

    .zkr-header-logo {
        font-size: 21px;
    }


    .zkr-mobile-navigation > a,
    .zkr-mobile-location-parent {
        font-size: 30px;
    }

}


/* ==========================================================
   MOBILE MENU — FOOTER SOCIAL
   ========================================================== */

.zkr-mobile-menu .zkr-mobile-menu-footer {
    width: 100%;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(244, 242, 237, .16);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.zkr-mobile-menu .zkr-mobile-menu-social {
    display: flex;
    align-items: center;
    gap: 22px;
}

.zkr-mobile-menu .zkr-mobile-menu-social a {
    display: inline-flex !important;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #f4f2ed !important;
    text-decoration: none !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
    opacity: .55;
}

.zkr-mobile-menu .zkr-mobile-menu-social a::after {
    content: "↗";
    margin-left: 6px;
    font-size: 9px;
    opacity: .6;
}

.zkr-mobile-menu .zkr-mobile-whatsapp {
    min-height: 44px;
    padding: 0 17px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(244, 242, 237, .28) !important;
    border-radius: 999px;
    background: rgba(244, 242, 237, .04) !important;
    color: #f4f2ed !important;
    text-decoration: none !important;
    font-family: Inter, Arial, sans-serif !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

.zkr-mobile-menu .zkr-mobile-whatsapp span {
    margin-left: 18px;
    font-size: 11px;
    opacity: .65;
}

@media (hover: hover) {
    .zkr-mobile-menu .zkr-mobile-menu-social a:hover {
        opacity: 1;
    }

    .zkr-mobile-menu .zkr-mobile-whatsapp:hover {
        background: rgba(244, 242, 237, .10) !important;
        border-color: rgba(244, 242, 237, .50) !important;
    }
}

@media (max-width: 480px) {
    .zkr-mobile-menu .zkr-mobile-menu-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        margin-top: 24px;
    }

    .zkr-mobile-menu .zkr-mobile-menu-social {
        justify-content: flex-start;
    }

    .zkr-mobile-menu .zkr-mobile-whatsapp {
        width: 100%;
        min-height: 48px;
    }
}

/* ==========================================================
   ZKR — HOMEPAGE LOCATION DROPDOWN FIX
   ========================================================== */

@media (min-width: 981px) {

    body.home .zkr-site-header,
    body.home .zkr-header-inner,
    body.home .zkr-header-nav,
    body.home .zkr-header-location {
        overflow: visible !important;
    }


    body.home .zkr-site-header {
        z-index: 99990 !important;
    }


    body.home .zkr-header-location {
        position: relative !important;

        display: flex !important;

        align-items: center !important;
    }


    /*
     * Dropdown fermé par défaut
     */

    body.home
    .zkr-header-location
    .zkr-header-location__dropdown {

        display: block !important;

        opacity: 0 !important;

        visibility: hidden !important;

        pointer-events: none !important;

        z-index: 999999 !important;

        transform:
            translateX(-50%)
            translateY(-5px) !important;
    }


    /*
     * Ouverture au survol / clavier
     */

    body.home
    .zkr-header-location:hover
    .zkr-header-location__dropdown,

    body.home
    .zkr-header-location:focus-within
    .zkr-header-location__dropdown {

        display: block !important;

        opacity: 1 !important;

        visibility: visible !important;

        pointer-events: auto !important;

        transform:
            translateX(-50%)
            translateY(0) !important;
    }


    /*
     * Rotation de la flèche
     */

    body.home
    .zkr-header-location:hover
    .zkr-header-location__parent::after,

    body.home
    .zkr-header-location:focus-within
    .zkr-header-location__parent::after {

        transform:
            translateY(-1px)
            rotate(180deg) !important;
    }

}