﻿/* 1. Import ฟอนต์ Inter จาก Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=swap');

/* 2. ประกาศฟอนต์ไทยจากไฟล์ในเครื่อง */
@font-face {
    font-family: 'NotoSansThai';
    src: url('fonts/NotoSansThai-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 3. ตั้งค่าการใช้งาน */
body {
    /* ใส่ Inter ไว้ข้างหน้า เพื่อให้ภาษาอังกฤษใช้ Inter ส่วนภาษาไทยจะสลับไปใช้ NotoSansThai อัตโนมัติ */
    font-family: 'Inter', 'NotoSansThai', sans-serif;
}

/* เน้นส่วนหัวข้อและปุ่มให้ชัดเจน */
h1, h2, h3, .logo, .nav-links a, .btn-main, .category-title {
    font-family: 'Inter', 'NotoSansThai', sans-serif;
    letter-spacing: 1px; /* เพิ่มระยะห่างตัวอักษรให้ดูอินเตอร์ขึ้น */
}
:root {
    --primary-color: #00f2ff;
    --text-color: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.75); /* ปรับให้มืดลงตามที่ขอ */
    --glass: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}



/* Video Background (Fixed Layering) */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2; /* อยู่หลังสุด */
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
   
    /* หรือใช้แบบไล่เฉดสี (Radial Gradient) เพื่อให้ขอบมืดกว่าตรงกลาง */
    background: radial-gradient(circle, transparent 90%, #000 120%), rgba(0, 0, 0, 1);
    z-index: -1; /* ต้องอยู่เหนือวิดีโอ (-2) แต่อยู่ใต้เนื้อหา (10) */
}

/* Navigation (Brand + Original Logo Style) */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(15px);
    background: var(--glass);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    height: 50px;
    width: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff; /* ปรับตรงนี้เพื่อให้คำว่า INTERACTIVE เป็นสีขาว */
}

    .logo span {
        color: var(--primary-color);
    }

.nav-links {
    display: flex;
    list-style: none;
}

    .nav-links li {
        margin-left: 30px;
    }

    .nav-links a {
        text-decoration: none;
        color: #fff;
        font-size: 0.9rem;
        text-transform: uppercase;
        transition: 0.3s;
    }

        .nav-links a:hover {
            color: var(--primary-color);
        }

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}

/* Hero Section (Original Style + Layer Fix) */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    position: relative;
    z-index: 10; /* ต้องเป็นค่าบวกเพื่อให้ลอยเหนือวิดีโอ */
}

.hero-content {
    position: relative;
    z-index: 20;
}

    .hero-content h1 {
        font-size: clamp(2.5rem, 8vw, 6rem);
        line-height: 1.1;
        margin-bottom: 20px;
        background: linear-gradient(to right, #fff, var(--primary-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-weight: 700;
    }

    .hero-content p {
        font-size: 1.2rem;
        color: #fff;
        margin-bottom: 30px;
        text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    }

.btn-main {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    transition: 0.4s;
    text-transform: uppercase;
    background: rgba(0,0,0,0.1);
}

    .btn-main:hover {
        background: var(--primary-color);
        color: #000;
        box-shadow: 0 0 20px var(--primary-color);
    }

/* Contact Info (Latest Element Style) */
.contact-info {
    position: absolute;
    bottom: 50px;
    left: 10%;
    z-index: 30;
}

.contact-item {
    display: flex;
    align-items: center;
    position: relative;
    padding-bottom: 10px;
}

.contact-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.contact-text {
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
    font-weight: 300;
}

.glow-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 1px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Gallery Section (Original Grid Columns) */
.gallery {
    padding: 100px 10%;
    background: #0a0a0a;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    color: #ffffff; /* ปรับตรงนี้เพื่อให้คำว่า INTERACTIVE เป็นสีขาว */
}

.grid-container {
    display: grid;
    /* กลับมาใช้ 3 คอลัมน์แบบเดิมในหน้าจอคอม */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1/1; /* ปรับเป็นสี่เหลี่ยมจัตุรัสเพื่อให้ดูเป็นระเบียบแบบ Interactive */
    text-decoration: none;
}

    .grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        filter: grayscale(100%);
        transition: 0.6s;
    }

/* Text Hover for latest items */
.overlay-gallery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.5;
    transition: 0.5s;
    padding: 15px;
    text-align: center;
}

.category-title {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.grid-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.grid-item:hover .overlay-gallery {
    opacity: 1;
}

/* Content Section (Original Style) */
.content-detail {
    padding: 100px 10%;
    background: #000;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    margin-bottom: 40px;
}

    .video-wrapper iframe {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

.text-block {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

footer {
    padding: 50px;
    text-align: center;
    color: #fff;
}

/* Mobile Responsive (Original Logic) */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.98);
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
    }

        .nav-links.active {
            right: 0;
        }

    .hero-content h1 {
        font-size: 3rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .contact-info {
        left: 50%;
        transform: translateX(-50%);
        bottom: 30px;
    }
}

/* Scroll Reveal (Original Animations) */
/* แก้ไขเพื่อให้ข้อความแสดงผลแน่นอน */
.fade-up {
    opacity: 1 !important; /* เปลี่ยนจาก 0 เป็น 1 */
    transform: translateY(0) !important; /* ลบการเยื้องด้านล่างออก */
    transition: 1s all ease;
    visibility: visible !important;
}

    .fade-up.visible {
        opacity: 1;
        transform: translateY(0);
    }
/* =========================================
   Custom Video Player Controls CSS for Index (Glassmorphism)
   ========================================= */
.content-detail .video-player-section {
    width: 100%;
    max-width: 900px; /* ปรับขนาดให้พอดีกับ Container หน้าแรก */
    margin: 0 auto 50px;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #000;
}

.content-detail .video-container-internal {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    cursor: pointer;
}

    .content-detail .video-container-internal video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Control Panel Container */
.content-detail .video-controls-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    flex-direction: column;
    padding: 10px 20px 15px;
    box-sizing: border-box;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* แสดง controls เมื่อ hover */
.content-detail .video-player-section:hover .video-controls-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Timeline */
.content-detail .controls-top {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.content-detail .timeline-container {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: height 0.2s;
}

    .content-detail .timeline-container:hover {
        height: 8px;
    }

.content-detail .timeline-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #00f2ff;
    border-radius: 5px;
    width: 0%;
}

/* Buttons & Time */
.content-detail .controls-bottom {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.content-detail .controls-left, .content-detail .controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-detail .control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

    .content-detail .control-btn:hover {
        color: #00f2ff;
        transform: scale(1.1);
    }

.content-detail .time-display {
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: rgba(255,255,255,0.7);
    letter-spacing: 1px;
}

/* Big Play Overlay */
.content-detail .big-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
    z-index: 5;
}

/* แสดงปุ่มใหญ่เมื่อ video ถูก paused */
.content-detail .video-container-internal.is-paused .big-play-overlay {
    opacity: 1;
}

@media (max-width: 768px) {
    /* ในมือถือ ให้ controls แสดงตลอดเวลา */
    .content-detail .video-controls-panel {
        opacity: 1;
        transform: translateY(0);
    }
}