/* =========================================
   1. RESET & GLOBAL STYLES (โครงสร้างหลัก)
   =========================================
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: auto;
}

body {
    font-family: 'Pathway Extreme', sans-serif;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-top: 80px;
}
*/

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #F9A848;
    padding: 10px 40px;
    height: 80px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: top 0.3s ease-in-out;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2px;
    align-items: center;

}

.nav-links li a {
    text-decoration: none;
    color: #000;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: block;
    padding: 15px 10px;
    border-radius: 8px;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #fff;
    background-color: rgba(255, 123, 0, 0.658);
}

.arrow {
    font-size: 10px;
    margin-left: 5px;
}

/* =========================================
   3. DROPDOWN MENU
   ========================================= */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    list-style: none;
    padding: 10px 0;
    border-radius: 10px;
}

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

.dropdown-menu li a {
    color: #333;
    padding: 10px 20px;
    display: block;
    font-size: 14px;
    font-weight: 400;
}

.dropdown-menu li a:hover {
    background-color: #f1f1f1;
    color: #F9A848;
}

.dropdown-right .dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown-menu::before {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 20px;
    top: -20px;
    left: 0;
    background-color: transparent;
}

/* =========================================
   4. FOOTER
   ========================================= */
footer {
    background-color: #F9A848;
    padding: 30px 0;
    color: #000;
    margin-top: auto;
    font-size: 14px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.social-icons a {
    color: #fff;
    font-size: 16px;
    margin-left: 10px;
    width: 35px;
    height: 35px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.social-icons a:nth-child(1) {
    background-color: #1877F2;
}

.social-icons a:nth-child(2) {
    background-color: #E4405F;
}

.social-icons a:nth-child(3) {
    background-color: rgb(20, 217, 49);
}

.footer-line {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-col h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

/* =========================================
   5. RESPONSIVE (MOBILE VIEW สำหรับ Header & Footer)
   ========================================= */
.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-icon span {
    width: 25px;
    height: 3px;
    background-color: #000;
    transition: 0.3s;
}

@media (max-width: 1080px) {
    .menu-icon {
        display: flex;
    }

    #menu-container {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #F9A848;
        padding-bottom: 20px;
        flex-direction: column;
    }

    #menu-container.show {
        display: block;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        background-color: #F9A848;
        display: none;
        padding: 0;
        box-shadow: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;

    }

    /* ยกเลิก hover บนมือถือเพื่อป้องกันบัค */
    .dropdown:hover .dropdown-menu {
        display: none;
    }

    /* ใช้คลาส active-dropdown ที่เราสั่งด้วย JS แทน */
    .dropdown.active-dropdown .dropdown-menu {
        display: flex;
        background-color: rgba(0, 0, 0, 0.05);
        /* เพิ่มสีพื้นหลังนิดหน่อยให้ดูรู้ว่าเป็นเมนูย่อย */
        width: 100vw;
        /* ให้กางเต็มจอซ้ายขวาในมือถือ */
    }
    .dropdown.active-dropdown .arrow {
        transform: rotate(180deg);
        display: inline-block;
    }

    .dropdown-menu li a {
        color: #000;
    }
}

@media (max-width: 768px) {

    .footer-bottom,
    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .contact-item {
        justify-content: center;
    }
}