
/* สไตล์สำหรับ Sidebar Menu */
#menu {
    width: 250px;
    background-color: #333;
    color: white;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

/* ซ่อนเมนูในมือถือ */
@media screen and (max-width: 768px) {
    #menu {
        transform: translateX(-100%);
    }
}

/* เมนูปรากฏเมื่อกดปุ่ม */
#menu.active {
    transform: translateX(0);
}

/* สไตล์สำหรับ Header */
#header {
    width: 100%;
    margin-left: 250px;
    background-color: #444;
    color: white;
//    padding: 15px;
    position: fixed;
    top: 0;
    left: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ปุ่มเมนู */
#menu-toggle {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: none;
}

@media screen and (max-width: 768px) {
    #menu-toggle {
        display: block;
        margin-left: 10px;
    }
}

/* พื้นที่หลัก (Main Content) */
#main {
    margin-left: 250px;
    margin-top: 60px;
    padding: 20px;
    flex: 1;
    transition: margin-left 0.3s ease-in-out;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    padding: 15px 20px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    display: block;
    transition: 0.3s;
}

nav ul li a:hover {
    background-color: #555;
}

/* ปรับตำแหน่งเมื่อเมนูซ่อน */
@media screen and (max-width: 768px) {
    #main {
        margin-left: 0;
    }
}

/* Footer */
#footer {
    left: 0;
    width: 100%;
    margin-left: 250px;
    background-color: #222;
    color: white;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease-in-out;
}

/* ปรับตำแหน่ง Footer เมื่อเมนูซ่อน */
@media screen and (max-width: 768px) {
    #header {
        margin-left: 0;
        width: 100%;
    }
    #footer {
        margin-left: 0;
        width: 100%;
    }
}
