/* ============================= */
/* THEME VARIABLES */
/* ============================= */
:root {
    --primary: #3fa163;
    --primary-dark: #025e28;
    --primary-soft: #dcfce7;

    --bg-main: #f9fafb;
    --bg-section: #ffffff;
    --bg-soft: #f0fdf4;

    --text-main: #111827;
    --text-muted: #444444;

    --border-soft: rgba(34, 197, 94, 0.25);
    --shadow-soft: 0 10px 25px rgba(0,0,0,0.06);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Prompt', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ============================= */
/* NAVIGATION */
/* ============================= */
nav {
    position: fixed;
    width: 100%;
    padding: 1.2rem 5%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-soft);
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color .3s;
}

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

/* ============================= */
/* HERO */
/* ============================= */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    text-align: left;
    overflow: hidden;

    background-image: url("../assets/images/bg-img3.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: right center;
  filter: contrast(1.08) saturate(1.15);
}

/* Overlay */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        132deg,
        rgba(255,255,255,0.95) 0%,
        rgba(255,255,255,0.85) 29%,
        rgba(255,255,255,0.45) 72%,
        rgba(255,255,255,0.15) 75%

    );

    z-index: 1;
}

/* Content ให้อยู่เหนือ overlay */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    padding-left: 5%;
}

/*.hero-content {
    max-width: 1200px;
    padding: 0 2rem;
}*/

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: .8rem;
}

.hero  .tagline{
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    white-space: pre-line;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(34,197,94,0.35);
    transition: all .3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(34,197,94,0.5);
}

/* ============================= */
/* SECTION */
/* ============================= */
section {
    padding: 2rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================= */
/* GRID BASE */
/* ============================= */


.services-grid,
.product-grid,
.clients-grid {
    display: grid;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.about-grid,
.future-grid,
.experience-grid ,
.product-grid{
    display: grid;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}


/*.about-grid{
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
}*/

.lang-text-about p {
    margin-bottom: 1rem;
    line-height: 1.8;
    text-indent: 4em; /* กำหนดให้ย่อหน้าบรรทัดแรก 2 ตัวอักษร */
    /*text-align: justify;*/
    display: block;
}

.experience-content,
.product-content{
    text-align: center;
}
.experience-h3,
.product-h3{
    text-align: center;
}


.experience-logo {
    width: 100%;
    height: 80%;              /* กำหนดความสูงตายตัว */
    border-radius: 8px;
    object-fit: contain;       /* ไม่บิดรูป (logo แนะนำ) */
    background: #fff;          /* ทำพื้นหลังให้เท่ากัน */
    padding: 8px;
}

.experience-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 รูปต่อแถว */
    gap: 10px;
    justify-items: center;
}

/* กรณีมีรูปเดียว → ให้อยู่ตรงกลาง */
.experience-images:has(img:only-child) {
    grid-template-columns: 1fr;
    justify-items: center;
}


.service-content{
    text-align: left;
}

.future-grid ,
.clients-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}


.product-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.product-logo {
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
    object-fit: contain;
}

/* ============================= */
/* CARD STYLE */
/* ============================= */
.future-card,
.about-card,
.service-card,
.product-card,
.client-card{
    background: var(--bg-section);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: all .3s;
}


.experience-card {
    background: var(--bg-section);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: all .3s;
    text-align: center;
}



.future-card:hover,
.about-card:hover,
.service-card:hover,
.product-card:hover,
.experience-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(34,197,94,0.25);
}

.client-card:hover {
    background: var(--bg-soft);
    transform: scale(1.05);
}

.future-card h3,
.about-card h3,
.service-card h3,
.product-card h3,
.experience-card h3 {
    color: var(--primary-dark);
    margin-bottom: .8rem;
}

.future-card p,
.service-card p,
.product-card p,
.experience-card p {
    color: var(--text-muted);
    line-height: 1.6;
}


/* ============================= */
/* Service */
/* ============================= */
.service-card.horizontal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

/* ===== Desktop ===== */
.service-text {
    flex: 1;
    text-align: left;
}

.service-image {
    width: 200px;
    flex-shrink: 0;
}

.service-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .service-card.horizontal {
        flex-direction: column;
        text-align: center;
    }

    .service-image {
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
    }

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


/* ============================= */
/* CONTACT */
/* ============================= */
.contact {
    background: var(--bg-soft);
    text-align: center;
}

.contact-info {
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    margin: 1.2rem 0;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.contact-item strong {
    color: var(--primary-dark);
}


.about-pic{
    text-align: center;
/*    max-width: 900px;*/
    border-radius: 8px;
    margin-bottom: 8px;
}

/* ============================= */
/* FOOTER */
/* ============================= */
footer {
    background: #ffffff;
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid var(--border-soft);
}

footer p {
    color: var(--text-muted);
}

/* ============================= */
/* LOADING */
/* ============================= */
.loading {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .hero .subtitle {
        font-size: 1.2rem;
    }
    .hero .tagline {
        font-size: 1.5rem;
    }
    .nav-links {
        gap: 1rem;
    }
}

@media (max-width: 1200px) {
    .about-grid,
    .future-grid,
    .services-grid,
    .product-grid,
    .clients-grid,
    .experience-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .future-grid,
    .about-grid,
    .services-grid,
    .product-grid,
    .clients-grid,
    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .future-grid,
    .about-grid,
    .services-grid,
    .product-grid,
    .clients-grid,
    .experience-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== NAV BASE ===== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

/* ===== HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #22c55e;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        right: 20px;
        width: 260px;
        background: var(--bg-main);
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.4);

        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.35s ease;
    }

    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links li {
        text-align: center;
    }

    .hamburger {
        display: flex;
    }
}

nav {
    position: sticky;
    top: 0;
    z-index: 1000;

    background:  var(--bg-main);/*rgba(15, 23, 42, 0.85);  โปร่งนิด ๆ */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition: box-shadow 0.3s ease, background 0.3s ease;
}

window.addEventListener('scroll', () => {
    const nav = document.querySelector('nav');
    if (window.scrollY > 10) {
        nav.classList.add('scrolled');
    } else {
        nav.classList.remove('scrolled');
    }
});

nav.scrolled {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: rgba(15, 23, 42, 0.95);
}

.lang-text {
    white-space: pre-line;
}

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

.text-link {
    text-decoration: none;
    color: inherit;   /* ใช้สีเดียวกับข้อความรอบข้าง */
    cursor: pointer;
}


.service-fix{
    width: 90%;
}
