/**
 * Megasun by Glemery - Navbar Header & Footer Styles
 * Matching Figma specs: 1280px max-width, 81px height, glassmorphic backdrop blur
 */

/* Import Hanken Grotesk if not already loaded */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   1. HEADER & NAVBAR
   ========================================================================== */

.megasun-site-header {
    width: 100%;
    z-index: 99999;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid rgba(206, 197, 189, 0.20);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.megasun-site-header.is-sticky {
    position: sticky;
    top: 0;
    left: 0;
}

/* Scrolled state subtle shadow / background enhancement */
.megasun-site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Inner 1280px Navbar Container (Exact Figma Dimensions) */
.megasun-navbar-inner {
    display: flex;
    max-width: 1280px;
    width: 100%;
    height: 81px;
    margin: 0 auto;
    padding: 0 83.18px 0 80px;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Brand / Logo */
.megasun-navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
}

.megasun-navbar-brand img {
    height: auto;
    max-height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.megasun-navbar-brand:hover img {
    transform: scale(1.02);
}

.megasun-navbar-brand-text {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #080706;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Center Desktop Menu */
.megasun-navbar-nav {
    display: flex;
    align-items: center;
}

.megasun-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 36px;
}

.megasun-nav-list > li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.megasun-nav-list > li > a {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    color: #4B4640;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
}

.megasun-nav-list > li > a:hover {
    color: #080706;
}

/* Active Menu Item Underline (Matches Mockup) */
.megasun-nav-list > li.current-menu-item > a,
.megasun-nav-list > li.current_page_item > a,
.megasun-nav-list > li.current-menu-ancestor > a,
.megasun-nav-list > li.active > a {
    color: #080706;
    font-weight: 700;
}

.megasun-nav-list > li.current-menu-item > a::after,
.megasun-nav-list > li.current_page_item > a::after,
.megasun-nav-list > li.current-menu-ancestor > a::after,
.megasun-nav-list > li.active > a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1.8px;
    background-color: #080706;
}

/* Right CTA Button ("BOOK NOW") */
.megasun-navbar-cta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.megasun-btn-book-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #FFFFFF !important;
    background-color: #735638;
    padding: 13px 26px;
    border-radius: 0;
    text-decoration: none;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(115, 86, 56, 0.20);
}

.megasun-btn-book-now:hover {
    background-color: #5C432D;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(92, 67, 45, 0.30);
}

/* Mobile Hamburger Toggle */
.megasun-hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 100001;
}

.megasun-hamburger-btn span {
    width: 100%;
    height: 2px;
    background-color: #080706;
    transition: all 0.3s ease;
    border-radius: 1px;
}

/* Hamburger Active Animation */
.megasun-hamburger-btn.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

/* Mobile Drawer Overlay */
.megasun-mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 81px;
    left: 0;
    width: 100%;
    height: calc(100vh - 81px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(206, 197, 189, 0.30);
    padding: 36px 28px 48px;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: space-between;
    z-index: 100000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.megasun-mobile-menu-drawer.is-open {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.megasun-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.megasun-mobile-nav-list > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.megasun-mobile-nav-list > li > a {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #4B4640;
    text-decoration: none;
    text-transform: uppercase;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(206, 197, 189, 0.15);
    transition: color 0.2s ease;
}

.megasun-mobile-nav-list > li > a:hover,
.megasun-mobile-nav-list > li.current-menu-item > a {
    color: #080706;
}

.megasun-mobile-cta-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(206, 197, 189, 0.20);
}

.megasun-mobile-cta-wrapper .megasun-btn-book-now {
    width: 100%;
    padding: 16px;
    font-size: 13px;
}

/* ==========================================================================
   2. FOOTER
   ========================================================================== */

.megasun-site-footer {
    width: 100%;
    background-color: #F7F3F0;
    color: #4B4640;
    padding: 68px 24px 52px;
    box-sizing: border-box;
    border-top: 1px solid #CEC5BD;
}

.megasun-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 22px;
}

.megasun-footer-brand {
    display: inline-block;
    text-decoration: none;
}

.megasun-footer-brand img {
    height: auto;
    max-height: 48px;
    width: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* Social Media Links (Between Logo & Copyright) */
.megasun-footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 2px 0 4px 0;
}

.megasun-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #735638;
    background: #FFFFFF;
    border: 1px solid #CEC5BD;
    transition: all 0.25s ease;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.megasun-social-link svg {
    display: block;
    transition: transform 0.2s ease;
}

.megasun-social-link:hover {
    color: #FFFFFF;
    background: #735638;
    border-color: #735638;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(115, 86, 56, 0.25);
}

.megasun-social-link:hover svg {
    transform: scale(1.1);
}

.megasun-footer-copyright {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.8px;
    line-height: 1.9;
    color: #735638;
    text-transform: uppercase;
    margin: 0;
}

.megasun-footer-nav {
    margin-top: 6px;
}

.megasun-footer-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}

.megasun-footer-nav-list > li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.megasun-footer-nav-list > li > a {
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.6px;
    color: #8C827A;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.megasun-footer-nav-list > li > a:hover {
    color: #080706;
}

/* ==========================================================================
   3. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1280px) {
    .megasun-navbar-inner {
        padding: 0 36px;
    }
}

@media (max-width: 991px) {
    .megasun-navbar-inner {
        padding: 0 24px;
        height: 72px;
    }

    .megasun-site-header {
        height: auto;
    }

    .megasun-navbar-nav,
    .megasun-navbar-cta {
        display: none;
    }

    .megasun-hamburger-btn {
        display: flex;
    }

    .megasun-mobile-menu-drawer {
        top: 72px;
        height: calc(100vh - 72px);
    }
}

@media (max-width: 576px) {
    .megasun-navbar-inner {
        padding: 0 18px;
        height: 68px;
    }

    .megasun-navbar-brand img {
        max-height: 38px;
    }

    .megasun-mobile-menu-drawer {
        top: 68px;
        height: calc(100vh - 68px);
        padding: 24px 20px 36px;
    }

    .megasun-site-footer {
        padding: 48px 18px 36px;
    }
}
