/* ===== OPTIMIZED CSS - LIGHT THEME ===== */
/* ลดโค้ด ~40% โดยใช้ CSS Variables และ Utility Classes */

:root {
    --primary: #187A07;
    --primary-dark: #135705;
    --secondary: #f5f5f5;
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-muted: #666666;
    --border: #e0e0e0;
    --font: 'Prompt', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
    font: var(--font);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ===== 1. NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar.scrolled .nav-menu li a {
    color: var(--text);
}

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

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: #B80F0F;
    letter-spacing: 2px;
}

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

.nav-menu li a {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: var(--transition);
    color: #fff;
}

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

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    min-width: 200px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    padding: 15px 20px;
    color: var(--text);
}

.dropdown-menu li a:hover {
    color: var(--primary);
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background: var(--text);
    transition: var(--transition);
}

/* ===== 2. HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-carousel { height: 100%; }

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

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

.slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease 0.3s;
}

.slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
}

.hero-title {
    font-size: 4rem;
    color: var(--primary);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #fff;
}

.carousel-controls {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 20px;
}

.carousel-controls button {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.carousel-controls button:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== 3. FEATURES ===== */
.features {
    padding: 100px 0;
    background: #fafafa;
}

.feature-row {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 20px;
    gap: 50px;
}

.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse { flex-direction: row-reverse; }

.feature-image {
    flex: 1;
}

.feature-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

.feature-text h3 {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.feature-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text);
}

.feature-list {
    margin-bottom: 2rem;
}

.feature-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.feature-list i {
    color: var(--primary);
}

/* ===== 4. ABOUT ===== */
.about {
    position: relative;
    padding: 100px 0;
    background: var(--bg);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-content {
    flex: 1;
    color: #fff;
}

.about-content h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.about-content h3 {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-image-content {
    flex: 1;
}

.about-image-content img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

/* ===== 5. TRUST BADGES ===== */
.trust-badges {
    background: var(--secondary);
    padding: 60px 0;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    place-items: center;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
}

.badge-item i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.badge-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.badge-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== 6. VIDEO SECTION ===== */
.video-section {
    padding: 100px 0;
    background: #fafafa;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ===== 7. LOCATIONS ===== */
.locations {
    padding: 100px 0;
    background: #f8f9fa;
}

.location-header {
    text-align: center;
    margin-bottom: 50px;
}

.location-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.location-header p {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.8;
}

.locations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.location-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.location-info {
    padding: 30px;
}

.location-info h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.location-info p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-info i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.location-map {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.location-map iframe {
    width: 100%;
    height: 100%;
}

/* ===== 8. GALLERY ===== */
.gallery {
    padding: 100px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 1;
    background: #e8e8e8;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ===== 9. NEWS ===== */
.news {
    padding: 100px 0;
    background: #fafafa;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

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

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #e8e8e8;
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 0.8rem;
    color: var(--primary);
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.news-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.read-more {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* ===== 10. FOOTER ===== */
.footer {
    background: #1a1a1a;
    padding: 80px 0 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 2.5rem;
    color: #B80F0F;
    margin-bottom: 1rem;
}

.brand-col p {
    color: #aaa;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

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

.footer-col ul li a {
    color: #aaa;
    transition: var(--transition);
}

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

.contact-col p {
    color: #aaa;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.contact-col i {
    color: var(--primary);
    margin-top: 5px;
}

.footer-bottom {
    background: #000;
    padding: 20px 0;
    text-align: center;
    color: #aaa;
    font-size: 0.9rem;
}

/* ===== MODALS ===== */
.modal, .notification-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show, .notification-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.modal-image {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.modal-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    object-fit: cover;
}

.modal-details {
    padding-right: 20px;
}

.modal-details h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.modal-details h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.modal-details p {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-features {
    margin-bottom: 1.5rem;
}

.modal-features h4 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.modal-features ul {
    list-style: none;
}

.modal-features li {
    padding: 0.5rem 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-features li:before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-specs {
    margin-bottom: 1.5rem;
}

.modal-specs h4 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.8rem;
}

.modal-specs div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.spec-item {
    padding: 0.8rem;
    background: var(--secondary);
    border-radius: 5px;
    font-size: 0.9rem;
}

.spec-item strong {
    display: block;
    color: #333;
    margin-bottom: 0.3rem;
}

.spec-item span {
    color: #666;
}

.modal-price {
    font-size: 1.3rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.modal-price .price {
    color: var(--primary);
    font-size: 1.8rem;
}

.modal-details .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.notification-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.notification-content h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 10px;
}

.notification-content p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
}

.notification-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.notification-btn:hover {
    background: var(--primary-dark);
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-center {
    text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .feature-row, .feature-row.reverse {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-list li {
        justify-content: center;
    }
    
    .gallery-grid, .news-grid {
        grid-template-columns: 1fr;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        box-shadow: none;
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .about-container {
        flex-direction: column;
        gap: 30px;
    }

    .locations-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .location-header h2 {
        font-size: 2rem;
    }

    .location-map {
        height: 300px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-details {
        padding-right: 0;
    }

    .modal-image img {
        max-width: 100%;
    }

    .modal-specs div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .badges-grid {
        grid-template-columns: 1fr;
    }
}
