/* --- ตั้งค่าพื้นฐาน --- */
: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;
}

/* --- 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;
}

/* เมนู: เมื่อเอาเมาส์ชี้ (Hover) และปุ่มที่ Active */
.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;
}

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

/* --- Sections --- */
.hero {
    background: linear-gradient(rgba(1, 39, 78, 0.1), rgba(1, 39, 78, 0.1));
    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; }
.bg-light { background-color: var(--secondary-color); }

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 คอลัมน์ */
    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;
}

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

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

.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;
}

/* จัดการ Social Icons (แก้ไขใหม่) */
.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; 
}

/* Effect: เอาเมาส์ชี้แล้วลอยขึ้น */
.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;
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .hamburger { display: block; }
    
    /* เมนูบนมือถือ */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active { left: 0; }

    .nav-menu li { margin: 15px 0; }
    
    .cta-button { display: none; }

    .services-grid { grid-template-columns: 1fr; }
    
    .footer-content { 
        flex-direction: column; 
        text-align: center; 
    }

    /* จัดไอคอนให้อยู่กึ่งกลางเมื่อเป็นมือถือ */
    .footer-col.social-icons {
        justify-content: center;
    }
}