/* =========================================================
   GLOBAL RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
}


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

.header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;

    background: var(--white);

    box-shadow: var(--shadow-light);

    z-index: 9999;

    transition: all 0.3s ease;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    width: 100%;

    min-height: 72px;

    padding: 8px 40px;

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

    position: relative;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    text-decoration: none;

    position: relative;

    z-index: 10001;
}

.logo img {
    display: block;

    width: auto;

    height: 50px;

    max-width: 200px;

    object-fit: contain;
}


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

.nav-links {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 22px;

    margin-left: auto;

    padding: 0;

    list-style: none;
}

.nav-links li {
    position: relative;

    list-style: none;
}


/* =========================================================
   NAV LINKS
========================================================= */

.nav-links>li>a {
    display: inline-flex;

    align-items: center;

    gap: 5px;

    color: var(--text-dark);

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    white-space: nowrap;

    position: relative;

    padding: 7px 0;

    transition: color 0.3s ease;
}


/* =========================================================
   LINK HOVER
========================================================= */

.nav-links>li>a:not(.header-btn)::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 0;
    height: 2px;

    background: var(--gradient-main);

    border-radius: 5px;

    transition: width 0.3s ease;
}

.nav-links>li>a:not(.header-btn):hover {
    color: var(--primary);
}

.nav-links>li>a:not(.header-btn):hover::after {
    width: 100%;
}


/* =========================================================
   DROPDOWN ICON
========================================================= */

.dropdown-icon {
    display: inline-flex;

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

    font-size: 16px;

    line-height: 1;

    transition: transform 0.3s ease;
}

.dropdown-parent:hover .dropdown-icon {
    transform: rotate(45deg);
}


/* =========================================================
   DESKTOP DROPDOWN
========================================================= */

.dropdown {
    position: absolute;

    top: calc(100% + 2px);

    left: 120%;

    width: 235px;

    padding: 7px;

    display: flex;

    flex-direction: column;

    background: var(--white);

    border-radius: 10px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);

    border: 1px solid rgba(0, 0, 0, 0.05);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform: translate(-50%, 8px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;

    z-index: 10000;
}


/* Dropdown arrow */

.dropdown::before {
    content: "";

    position: absolute;

    top: -5px;
    left: 50%;

    width: 10px;
    height: 10px;

    background: var(--white);

    transform: translateX(-50%) rotate(45deg);

    border-left: 1px solid rgba(0, 0, 0, 0.05);

    border-top: 1px solid rgba(0, 0, 0, 0.05);
}


/* Show dropdown */

.dropdown-parent:hover>.dropdown,
.dropdown-parent.active>.dropdown {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform: translate(-50%, 0);
}


/* =========================================================
   DROPDOWN LINKS
========================================================= */

.dropdown a {
    display: block;

    width: 100%;

    padding: 10px 12px;

    border-radius: 7px;

    color: var(--text-dark);

    text-decoration: none;

    font-size: 13px;

    font-weight: 500;

    line-height: 1.4;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        padding-left 0.25s ease;
}

.dropdown a:hover {
    background: var(--primary-light);

    color: var(--primary);

    padding-left: 17px;
}


/* =========================================================
   APPOINTMENT BUTTON
========================================================= */

.header-btn {
    position: relative;

    display: inline-flex !important;

    align-items: center;

    justify-content: center;

    min-height: 40px;

    padding: 8px 19px !important;

    border-radius: 30px;

    color: var(--primary) !important;

    font-size: 13px !important;

    font-weight: 600 !important;

    text-decoration: none;

    white-space: nowrap;

    overflow: hidden;

    border: 2px solid transparent;

    background-image:
        linear-gradient(var(--white), var(--white)),
        var(--gradient-main);

    background-origin: border-box;

    background-clip:
        padding-box,
        border-box;

    transition: all 0.3s ease;
}

.header-btn::before {
    content: "";

    position: absolute;

    inset: 0;

    background: var(--gradient-main);

    transform: scaleX(0);

    transform-origin: left;

    transition: transform 0.35s ease;

    z-index: -1;
}

.header-btn:hover::before {
    transform: scaleX(1);
}

.header-btn:hover {
    color: #fff !important;

    transform: translateY(-1px);

    box-shadow: var(--shadow-primary);
}


/* =========================================================
   HAMBURGER
========================================================= */

.hamburger {
    display: none;

    width: 42px;

    height: 42px;

    padding: 0;

    border: none;

    background: transparent;

    cursor: pointer;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 5px;

    position: relative;

    z-index: 10002;
}

