/* ==========================================================
   MARMARIS DENTAL CENTER
   FINAL CUSTOM HEADER CSS
   ----------------------------------------------------------
   File: assets/css/custom.css
   Purpose:
   - Desktop + tablet + mobile header
   - Top bar
   - Logo / WhatsApp row
   - Desktop navigation
   - Dropdowns + nested dropdowns
   - Mobile hamburger + accordion navigation
   ========================================================== */


/* ==========================================================
   01. HEADER BASE
   ========================================================== */

#mdc-site-header,
#mdc-site-header * {
    box-sizing: border-box;
}

#mdc-site-header {
    --mdc-blue: #18a9df;
    --mdc-blue-dark: #0c90c1;
    --mdc-aqua: #26c7b7;
    --mdc-text: #354550;
    --mdc-muted: #687681;
    --mdc-line: #e8eef1;
    --mdc-light: #f7fafb;
    --mdc-white: #ffffff;

    position: relative;
    z-index: 999;
    width: 100%;
    background: var(--mdc-white);
    color: var(--mdc-text);
    font-family: inherit;
}

.mdc-wrap {
    width: min(1400px, calc(100% - 40px));
    margin: 0 auto;
}


/* ==========================================================
   02. TOP BAR
   ========================================================== */

.mdc-top {
    min-height: 36px;
    background: var(--mdc-light);
    border-bottom: 1px solid var(--mdc-line);
}

.mdc-top-inner {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.mdc-contact {
    display: flex;
    align-items: center;
    gap: 28px;
}

.mdc-contact a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--mdc-muted);
    font-size: 11.5px;
    line-height: 1;
    text-decoration: none;
}

.mdc-contact a:hover {
    color: var(--mdc-blue);
}

.mdc-contact svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: var(--mdc-blue);
}

.mdc-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mdc-social a {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #7d8992;
    text-decoration: none;
    transition: color .18s ease, background .18s ease;
}

.mdc-social svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

.mdc-social a:hover {
    color: var(--mdc-blue);
    background: #edf8fc;
}


/* ==========================================================
   03. LOGO + ACTION ROW
   ========================================================== */

.mdc-brand-row {
    background: var(--mdc-white);
}

.mdc-brand-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.mdc-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.mdc-brand img {
    display: block;
    width: 290px;
    max-width: 100%;
    height: auto;
}

.mdc-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* WhatsApp */

.mdc-wa {
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--mdc-white);
    border: 1px solid #dcebef;
    border-radius: 999px;
    color: #3e4d58;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition:
        color .18s ease,
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.mdc-wa svg {
    width: 21px;
    height: 21px;
    fill: var(--mdc-aqua);
}

.mdc-wa:hover {
    color: #087f78;
    border-color: #a8ddd8;
    background: #f4fcfb;
    transform: translateY(-1px);
}


/* ==========================================================
   04. HAMBURGER
   ========================================================== */

#mdc-site-header .mdc-hamburger {
    display: none;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid #dfe7ea !important;
    border-radius: 8px !important;
    background: var(--mdc-white) !important;
    box-shadow: none !important;
    appearance: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

#mdc-site-header .mdc-hamburger span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 0;
    background: #43515b;
    border-radius: 10px;
    transition: transform .2s ease, opacity .2s ease;
}

#mdc-site-header .mdc-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#mdc-site-header .mdc-hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

#mdc-site-header .mdc-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================
   05. DESKTOP NAVIGATION
   ========================================================== */

.mdc-nav-row {
    background: var(--mdc-white);
    border-top: 1px solid var(--mdc-line);
    border-bottom: 1px solid var(--mdc-line);
}

.mdc-navigation {
    position: relative;
}

.mdc-menu {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mdc-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.mdc-menu > li > a,
.mdc-parent-line > a,
.mdc-language-label {
    min-height: 52px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--mdc-text);
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease;
}

.mdc-menu > li:first-child > a {
    padding-left: 0;
}

.mdc-menu > li > a:hover,
.mdc-parent-line > a:hover {
    color: var(--mdc-blue);
}

.mdc-parent-line {
    display: flex;
    align-items: center;
}


/* Clean CSS arrow */

.mdc-arrow {
    position: relative;
    width: 22px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -9px;
    cursor: pointer;
    outline: 0;
}

.mdc-arrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #7e8b94;
    border-bottom: 1.5px solid #7e8b94;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .18s ease, border-color .18s ease;
}

.mdc-parent:hover > .mdc-parent-line .mdc-arrow::before {
    border-color: var(--mdc-blue);
}


/* ==========================================================
   06. DESKTOP DROPDOWNS
   ========================================================== */

.mdc-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% - 1px);
    z-index: 1000;

    min-width: 255px;
    margin: 0;
    padding: 8px;

    list-style: none;
    background: var(--mdc-white);
    border: 1px solid var(--mdc-line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(25, 48, 63, .11);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px);

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

.mdc-parent:hover > .mdc-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mdc-dropdown li {
    position: relative;
    margin: 0;
}

.mdc-dropdown a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 5px;
    color: #53616b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
    transition: color .15s ease, background .15s ease;
}

.mdc-dropdown a:hover {
    color: var(--mdc-blue-dark);
    background: #f1f9fc;
}


/* Treatments dropdown */

.mdc-treatment-dropdown {
    min-width: 295px;
}


/* Nested dropdown */

.mdc-nested > .mdc-parent-line {
    justify-content: space-between;
}

