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

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Kanit', sans-serif;
    scroll-behavior: smooth;
    background-color: #ffffff;
    color: #333;
}

/* โครงสร้างพื้นฐาน nav */
nav {
    background-color: #00a39e;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* กล่องที่รวม logo + hamburger */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* logo */
.logo {
    height: 48px;
}

/* ปุ่ม hamburger */
.hamburger {
    font-size: 28px;
    color: white;
    cursor: pointer;
    display: none;
}

/* เมนูปกติ */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    justify-content: center;
    padding: 0;
    margin: 20px 0 0;
}

/* ลิงก์เมนู */
.nav-links li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
}


nav .logo {
    height: 64px;
    filter: brightness(0) invert(1);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* ✅ ให้เมนูขึ้นบรรทัดใหม่ได้ */
    gap: 25px;
    padding: 0;
    margin: 0;
}


nav ul li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.2s;
}

nav ul li a:hover {
    color: #e0f7f6;
}

.section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

#home {
    background-color: #ffffff;
    opacity: 1 !important;
    transform: none !important;
}

h1,
h2 {
    color: #007d77;
}

button,
form button {
    background-color: #00a39e;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover,
form button:hover {
    background-color: #007d77;
}

form input {
    padding: 12px 20px;
    margin: 10px;
    width: 300px;
    max-width: 80%;
    border: 1px solid #ccc;
    border-radius: 12px;
    font-size: 16px;
}

footer {
    background-color: #007d77;
    padding: 20px;
    color: #ffffff;
    font-size: 14px;
    text-align: center;
    margin-top: 40px;
}

.review-card {
    background-color: #f9f9f9;
    border-radius: 15px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 25px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: #00a39e;
    margin-bottom: 10px;
    font-size: 20px;
}

.feature-card p {
    color: #555;
    font-size: 16px;
    margin: 0;
}

.review-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.review-avatar {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.stars {
    font-size: 20px;
    color: #ffc107;
    margin: 10px 0;
}

.review-card p {
    font-size: 18px;
    color: #555;
}

.review-card strong {
    color: #00a39e;
    font-size: 16px;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 20px;
    background-color: #e0f7f6;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-text {
    flex: 1 1 400px;
    max-width: 520px;
    text-align: left;
}

.hero-text .tagline {
    background-color: #d2f4f2;
    color: #007d77;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 999px;
    display: inline-block;
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.2;
    color: #222;
    margin-bottom: 20px;
}

.hero-text h1 .highlight {
    color: #00a39e;
    background: linear-gradient(to right, #00a39e, #f5d100);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 18px;
    color: #444;
    margin-bottom: 30px;
}

.buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.btn {
    background-color: #00a39e;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #007d77;
}

.btn-outline {
    border: 2px solid #00a39e;
    color: #00a39e;
    padding: 10px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: #00a39e;
    color: white;
}

.hero-checks {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #007d77;
    font-weight: 500;
}

.hero-image {
    flex: 1;
    min-width: 320px;
    text-align: center;
    margin-top: 40px;
}


.hero-image img {
    max-width: 90%;
    width: 500px;
    height: auto;
    opacity: 0;
    transform: translateY(10px);
    /* เดิม 30px */
    animation: fadeUp 2s ease-out 1s forwards;
}



@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (min-width: 1200px) {
    .hero-image img {
        /* transform: scale(0.2); */
        max-width: 500px;
    }
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    overflow: hidden;
}

.gallery-item {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(30px);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.gallery-item:nth-child(1) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.6s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.8s;
}

/* เพิ่ม delay ตามจำนวนรูป */

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-fit: contain;
    background-color: #000;
}

.gallery-item:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-container {
    -ms-overflow-style: none; /* IE & Edge */
    scrollbar-width: none; /* Firefox */
}


/* responsive: มือถือแสดงทีละภาพแบบ slider */
@media screen and (max-width: 768px) {
    .gallery-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 0 0 0px; /* ชิดซ้ายแบบพอดี */
        gap: 5; /* ยกเลิก gap เพื่อควบคุมด้วย margin */
        margin: 0 auto; /* จัดกึ่งกลาง */
        width: calc(100% - 32px); /* กว้างเต็มจอด */
        height: 100%; /* ให้เต็มความสูงของ container */
        align-items: center; /* จัดกึ่งกลางแนวตั้ง */
        justify-content: flex-start; /* จัดชิดซ้าย */
    }

    .gallery-item {
        flex: 0 0 calc(100% - 32px); /* รูปเล็กลงนิด เพื่อรวม padding ซ้าย+ขว */
        margin-right: 16px; /* ระยะห่างระหว่างรูป */
        scroll-snap-align: start;
        animation: none;
        opacity: 1;
        transform: none;
        height: auto;
        aspect-ratio: unset;
    }


    .gallery-item img {
        width: 100%;
        height: auto;
        object-fit: contain;
        background-color: #000;

    }

    .popup-overlay {
        display: none !important;
    }

    .nav-container {
        justify-content: center;
        position: relative;
    }

    .logo {
        margin: 0 auto;
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        display: none;
        margin-top: 10px;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }
}

.popup-overlay {
    position: fixed;
    display: none;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.popup-overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}