.hamburger span {
    display: block;

    width: 24px;

    height: 2px;

    border-radius: 5px;

    background: var(--primary);

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}


/* Hamburger → X */

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   OVERLAY
========================================================= */

.menu-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.35);

    z-index: 9998;

    opacity: 0;

    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
}


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

@media (max-width: 1100px) {

    .navbar {
        padding: 8px 25px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links>li>a {
        font-size: 13px;
    }

    .logo img {
        height: 46px;

        max-width: 185px;
    }

    .header-btn {
        padding: 7px 15px !important;
    }
}


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

@media (max-width: 900px) {

    .navbar {
        min-height: 68px;

        padding: 7px 18px;
    }


    /* LOGO */

    .logo img {
        height: 43px;

        max-width: 175px;
    }


    /* HAMBURGER */

    .hamburger {
        display: flex;
    }


    /* OVERLAY */

    .menu-overlay {
        display: block;

        pointer-events: none;
    }

    .menu-overlay.active {
        pointer-events: auto;
    }


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

    .nav-links {
        position: fixed;

        top: 68px;

        right: 0;

        left: auto;

        width: min(340px, 88vw);

        height: calc(100vh - 68px);

        margin: 0;

        padding: 18px 18px 25px;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        justify-content: flex-start;

        gap: 2px;

        overflow-y: auto;

        background: var(--white);

        box-shadow: -8px 0 25px rgba(0, 0, 0, 0.10);

        transform: translateX(100%);

        transition: transform 0.35s ease;

        z-index: 10000;
    }

    .nav-links.active {
        transform: translateX(0);
    }


    /* MOBILE LINK */

    .nav-links>li {
        width: 100%;
    }

    .nav-links>li>a {
        width: 100%;

        min-height: 44px;

        padding: 9px 4px;

        font-size: 14px;

        display: flex;

        align-items: center;

        justify-content: space-between;
    }


    /* Remove underline on mobile */

    .nav-links>li>a:not(.header-btn)::after {
        display: none;
    }


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

    .dropdown-parent {
        width: 100%;
    }

    .dropdown {
        position: static;

        width: 100%;

        max-height: 0;

        padding: 0 0 0 10px;

        display: flex;

        transform: none !important;

        background: transparent;

        border: none;

        border-radius: 0;

        box-shadow: none;

        opacity: 1;

        visibility: visible;

        pointer-events: auto;

        overflow: hidden;

        transition: max-height 0.3s ease;
    }

    .dropdown::before {
        display: none;
    }

    .dropdown-parent.active>.dropdown {
        max-height: 350px;

        padding-bottom: 5px;
    }


    /* MOBILE DROPDOWN LINK */

    .dropdown a {
        min-height: 38px;

        padding: 8px 10px;

        font-size: 12.5px;

        border-left: 2px solid var(--primary-light);

        border-radius: 0 6px 6px 0;
    }


    /* =====================================================
       APPOINTMENT
    ===================================================== */

    .appointment-item {
        width: 100%;

        margin-top: 10px;

        padding-top: 12px;

        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .header-btn {
        width: 100%;

        min-height: 44px;

        font-size: 13px !important;
    }
}


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

@media (max-width: 480px) {

    .navbar {
        min-height: 64px;

        padding: 6px 14px;
    }

    .logo img {
        height: 39px;

        max-width: 160px;
    }

    .hamburger {
        width: 40px;

        height: 40px;
    }

    .nav-links {
        top: 64px;

        width: 90vw;

        height: calc(100vh - 64px);

        padding: 16px 15px 22px;
    }
}


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

@media (max-width: 360px) {

    .navbar {
        padding-left: 12px;

        padding-right: 12px;
    }

    .logo img {
        height: 35px;

        max-width: 145px;
    }

    .nav-links {
        width: 94vw;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;
    }
}

/* =========================================================
   SCROLL TO TOP BUTTON
========================================================= */

#scrollTopBtn {
    position: fixed;
    right: 25px;
    bottom: 25px;

    width: 48px;
    height: 48px;

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

    border: none;
    border-radius: 50%;

    background: var(--primary);
    color: #ffffff;

    font-size: 17px;

    cursor: pointer;

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

    transform: translateY(15px);

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;

    z-index: 9997;
}

/* Show button */

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Hover */

#scrollTopBtn:hover {
    background: var(--secondary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.20);
}

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

@media (max-width: 600px) {

    #scrollTopBtn {
        width: 44px;
        height: 44px;

        right: 16px;
        bottom: 18px;

        font-size: 15px;
    }
}