/* 🌐 Default Styles */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 15px;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* 📱 Responsive Mobile Navigation */
@media screen and (max-width: 768px) {
    .navbar {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        background-color: #f4a52d;
        position: relative;
        z-index: 1000;
    }

    .hamburger {
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        padding: 10px;
    }

    .bar {
        width: 28px;
        height: 3px;
        margin: 6px auto;
        background-color: white;
    }

    /* 🎯 Hamburger Animation */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

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

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

    /* 📂 Mobile Menu Slide In */
    .navbar-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px);
        overflow-y: auto;
        background-color: #f4a52d;
        transition: 0.3s ease-in-out;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;           /* จัดเมนูตรงกลาง */
        justify-content: flex-start;   /* เริ่มจากข้างบน */
        text-align: center;            /* ตัวอักษรอยู่กลาง */
        z-index: 999;
    }

    .navbar-menu.active {
        left: 0;
    }

    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-menu li a {
        padding: 15px 20px;
        display: block;
        width: 100%;
        color: white;
        text-decoration: none;
        font-size: 18px;
        font-family: 'Prompt', sans-serif; /* ฟอนต์เท่ากันทุกเมนู */
        font-weight: 600;
        box-sizing: border-box;
    }

    .navbar-menu li a:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    /* 🔽 Dropdown Styling */
    .dropdown-content {
        display: none;
        padding-left: 20px;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .navbar-menu .dropdown > a::after {
        content: "▼";
        float: right;
        margin-top: 6px;
        font-size: 12px;
        transition: transform 0.3s;
    }

    .dropdown.active > a::after {
        transform: rotate(180deg);
    }

}

/* เมื่อจอเล็ก: ยกเลิกสไตล์เดิม */
@media screen and (max-width: 768px) {
    .about {
        max-width: 100% !important;
        text-align: initial !important;
        white-space: normal !important;
    }

    .contact, .links {
        padding-left: 0 !important;
        text-align: initial !important;
        flex: unset !important;
    }
}