.mdc-nested > .mdc-parent-line > a {
    min-height: 40px;
    padding: 9px 12px;
    flex: 1;
    color: #53616b;
    font-size: 13px;
}

.mdc-nested > .mdc-parent-line .mdc-arrow {
    width: 35px;
    height: 40px;
    margin-left: 0;
}

.mdc-nested > .mdc-parent-line .mdc-arrow::before {
    transform: rotate(-45deg);
}

.mdc-nested > .mdc-dropdown {
    left: calc(100% + 2px);
    top: -8px;
    min-width: 285px;
}


/* Language dropdown */

.mdc-language > .mdc-dropdown {
    left: auto;
    right: 0;
    min-width: 145px;
}

.mdc-language-label {
    font-weight: 600;
    cursor: default;
}


/* Invisible hover bridges:
   Prevent dropdowns from closing while moving the mouse. */

@media (min-width: 901px) {

    .mdc-parent::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        height: 14px;
        background: transparent;
    }

    .mdc-nested::after {
        content: "";
        position: absolute;
        top: 0;
        right: -14px;
        width: 18px;
        height: 100%;
        background: transparent;
    }
}


/* Mobile-only CTA hidden on desktop */

.mdc-mobile-cta {
    display: none;
}


/* ==========================================================
   07. TABLET
   ========================================================== */

@media (max-width: 1050px) and (min-width: 901px) {

    .mdc-wrap {
        width: calc(100% - 30px);
    }

    .mdc-contact {
        gap: 16px;
    }

    .mdc-menu > li > a,
    .mdc-parent-line > a,
    .mdc-language-label {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 13px;
    }
}


/* ==========================================================
   08. MOBILE / SMALL TABLET
   ========================================================== */

@media (max-width: 900px) {

    /* Top bar is hidden on smaller screens */
    .mdc-top {
        display: none;
    }

    .mdc-wrap {
        width: calc(100% - 28px);
    }


    /* Brand row */

    .mdc-brand-inner {
        min-height: 74px;
        gap: 10px;
    }

    .mdc-brand {
        min-width: 0;
        flex: 1;
    }

    .mdc-brand img {
        width: 220px;
        max-width: 100%;
    }

    .mdc-actions {
        margin-left: auto;
        gap: 8px;
    }


    /* WhatsApp becomes icon-only */

    .mdc-wa {
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        justify-content: center;
    }

    .mdc-wa span {
        display: none;
    }

    .mdc-wa svg {
        width: 22px;
        height: 22px;
    }


    /* Hamburger visible */

    #mdc-site-header .mdc-hamburger {
        display: flex;
    }


    /* Navigation collapsed by default */

    .mdc-navigation {
        display: none;
        width: 100%;
        padding: 0;
    }

    .mdc-navigation.is-open {
        display: block;
    }

    .mdc-menu {
        display: block;
        min-height: 0;
        padding: 6px 16px 20px;
    }

    .mdc-menu > li {
        width: 100%;
        border-bottom: 1px solid #edf1f3;
    }

    .mdc-menu > li > a,
    .mdc-parent-line > a,
    .mdc-language-label {
        min-height: 49px;
        padding: 0;
        flex: 1;
        font-size: 15px;
    }

    .mdc-parent-line {
        justify-content: space-between;
    }


    /* Mobile arrows */

    .mdc-arrow {
        width: 46px;
        height: 46px;
        margin-left: 0;
    }

    .mdc-arrow::before {
        width: 7px;
        height: 7px;
    }

    .mdc-parent.is-open > .mdc-parent-line > .mdc-arrow::before {
        transform: rotate(225deg);
    }


    /* Mobile dropdowns:
       JS adds/removes .is-open. */

    .mdc-dropdown,
    .mdc-nested > .mdc-dropdown,
    .mdc-language > .mdc-dropdown {
        display: none;
        position: static;

        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 4px 0 9px 14px;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;

        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #f8fbfc;
    }

    .mdc-parent.is-open > .mdc-dropdown {
        display: block;
    }

    .mdc-dropdown a {
        min-height: 42px;
        padding: 9px 11px;
        font-size: 14px;
    }


    /* Nested mobile dropdown */

    .mdc-nested > .mdc-parent-line > a {
        min-height: 44px;
        padding: 8px 11px;
        font-size: 14px;
    }

    .mdc-nested > .mdc-parent-line .mdc-arrow {
        width: 44px;
        height: 44px;
    }

    .mdc-nested > .mdc-parent-line .mdc-arrow::before {
        transform: rotate(45deg);
    }

    .mdc-nested.is-open > .mdc-parent-line .mdc-arrow::before {
        transform: rotate(225deg);
    }


    /* Quote CTA shown at bottom of mobile menu */

    .mdc-mobile-cta {
        display: block !important;
        padding-top: 14px;
        border-bottom: 0 !important;
    }

    .mdc-mobile-cta a {
        min-height: 46px !important;
        justify-content: center;
        color: #fff !important;
        background: var(--mdc-blue);
        border-radius: 6px;
    }
}


/* ==========================================================
   09. SMALL MOBILE
   ========================================================== */

@media (max-width: 520px) {

    .mdc-brand-inner {
        min-height: 68px;
    }

    .mdc-brand img {
        width: 185px;
    }

    .mdc-wa {
        width: 39px;
        height: 39px;
    }

    #mdc-site-header .mdc-hamburger {
        width: 39px;
        height: 39px;
    }
}


/* ==========================================================
   END: HEADER
   Future page styles can be added below this line.
   ========================================================== */

