/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

:root {
    --primary: #003366;
    --secondary: #0066cc;
    --light: #f4f4f4;
    --dark: #1a1a1a;
    --white: #ffffff;
}

html { scroll-behavior: smooth; }

body { color: #333; line-height: 1.6; }

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--white);
    height: 60px;
    display: flex;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); }
.logo span { color: var(--secondary); }

.nav-links { display: flex; list-style: none; }
.nav-links li a {
    text-decoration: none;
    color: var(--primary);
    margin-left: 30px;
    font-weight: 400;
    transition: 0.3s;
}

.nav-links li a:hover { color: var(--secondary); }

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,51,102,0.8), rgba(0,51,102,0.8)), 
                url('../image/mainpage/hero.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: 80px;
}

.hero-text h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.hero-text p { font-size: 1.2rem; margin-bottom: 30px; }

.cta-btn {
    padding: 12px 35px;
    background: var(--secondary);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: 0.3s;
}

.cta-btn:hover { background: #0052a3; }

/* Sections Header */
.section-header { text-align: center; margin-bottom: 50px; padding-top: 100px; }
.section-header h2 { font-size: 2.2rem; color: var(--primary); }
.line { width: 80px; height: 4px; background: var(--secondary); margin: 10px auto; }


/* Feature Boxes (Floating) */
.features {
    position: relative;
    z-index: 10;
    margin-top: -80px; /* ทำให้ลอยขึ้นทับ Hero */
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    background: white;
    /*box-shadow: 0 15px 40px rgba(0,0,0,0.1);*/
    box-shadow: 0 1px 20px rgba(0,0,0,0.3);
    border-radius: 4px;
    overflow: hidden;
}

.feature-box {
    padding: 40px 20px;
    text-align: center;
    border-right: 1px solid #eee;
    transition: 0.3s;

}
.feature-box svg {
    margin-bottom: 15px; /* ปรับตัวเลขได้ตามต้องการ */
}

.feature-box:last-child { border-right: none; }

.feature-box i {
    font-size: 2.5rem;
    color: #666;
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.feature-box p {
    font-size: 0.85rem;
    color: #777;
}

.feature-box:hover {
    background: #f9f9f9;
}




/* --- About Section info-card และ image-card (Overlap Design จากโค้ดวิเคราะห์) --- */
.about-section {
    padding: 120px 0;
}

.overlap-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.info-card {
    position: relative; /* ต้องมี position ถึงจะใช้ z-index ได้ */
    z-index: 1; /* ปรับลดลงเหลือ 1 */
    background-color: #FFFFFF;
    padding: 4% 12% 8% 8%; /* ปรับให้เหมาะสมกับการใช้งานจริง */
    width: 65%;
    border-radius: 5px;
    z-index: 2;
    box-shadow: 0px 5px 15px 2px rgba(0, 0, 0, 0.15); /* ค่าเงาจาก style-200 */
    transform: translateX(6%) translateY(0%); /* ดันแผ่นข้อความไปทับรูป */
}

.image-card {
    position: relative; /* ต้องมี position ถึงจะใช้ z-index ได้ */
    z-index: 2; /*แผ่นรูปภาพ (ให้อยู่ชั้นบนทับข้อความ) ปรับ 2 */
    width: 50%;
    min-height: 360px;
    background-image: url('../image/mainpage/team.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    box-shadow: 0px 10px 30px 2px rgba(0, 0, 0, 0.15); /* ค่าเงาจาก style-204 */
    transform: translateX(0%) translateY(0%); /* ดึงรูปเข้ามาซ้อน */
}

.sub-title { color: var(--colibri-blue); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.main-title { font-size: 2.0rem; margin: 20px 0; font-weight: 300;font-family: 'Kanit', serif; }
.italic-text { font-family: 'Playfair Display', serif; font-style: italic; color: #0050f1; }

.menu-btn {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    border: 1px solid var(--primary); 
    padding: 5px 10px;
    border-radius: 5px;
}


/* --- Section info-card และ image-card  แบบมือถือ Mobile Responsive (ดึงจาก @media 767px) --- */
@media (max-width: 767px) {
    .hero-content h1 { font-size: 2.5rem; }


/* =========================================
   MOBILE MENU (Hamburger Menu)
========================================= */

/* ซ่อนปุ่ม Hamburger ในหน้าจอ Desktop */
.menu-btn {
    /*display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    border: 1px solid var(--primary); 
    padding: 5px 10px;
    border-radius: 5px;*/
}

.menu-btn:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}

/* เมื่อหน้าจอเล็กกว่า 768px (Mobile & Tablet) */
@media (max-width: 768px) {
    /* แสดงปุ่ม Hamburger */
    .menu-btn {
        display: block; 
    }

    /* ปรับแต่ง Navbar ในมือถือ */
    .navbar {
        padding: 10px 0;
        height: auto; /* ให้ความสูงยืดหยุ่น */
    }
    /* ปรับแต่ง Nav Links ให้เป็นแบบ Dropdown */
    .nav-links { 
        /*display: none; */
        display: flex;
        flex-direction: column;
        position: absolute; /* ลอยอยู่ใต้ Navbar */
        top: 100%; /* ชิดขอบล่างของ Navbar */
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        
        /* ตั้งค่าซ่อนเมนูแบบค่อยๆ เลื่อน (Transition) */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    /* คลาสนี้จะถูกเรียกใช้โดย JavaScript เมื่อกดปุ่ม */
    .nav-links.active {
        max-height: 400px; /* ขยายความสูงเพื่อแสดงเมนู (ปรับเลขได้ตามจำนวนเมนู) */
    }

    /* ปรับแต่งระยะห่างของลิงก์ในเมนูมือถือ */
    .nav-links li {
        text-align: center;
        margin: 0;
        border-top: 1px solid #f0f0f0; /* เส้นคั่นเมนู */
    }

    .nav-links li a {
        display: block;
        padding: 15px 0;
        margin: 0;
        font-size: 1.1rem;
    }

    .nav-links li a:hover {
        background-color: #f9f9f9;
        color: var(--secondary);
    }
}
    
    .overlap-wrapper { flex-direction: column; }
    
    .info-card {
        width: 100%;
        transform: translateX(0) translateY(0);
        padding: 40px 20px;
        text-align: center;
        z-index: 5;
    }
    
    .image-card {
        position: relative; /* ต้องมี position ถึงจะใช้ z-index ได้ */
        z-index: 6;
        width: 90%;
        min-height: 300px;
        margin-top: -40px; /* ให้รูปโดนแผ่นข้อความบังด้านบน */
        transform: translateX(0) translateY(0);
    }
}
#services {
    /* ปรับตัวเลขตามความสูงของ Navbar หรือตามระยะที่ต้องการเว้นครับ */
    scroll-margin-top: 200px; 
}


/* Customers Section */
.customers-section {
    padding: 80px 0;
    background-color: #fcfdfe; /* สีพื้นหลังอ่อนๆ ให้โลโก้เด่น */
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 50px;
    align-items: center;
    justify-items: center;
    margin-top: 40px;
}

.logo-item {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /*opacity: 0.5; *//* ปกติให้จางลง 50% (เห็นเป็นสีแต่ไม่แย่งสายตา) */
    opacity: 0.8; /* ปกติให้จางลง 80% (เห็นเป็นสีแต่ไม่แย่งสายตา) */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

.logo-item img {
    max-width: 140px; /* ขนาดกำลังสวย */
    max-height: 65px;
    object-fit: contain;
}

.logo-item:hover {
    opacity: 1; /* กลับมาเป็นสีชัดเจน 100% */
    transform: translateY(-8px) scale(1.1); /* ลอยขึ้นและขยายตัวเล็กน้อย */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1)); /* เพิ่มเงาฟุ้งๆ ให้โลโก้ */
}

/* สำหรับแบรนด์ที่เป็นตัวอักษร (TT&T, PEA, CAT) */
.text-logo-box {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    min-width: 140px;
}

.text-logo-box span {
    font-weight: 700;
    font-size: 1.2rem;
    color: #03a9f4; /* ใช้สีหลักของเว็บ */
}

.text-logo-box:hover {
    border-color: #03a9f4;
    box-shadow: 0 10px 20px rgba(3, 169, 244, 0.1);
}

@media (max-width: 767px) {
    .logo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}







/* Services */
.services { background: var(--primary); padding-bottom: 100px; }
.section-header.white h2 { color: var(--white); }

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 10px;
    color: var(--white);
    transition: 0.3s;
}

.service-item:hover { background: rgba(255,255,255,0.2); transform: translateY(-5px); }
.service-item i { font-size: 2.5rem; margin-bottom: 20px; color: var(--secondary); }

/* Vision Cards */
.about-content { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 40px; }
.about-text { font-size: 1.1rem; color: #555; margin-top: 30px; }
.vision-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.v-card { background: var(--light); padding: 20px; border-radius: 8px; border-left: 5px solid var(--secondary); }

/* Brands */
.brands { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 20px; }
.brands span { background: var(--light); padding: 5px 15px; border-radius: 20px; font-size: 0.9rem; font-weight: 600; }

.ex-item { margin-bottom: 20px; padding: 15px; border-bottom: 1px solid #eee; }



/*contact*/
/* =========================================
   Contact Section (ดีไซน์ใหม่)
========================================= */
.contact-section {
    padding: 10px 0 0 0; /* เว้นด้านล่างให้ .footer-bottom ไปจัดการ */
    background-color: #f8f9fa; /* สีพื้นหลังเทาอ่อนๆ ให้ดูสะอาดตา */
    padding-bottom: 10px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr; /* แบ่งครึ่งซ้าย-ขวา เท่าๆ กัน */
    gap: 60px;
    margin-bottom: 60px;
}

/* ฝั่งซ้าย: ข้อมูลบริษัท */
.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 30px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    display: flex;
    align-items: flex-start;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-right: 20px;
    margin-top: 5px;
    width: 30px;
    text-align: center;
}

.info-item strong {
    display: block;
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item p {
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ฝั่งขวา: การ์ดผู้บริหาร */
.contact-persons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.person-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 5px solid var(--secondary); /* แถบสีฟ้าด้านซ้ายของการ์ด */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.person-icon {
    width: 60px;
    height: 60px;
    background-color: #eef7ff; /* สีฟ้าน้ำทะเลอ่อนๆ */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 25px;
}

.person-icon i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.person-details .position {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.person-details h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 2px;
}

.person-details .role-th {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 10px;
}

.phone-link {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.phone-link i {
    margin-right: 5px;
}

.phone-link:hover {
    background-color: var(--secondary);
    color: var(--white);
}

/* ส่วนล่างสุด: Copyright */
.footer-bottom {
    background-color: var(--primary);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 20px 0;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

/* =========================================
   Mobile Responsive สำหรับ Contact
========================================= */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* ให้แสดงเป็น 1 คอลัมน์ (บน-ล่าง) */
        gap: 40px;
    }

    .person-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .person-icon {
        margin-right: 0;
        margin-bottom: 20px;
    }
}
/*.bg-blue { background: var(--primary); color: var(--white); padding: 40px 0; }
.section-contact { text-align: center; margin-bottom: 30px;  }
.section-contact h2 { font-size: 2.2rem; color: var(--white); }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; color:#ffffff; }
.c-card { background: #3f556a; padding: 20px; border-radius: 8px; border-left: 5px solid var(--primary); }*/




/* Footer */
.bg-dark { background: var(--dark); color: var(--white); padding: 1px 0 30px; }
.footer-content { /*display: grid;*/ grid-template-columns: 2fr 1fr; gap: 50px; }
.copyright { text-align: center; margin-top: 50px; border-top: 1px solid #333; padding-top: 20px; font-size: 1.2rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero-text h1 { font-size: 2.5rem; }
    .about-content, .footer-content { grid-template-columns: 1fr; }
}

.tower {
  color: rgb(9, 4, 93);
}

.tower svg {
  width: 50px;
  height: 50px;
}




/* Back to Top */
.top-btn { 
            display: none; position: fixed; bottom: 30px; right: 30px; z-index: 999;
            background: var(--primary); color: white; border: none; width: 50px; height: 50px;
            border-radius: 50%; cursor: pointer; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        }