/* =========================================
   1. GLOBAL RESET & BODY
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* outline: auto; */
}

body {
    background-color: #ffffff;
    font-family: 'Pathway Extreme', sans-serif; /* ใช้ฟอนต์หลัก */
    /* สำคัญ: ดันเนื้อหาลงมา 100px เพื่อไม่ให้ Header (80px) บัง */
    padding-top: 100px; 
}

/* =========================================
   2. MAIN HEADER (FIXED NAVBAR - สีส้ม)
   ========================================= */
.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);
    
    /* Fix position styling */
    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;
}

.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;
}

/* --- 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;
}

/* Burger Menu Icon */
.menu-icon {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

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

/* =========================================
   3. PAGE CONTENT (ส่วนเนื้อหาภายใน)
   ========================================= */

/* Sub-Navigation (แถบเมนูสีกรมท่าภายในหน้า) */
.nav-bar { 
    background: #223645;
    display: flex;
    justify-content: center;
    padding: 25px 0;
}

.nav-btn {
    width: 100%;
    background: #dddcdc;
    color: #000000;
    border: none;
    font-size: 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    text-align: center;
    padding: 20px;
    margin: 0 20px;
}

.nav-btn.active {
    background: #f2a84c;
}

.nav-btn:hover {
    transform: translateY(-3px);
}

/* Section Containers */
.content-section {
    width: 85%;
    max-width: 1100px;
    margin: 50px auto;
    background: #eeeeee;
    padding: 40px;
    border-radius: 20px;
}

/* Title bar with Underline */
.section-title {
    background: #223645;
    color: #fff;
    padding: 18px 25px;
    border-radius: 15px 15px 0 0;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 200px;
    height: 8px;
    background: #f2a84c;
    border-radius: 0 5px 5px 0;
}

/* Cards */
.card {
    background: #f4f4f4;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 18px;
    border: 1px solid #e0d4c5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card.large {
    padding: 30px;
}

.card h3 {
    margin-bottom: 10px;
    font-weight: 600;
}

.card p {
    line-height: 1.6;
    color: #333;
}

.card.center {
    text-align: center;
}

/* Image Frame */
.image-section {
    width: 85%;
    max-width: 1100px;
    margin: 60px auto;
}

.image-frame {
    border-radius: 30px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   4. FOOTER
   ========================================= */
footer {
    background-color: #F9A848;
    padding: 30px 0;
    color: #000;
    margin-top: auto; /* ดัน Footer ลงล่างสุดเสมอ */
    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 (MEDIA QUERIES)
   ========================================= */

/* Tablet & Mobile Menu (Max-width 950px) */
@media (max-width: 950px) {
    .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;
    }

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

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

/* Mobile Small (Max-width 768px) */
@media (max-width: 768px) {
    /* Content Adjustments */
    .image-section {
        width: 92%;
        margin: 40px auto;
    }

    .image-frame {
        border-radius: 20px;
    }
    
    .nav-btn {
        width: 100%; /* ให้เต็มจอในมือถือ */
        padding: 15px 30px; /* ลดขนาดปุ่ม Nav ในหน้าเนื้อหา */
        margin: 0;
    }
    
    .nav-bar {
        flex-direction: column; /* เรียงปุ่มแนวตั้ง */
        padding: 20px;
        gap: 15px;
    }

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

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