@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;600;700&display=swap');

:root {
    --primary: #d90429;
    --primary-light: #ef233c;
    --secondary: #ffb703;
    --dark: #2b2d42;
    --light: #edf2f4;
    --bg-color: #fff0f3;
    --text-muted: #6c757d;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Assistant', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.w-full { width: 100%; }

/* Buttons */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(217, 4, 41, 0.5);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

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


.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--dark);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-btn.open .bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.hamburger-btn.open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open .bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('bg_sunset.png') center/cover no-repeat;
    background-attachment: fixed;
}

.hero .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(43, 45, 66, 0.6), rgba(43, 45, 66, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.hero .highlight {
    color: var(--secondary);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-weight: 400;
}

/* Floating Hearts */
.floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 9999;
    pointer-events: none;
}
.heart {
    position: absolute;
    bottom: -10%;
    color: #8b0000;
    text-shadow: 0 0 10px rgba(255,255,255,0.8), 0 0 20px rgba(139,0,0,0.8);
    font-size: 2rem;
    animation: floatUp 10s infinite linear;
    opacity: 1 !important;
}
.heart:nth-child(1) { right: 10%; animation-duration: 8s; font-size: 1.5rem; }
.heart:nth-child(2) { right: 25%; animation-duration: 12s; font-size: 2.5rem; animation-delay: 2s; }
.heart:nth-child(3) { right: 40%; animation-duration: 9s; font-size: 2rem; animation-delay: 1s; }
.heart:nth-child(4) { right: 55%; animation-duration: 11s; font-size: 1.8rem; animation-delay: 4s; }
.heart:nth-child(5) { right: 70%; animation-duration: 10s; font-size: 3rem; animation-delay: 0s; }
.heart:nth-child(6) { right: 85%; animation-duration: 14s; font-size: 1.2rem; animation-delay: 3s; }
.heart:nth-child(7) { right: 5%; animation-duration: 13s; font-size: 2.2rem; animation-delay: 5s; }
.heart:nth-child(8) { right: 95%; animation-duration: 9s; font-size: 1.7rem; animation-delay: 2.5s; }

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    5% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1.5); opacity: 0; }
}

/* Process Section */
.process-section {
    position: relative;
    padding: 100px 0 20px 0;
    background: linear-gradient(rgba(43, 45, 66, 0.6), rgba(43, 45, 66, 0.8)), url('bg_village.png') center/cover no-repeat;
    background-attachment: fixed;
    color: white;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: #4a148c; /* Dark Purple */
    top: 0;
    bottom: 0;
    right: 50%;
    margin-right: -2px;
    border-radius: 2px;
    z-index: 0;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
    z-index: 10;
}

.timeline-item:nth-child(odd) {
    right: 0;
}

