/**
 * Navigation Styles - Based on layout_updated/styles.css
 * Includes responsive mobile menu styles
 */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

body {
    padding-top: 80px;
}

body.page-home {
    padding-top: 80px;
}

/* Top Navigation - Desktop (default: non-floating) */
.top-nav {
    background: white;
    height: 80px;
    border-radius: 0;
    margin: 0;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(135, 134, 138, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

@media (min-width: 1201px) {
    body.page-home {
        padding-top: 120px;
    }

    .page-home .top-nav {
        border-radius: 88px;
        margin: 21px 120px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer !important;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    outline: none;
}

.hamburger-menu:hover {
    background-color: rgba(0, 0, 0, 0.05);
    cursor: pointer !important;
}

.hamburger-menu:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}

.hamburger-menu:focus {
    outline: 2px solid #e36129;
    outline-offset: 2px;
}

.hamburger-menu img {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Mobile menu overlay (hidden by default on desktop) */
.mobile-menu-overlay {
    display: none;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 16px 0 20px;
}

.logo img {
    width: 112.25px;
    height: 71.385px;
    flex-shrink: 0;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    margin-left: 20px;
    margin-top:12px;
    flex: 1;
    align-items: center;
}

.nav-menu li a {
    text-decoration: none;
    color: #323232;
    font-size: 18px;
    font-weight: 400;
    transition: color 0.3s;
    /* Ensure navbar items always use Noto Sans Thai, overriding Bootstrap defaults */
    font-family: 'Noto Sans Thai', 'Noto Sans Thai Looped', sans-serif;
}

.nav-menu li.active a {
    color: #e36129;
    font-weight: 600;
}

.nav-menu li a:hover {
    color: #e36129;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.btn-login {
    background: #f98d13;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-login:hover {
    background: #e36129;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
}

.lang-active {
    color: #e36129;
    font-weight: 700;
}

.separator {
    color: #414042;
}

.lang-inactive {
    color: #848484;
    font-weight: 500;
}

/* Dropdown Styles */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 200px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown.show .dropdown-menu {
    display: block;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    color: #323232;
    text-decoration: none;
    display: block;
    transition: background 0.3s;
}

.dropdown-item:hover {
    background: #f4f4f4;
    color: #e36129;
}

/* Mobile Styles */
@media (max-width: 1200px) {
    /* Hide desktop navigation items */
    .nav-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        margin: 0;
        gap: 0;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-menu li a {
        display: block;
        padding: 16px 0;
        font-size: 16px;
    }
    
    .language-switcher {
        display: none;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: flex !important;
        margin-right: 12px;
        cursor: pointer !important;
    }

    /* Mobile Menu Overlay (Figma: Menu selected) */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: #ffffff;
        z-index: 1200;
        overflow: hidden;
    }

    .mobile-menu-overlay.is-open {
        display: block;
    }

    .mobile-menu-overlay::before,
    .mobile-menu-overlay::after {
        content: "";
        position: absolute;
        border-radius: 0;
        z-index: 0;
        background-repeat: no-repeat;
        background-size: 100% 100%;
        background-position: center;
    }

    .mobile-menu-overlay::before {
        width: 600px;
        height: 800px;
        left: -95px;
        bottom: -500px;
        background-image: url('../img/public/mobile-menu-arc-left.svg');
    }

    .mobile-menu-overlay::after {
        width: 300px;
        height: 320px;
        right: -100px;
        bottom: -130px;
        background-image: url('../img/public/mobile-menu-arc-right.svg');
    }

    .mobile-menu-header {
        height: 64px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #ffffff;
        box-shadow: 0 4px 8px rgba(135, 134, 138, 0.15);
        position: relative;
        z-index: 2;
    }

    .mobile-menu-logo img {
        width: 112.25px;
        height: 71.385px;
        object-fit: contain;
        display: block;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
    }

    .mobile-menu-list {
        list-style: none;
        margin: 0;
        padding: 56px 0 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        position: relative;
        z-index: 1;
    }

    .mobile-menu-list li a {
        text-decoration: none;
        color: #323232;
        font-size: 24px;
        font-weight: 400;
        line-height: 1.2;
    }

    .mobile-menu-list li.active a {
        color: #e36129;
        font-weight: 600;
    }

    .mobile-menu-language {
        display: flex;
        align-items: center;
        gap: 8px;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 200px;
        font-size: 21px;
        z-index: 1;
    }

    .mobile-menu-language .separator {
        font-size: 25px;
    }
    
    .hamburger-menu:hover {
        cursor: pointer !important;
        background-color: rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Mobile Top Navigation */
    .top-nav {
        height: 64px;
        margin: 0;
        border-radius: 0;
        box-shadow: 0 4px 8px rgba(135, 134, 138, 0.15);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding-top: 0;
    }
    
    .nav-wrapper {
        padding: 0 16px;
        height: 64px;
        justify-content: space-between;
    }
    
    .logo {
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-start;
        margin-left: 0;
        margin-right: auto;
        order: 1;
    }
    
    .logo img {
        width: 112.25px;
        height: 71.385px;
        object-fit: contain;
    }
    
    .nav-actions {
        gap: 8px;
        order: 2;
        margin-left: auto;
        margin-right: 0;
    }

    .hamburger-menu {
        order: 3;
        margin-right: 0;
        margin-left: 12px;
    }
    
    .btn-login {
        font-size: 14px;
        padding: 8px 16px;
        height: 32px;
        border-radius: 20px;
        line-height: 1;
    }
    
    /* Mobile Dropdown Styles */
    .nav-item.dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border-left: 3px solid #e36129;
        background: #f9f9f9;
        margin: 0;
        padding-left: 16px;
    }
    
    .nav-item.dropdown .dropdown-toggle::after {
        content: '▼';
        display: inline-block;
        margin-left: 8px;
        font-size: 10px;
        transition: transform 0.3s;
    }
    
    .nav-item.dropdown.show .dropdown-toggle::after {
        transform: rotate(180deg);
    }
    
    .dropdown-item {
        padding: 12px 0;
        font-size: 14px;
    }
    
    /* Add padding to body to account for fixed navbar */
    body {
        padding-top: 64px;
    }
    
    /* User dropdown in mobile */
    .nav-actions .dropdown {
        position: relative;
    }
    
    .nav-actions .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        min-width: 200px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        margin-top: 8px;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 24px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 21px;
    }
    
    .footer-logo h4 {
        font-size: 20px;
    }
    
    .footer-section {
        text-align: left;
    }
    
    .footer-bottom {
        text-align: center;
        padding: 0 21px;
    }
}

/* Footer Styles */
.footer {
    background: #f4f4f4;
    padding: 58px 0 25px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
    align-items: start;
    padding-bottom: 30px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 16px;
}

.footer-logo {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.footer-logo img {
    width: 140.174px;
    height: 89.143px;
    margin-left: -20px;
    flex-shrink: 0;
}

.footer-logo h4 {
    font-size: 20px;
    font-weight: 600;
    color: #2a2a2a;
    line-height: 1.37;
    margin: 0;
}

.footer-section-contact {
    order: 2;
}

.footer-section-social {
    order: 3;
}

.footer-bottom {
    text-align: right;
}

.copyright {
    font-size: 10px;
    color: #616060;
    line-height: 1.37;
    margin: 0;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 20px;
}

.footer-section p {
    font-size: 12px;
    color: #616060;
    line-height: 1.72;
    margin: 0 0 8px 0;
}

.footer-section p:last-child {
    margin-bottom: 0;
}

.footer-section strong {
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: opacity 0.3s;
    position: relative;
    padding: 8px;
}

.social-link:hover {
    opacity: 0.8;
}

.social-facebook {
    background-color: #3b5998;
}

.social-twitter {
    background-color: #000000;
}

.social-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link svg {
    width: 20px;
    height: 20px;
}
