/* ================= BASE (320px default) ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

:lang(th) {
    font-family: 'Noto Sans Thai', Tahoma, sans-serif;
    font-weight: 400;
    letter-spacing: 0.2px;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

.nav {
    width: 100%;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO */
.logo img {
    height: 36px;
}

/* ===== MOBILE MENU (320px) ===== */
.menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 240px;
    height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 80px 20px;
    transition: .3s;
    z-index: 1500;
}

.menu.show {
    right: 0;
}

.menu a {
    font-weight: 500;
}

/* HAMBURGER */
.hamburger {
    width: 22px;
    height: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 2000;
}

.hamburger span {
    height: 2px;
    width: 100%;
    background: #222;
    border-radius: 2px;
    transition: all .35s ease;
}

/* ANIMATION */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* OVERLAY */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: .3s;
    z-index: 900;
}

.menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* ================= FOOTER ================= */
footer {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 12px;
}

/* ===================================================== */
/* ================= BREAKPOINTS ======================= */
/* ===================================================== */

/* ===== 360px ===== */
@media (min-width: 360px) {
    .logo img {
        height: 30px;
    }
}

/* ===== 768px (Tablet) ===== */
@media (min-width: 768px) {

    .nav {
        max-width: 720px;
        margin: auto;
        padding: 16px 20px;
    }

    .menu {
        position: static;
        height: auto;
        width: auto;
        flex-direction: row;
        background: transparent;
        padding: 0;
        gap: 24px;
    }

    .menu a {
        position: relative;
    }

    .menu a:hover,
    .menu a.active {
        color: var(--primary);
    }

    .menu a:hover::after,
    .menu a.active::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 100%;
        height: 2px;
        background: var(--primary);
    }

    .hamburger {
        display: none;
    }
}

/* ===== 1024px (Laptop) ===== */
@media (min-width: 1024px) {

    .nav {
        max-width: 960px;
    }

    .menu {
        gap: 32px;
    }

    .logo img {
        height: 44px;
    }
}

/* ===== 1400px (Large Desktop) ===== */
@media (min-width: 1400px) {

    .nav {
        max-width: 1200px;
    }

    .logo img {
        height: 46px;
    }
}