.timeline-item:nth-child(even) {
    right: 50%;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: #4a148c; /* Dark Purple */
    border: 4px solid var(--light);
    top: 15px;
    border-radius: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.timeline-item:nth-child(odd) .timeline-icon {
    left: -20px;
    right: auto;
}

.timeline-item:nth-child(even) .timeline-icon {
    right: -20px;
    left: auto;
}

.glass-card {
    background: var(--glass-bg);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
    padding: 30px;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.timeline-item:nth-child(1) .glass-card { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_1.png') center/cover no-repeat; }
.timeline-item:nth-child(2) .glass-card { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_2.png') center/cover no-repeat; }
.timeline-item:nth-child(3) .glass-card { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_3.png') center/cover no-repeat; }
.timeline-item:nth-child(4) .glass-card { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_4.png') center/cover no-repeat; }
.timeline-item:nth-child(5) .glass-card { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_5.png') center/cover no-repeat; }
.timeline-item:nth-child(6) .glass-card { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_6.png') center/cover no-repeat; }

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

/* Contact Section */
.contact-section {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(rgba(43, 45, 66, 0.6), rgba(43, 45, 66, 0.8)), url('bg_city_night.png') center/cover no-repeat;
    background-attachment: fixed;
}

.contact-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: rgba(180, 130, 255, 0.25) !important; /* Light purple */
}

.contact-box h2 {
    font-size: 2.2rem;
    color: #d4a373;
    margin-bottom: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.contact-form {
    text-align: right;
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255,255,255,0.9);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

/* Footer */
footer {
    position: relative;
    background: linear-gradient(rgba(43, 45, 66, 0.6), rgba(43, 45, 66, 0.8)), url('bg_market.png') center/cover no-repeat;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 50px 0;
}

/* Animations */
.fade-in { opacity: 0; transition: opacity 1s ease-in; }
.fade-in.appear { opacity: 1; }

.slide-up { opacity: 0; transform: translateY(50px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.slide-up.appear { opacity: 1; transform: translateY(0); }

.slide-in-right { opacity: 0; transform: translateX(50px); transition: all 0.8s ease-out; }
.slide-in-right.appear { opacity: 1; transform: translateX(0); }

.slide-in-left { opacity: 0; transform: translateX(-50px); transition: all 0.8s ease-out; }
.slide-in-left.appear { opacity: 1; transform: translateX(0); }

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Responsive */
@media screen and (max-width: 768px) {
    nav {
        display: contents;
    }

    .nav-left-wrapper {
        gap: 12px;
    }
    
    .lang-selector-container {
        padding: 2px 6px;
    }
    
    .lang-label {
        display: none; /* Hide the label on mobile to save space */
    }

    .hamburger-btn {
        display: flex;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -100%; /* Off-screen on the left side consistently */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
        padding: 100px 30px;
        gap: 25px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        align-items: flex-start;
    }

    .nav-links.open {
        left: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        text-align: right;
    }

    html[dir="ltr"] .nav-links a {
        text-align: left;
    }

    .nav-links .btn-contact-nav {
        text-align: center !important;
        margin-top: 10px;
        border-bottom: none;
    }

    .timeline::after { right: 31px; left: auto; }
    .timeline-item { width: 100%; padding-right: 70px; padding-left: 20px; right: 0 !important; }
    .timeline-item:nth-child(odd) .timeline-icon,
    .timeline-item:nth-child(even) .timeline-icon { right: 11px; left: auto; }
    .hero h1 { font-size: 2.3rem; }
}

/* Floating Contact Button */
.floating-contact {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #25D366;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-contact:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    background: #20BA56;
}

@media screen and (max-width: 768px) {
    .floating-contact {
        bottom: 20px;
        left: 20px;
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Testimonials Section */
.testimonials-section {
    padding: 40px 0 80px 0;
    background: linear-gradient(rgba(43, 45, 66, 0.7), rgba(43, 45, 66, 0.8)), url('bg_village.png') center/cover no-repeat;
    background-attachment: fixed;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    text-align: center;
    padding: 40px 30px;
}

.testimonial-card:nth-child(1) { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_1.png') center/cover no-repeat; }
.testimonial-card:nth-child(2) { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_2.png') center/cover no-repeat; }
.testimonial-card:nth-child(3) { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)), url('card_3.png') center/cover no-repeat; }

.testimonial-card p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #fff;
}

.testimonial-card strong {
    color: #d4a373;
    font-size: 1.2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(43, 45, 66, 0.95) !important;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    border-radius: 20px;
    padding: 40px;
    color: white;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
    transition: color 0.3s;
}

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

/* Form Focus Styles */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #d4a373;
    outline: none;
    box-shadow: 0 0 10px rgba(212, 163, 115, 0.5);
    background: rgba(255, 255, 255, 0.95);
}

/* Professional Multi-Language Selector & Layout Adaptations */
.nav-left-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.lang-selector-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.lang-selector-container:hover {
    border-color: rgba(217, 4, 41, 0.2);
    box-shadow: 0 4px 12px rgba(217, 4, 41, 0.08);
}

.lang-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    user-select: none;
}

.lang-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.flag-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.flag-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.flag-btn:hover {
    transform: scale(1.18) translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    border-color: rgba(217, 4, 41, 0.3);
}

.flag-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(217, 4, 41, 0.25), 0 2px 6px rgba(217, 4, 41, 0.3);
    transform: scale(1.1);
}

/* LTR Document Direction Layout Adjustments */
html[dir="ltr"] body {
    text-align: left;
}

html[dir="ltr"] .timeline-item:nth-child(odd) {
    margin-left: 50% !important;
    left: 0 !important;
    right: 0 !important;
}

html[dir="ltr"] .timeline-item:nth-child(even) {
    margin-left: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

html[lang="th"] body {
    font-family: 'Sarabun', 'Assistant', sans-serif;
}

html[dir="ltr"] .contact-form {
    text-align: left;
}

html[dir="ltr"] .close-modal {
    left: auto;
    right: 20px;
}

/* LTR layout fixes for timeline (responsive) */
@media screen and (max-width: 768px) {
    html[dir="ltr"] .timeline::after {
        left: 31px;
        right: auto;
    }
    html[dir="ltr"] .timeline-item,
    html[dir="ltr"] .timeline-item:nth-child(odd),
    html[dir="ltr"] .timeline-item:nth-child(even) {
        padding-left: 70px;
        padding-right: 20px;
        left: 0 !important;
        right: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    html[dir="ltr"] .timeline-item:nth-child(odd) .timeline-icon,
    html[dir="ltr"] .timeline-item:nth-child(even) .timeline-icon {
        left: 11px;
        right: auto;
    }
}

/* Force consistent header layout for LTR (logo on the right, icons/menu on the left) */
html[dir="ltr"] .nav-content {
    flex-direction: row-reverse;
}

html[dir="ltr"] .nav-left-wrapper {
    flex-direction: row-reverse;
}

