/* รีเซ็ตค่าพื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Lora', 'Pridi', serif; 
}

body, html {
    height: 100%;
}

/* --- Banner / Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    background: transparent;
    z-index: 100;
    transition: background 0.4s ease, padding 0.4s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.40); 
    backdrop-filter: blur(5px);
    padding: 10px 40px; 
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 170px;
    height: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    transition: color 0.3s ease;
    position: relative; 
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%; 
}

/* --- ปุ่มสามขีดสำหรับมือถือ --- */
.menu-toggle {
    display: none; 
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 101; 
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
}

/* --- เมนูเต็มจอสำหรับมือถือ (Overlay) --- */
.overlay {
    height: 0; /* ซ่อนโดยการตั้งความสูงเป็น 0 เพื่อให้เลื่อนลงมา */
    width: 100%; /* ให้กว้างเต็มจอเสมอ */
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: rgb(17, 17, 17); 
    overflow-y: hidden; /* ซ่อนเนื้อหาที่เกินออกไปตอนกำลังเลื่อน */
    transition: height 0.5s ease;
}

/* แถบด้านบนของเมนูที่จัดตำแหน่งให้ตรงกับ Header เดิม */
.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; /* ระยะห่างเท่ากับ Header ในมือถือ */
}

/* ปุ่มกากบาทปิดเมนู */
.overlay .close-btn {
    font-size: 50px;
    color: #818181;
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1;
    margin-top: -10px; /* ขยับให้ตรงกลางกับระดับโลโก้ */
}

.overlay .close-btn:hover {
    color: white;
}

.overlay-content {
    position: relative;
    top: 5%;
    width: 100%;
    text-align: left;
    padding: 0 10%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.overlay-content:hover .overlay-item {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.overlay-item {
    padding: 8px 0;
    text-decoration: none;
    font-size: 2.5rem;
    color: white;
    display: inline-block;
    transition: 0.3s;
    position: relative;
    align-self: flex-start;
}

.overlay-content .overlay-item:hover,
.overlay-content .overlay-item.active {
    opacity: 1;
}

.overlay-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.overlay-item:hover::after,
.overlay-item.active::after {
    width: 100%;
}

/* --- Hero Section (วิดีโอ) --- */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 0;
}

/* --- ข้อความ "เลื่อนเพื่อดูเพิ่มเติม" --- */
.scroll-indicator {
    position: relative;
    z-index: 10;
    color: white;
    text-align: center;
    margin-bottom: 50px;
    cursor: pointer;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    animation: bounce 2s infinite;
}

.scroll-indicator p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-family: 'Pridi', serif; 
}

.arrow {
    width: 20px;
    height: 20px;
    border-bottom: 3px solid white;
    border-right: 3px solid white;
    transform: rotate(45deg);
    margin: 0 auto;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* --- ส่วนเนื้อหาว่างเปล่า --- */
.content-section {
    min-height: 100vh;
    background-color: #f8f9fa;
}

/* --- Responsive สำหรับมือถือ --- */
@media (max-width: 768px) {
    header {
        flex-direction: row; 
        padding: 15px 20px; /* ระยะ Padding นี้ตรงกับ .overlay-header ด้านบนแล้ว */
        gap: 0;
    }
    
    header.scrolled {
        padding: 10px 20px;
    }

    .main-nav {
        display: none; 
    }
    
    .menu-toggle {
        display: flex;
    }

    .scroll-indicator {
        margin-bottom: 40px;
    }
}