:root {
    --primary: #82b440;
    --primary-dark: #6a9334;
    --secondary: #212121;
    --text-main: #333333;
    --text-muted: #777777;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --header-height: 80px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans Thai', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: transparent;
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 70px;
}

header.scrolled .logo, header.scrolled .nav-links a {
    color: var(--secondary);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 20px; /* เพิ่มระยะห่างจากเมนู */
}

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

.video-container iframe {
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: var(--primary);
    color: var(--white);
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--secondary);
}

/* Search Bar */
.search-bar-wrap {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.search-bar {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 20px;
    align-items: end;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group select, .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 5px;
    outline: none;
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-title span {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Grid Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-img {
    height: 250px;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Virtual Tour Section */
.tour-box {
    background: var(--secondary);
    color: var(--white);
}

.tour-box .section-title h2 {
    color: var(--white);
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .search-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .logo {
        margin-right: 0;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .search-bar {
        grid-template-columns: 1fr;
    }
}

/* Language Switcher */
.lang-switcher a {
    color: var(--white);
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 3px;
}
header.scrolled .lang-switcher a {
    color: var(--secondary);
}
.lang-switcher a.active {
    font-weight: 800;
    color: var(--primary);
}

/* SOR CTA Button */
.btn-sor {
    display: inline-block;
    padding: 20px 45px;
    background: #ff5722; /* Vivid Orange for emotion trigger */
    color: var(--white);
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.3rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 87, 34, 0.4);
    animation: sorPulse 2s infinite;
}
.btn-sor:hover {
    background: #e64a19;
    transform: translateY(-5px) scale(1.05);
    color: white;
}
@keyframes sorPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(255, 87, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

/* Route Map Section */
#route-map {
    background: #fdfdfd;
}
.map-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    position: relative;
    padding: 40px 0;
}
.map-node {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
    border: 3px solid var(--primary);
    transition: var(--transition);
    cursor: pointer;
}
.map-node:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: white;
}
.map-node i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}
.map-node:hover i {
    color: white;
}
.map-node span {
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
}

/* Products Section */
#products {
    background: #fdfbf7; /* Warm earthy background */
}
#products .section-title span { color: #d35400; }
.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(211, 84, 0, 0.05);
    transition: var(--transition);
    border-bottom: 4px solid #e67e22;
}
.product-card:hover {
    transform: translateY(-8px);
}
.product-img {
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 3rem;
}
.product-info {
    padding: 20px;
    text-align: center;
}
.product-info h3 {
    color: #8e44ad;
    margin-bottom: 5px;
}
