/* --- 1. การตั้งค่าพื้นฐาน (Variables & Reset) --- */
:root {
    --primary-color: #01274eff; /* สีน้ำเงินหลัก */
    --secondary-color: #f0f4f8; /* สีพื้นหลังอ่อนๆ */
    --text-white: #ffffff;
    --hover-bg: #ffffff;
    --hover-text: #01274eff;
    --btn-color: #28a745; /* สีเขียวปุ่ม */
}

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

body {
    font-family: 'Kanit', sans-serif;
    color: var(--primary-color);
    line-height: 1.6;
    background-color: #fff;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 2. Header & Navigation --- */
header {
    background-color: var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.logo img {
    height: 50px;
    object-fit: contain;
}

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

.nav-menu li a {
    color: var(--text-white);
    padding: 8px 20px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--hover-bg);
    color: var(--hover-text);
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.btn-consult {
    background-color: var(--btn-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-consult:hover {
    filter: brightness(1.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #fff;
    transition: 0.3s;
}

.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- 3. Hero & General Sections --- */
.hero {
    background: linear-gradient(rgba(1, 39, 78, 0.05), rgba(1, 39, 78, 0.05));
    padding: 80px 0;
    text-align: center;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 20px; }
.highlight { color: var(--primary-color); font-weight: 700; }

.section-padding { padding: 60px 0; }
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 600;
}
.text-center { text-align: center; }

/* Zebra Striping */
.bg-light { 
    background-color: #f7f9fc;
}

/* --- 4. Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover { transform: translateY(-5px); }

.service-img {
    height: 200px;
    background-color: #ddd;
    overflow: hidden;
}
.service-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.service-card h3 { padding: 15px 15px 5px; font-size: 1.2rem; }
.service-card p { padding: 0 15px 20px; font-size: 0.9rem; color: #666; }

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
    transition: 0.3s;
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* --- [NEW] Section: Why Choose Us (แก้ไขใหม่) --- */
.why-choose-us {
    background-color: var(--primary-color);
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* จัดกึ่งกลางไอคอนและตัวหนังสือ */
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
}

/* บังคับขนาดไอคอน และเปลี่ยนเป็นสีขาว */
.feature-item img {
    width: 90px !important;    /* ขยายไอคอน */
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* เปลี่ยนไอคอนดำเป็นขาว */
    transition: transform 0.3s ease;
}

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

.feature-item h3 {
    margin: 10px 0 5px;
    font-size: 1.25rem;
    font-weight: 500;
}

.feature-item p {
    color: #dbe4ee;
    font-size: 0.95rem;
    font-weight: 300;
}

/* --- Parallax Quote --- */
.parallax-quote {
    background-image: url('../images/bg-quote.webp'); 
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 120px 0;
    color: white;
    position: relative;
    background-color: #555;
}

.parallax-quote .overlay {
    background: rgba(1, 39, 78, 0.4); /* ปรับความเข้มฟิล์ม */
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.parallax-quote h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* --- Carousel CSS --- */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    padding: 0 40px;
}

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.carousel-btn:hover { background-color: #000; }
.prev-btn { left: 0; }
.next-btn { right: 0; }

@media (min-width: 769px) {
    .carousel-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-col h3 { 
    margin-bottom: 15px; 
    border-bottom: 2px solid #fff; 
    display: inline-block;
    padding-bottom: 5px;
}

.footer-col.social-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-col.social-icons a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-col.social-icons img { 
    width: 35px;
    height: auto;
    display: block; 
}

.footer-col.social-icons a:hover { transform: translateY(-5px); }

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 20px;
}

/* --- Contact Page --- */
.contact-container-box {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
}

.contact-info-text, 
.contact-map {
    flex: 1;
    width: 50%; 
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: 0;
    border-radius: 10px;
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active { left: 0; }
    .nav-menu li { margin: 15px 0; }
    
    .cta-button { 
        display: block; 
        margin-right: 15px;
    }

    .nav-container { padding: 0 10px; }
    .logo img { height: 40px; }
    
    .services-grid { grid-template-columns: 1fr; }
    
    /* Why Choose Us: 2 คอลัมน์ในมือถือ + ระยะห่าง */
    .features-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 40px 20px;
    }
    
    .footer-content { 
        flex-direction: column; 
        text-align: center; 
    }
    .footer-col.social-icons { justify-content: center; }

    .contact-container-box {
        flex-direction: column;
    }
    .contact-info-text, .contact-map {
        width: 100%;
        flex: none;
    }
    .contact-map iframe {
        height: 300px;
    }
}