/*
    Theme: Bright Pink & White
    Font: Kanit
*/

/* --- 1. Base Styles & Global Utilities --- */
body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8; /* สีพื้นหลังสว่างๆ */
    color: #333;
}

/* ป้องกันการเลื่อนหน้าจอเมื่อเมนูเปิด (ต้องใช้ร่วมกับ JS) */
body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3 {
    font-weight: 700;
    margin-top: 0;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

/* Global Image Optimization / Logo */
.logo-img {
    max-height: 50px; /* ขนาดที่เหมาะสมสำหรับโลโก้ */
    width: auto;
}

.app-mockup-v2 picture, .app-mockup-v3 picture {
    display: block;
}

/* --- 2. Header & Navigation (รวม Hamburger Menu) --- */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 2.1 Navigation Menu (Desktop) */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    padding: 10px 15px;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #FF69B4;
    border-bottom: 2px solid #FF69B4;
}

/* 2.2 Hamburger Menu (ซ่อนบน Desktop) */
.menu-toggle {
    display: none;
}


/* --- 3. Hero Section V2 (หน้าหลัก) --- */
.hero-home-v2 {
    background: linear-gradient(135deg, #FFF0F5, #FFC0CB); /* ชมพูอ่อนไล่สี */
    padding: 60px 0;
}

.hero-layout-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text-content {
    flex: 1;
    max-width: 550px;
    text-align: left;
}

.hero-title {
    font-size: 44px;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #D81B60; /* สีชมพูเข้ม */
}

.hero-subtitle {
    font-size: 20px;
    color: #444;
    margin-bottom: 30px;
}

/* 3.1 ปุ่ม CTA (Call to Action) */
.download-cta {
    display: flex;
    flex-direction: row; 
    gap: 15px;
    margin-bottom: 20px;
}

.btn-download {
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    /* สีพื้นฐานที่ใช้กับปุ่มทุกที่ */
    display: flex; 
    align-items: center;
    justify-content: center;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-download.android {
    /* ใช้สีที่คุณกำหนด: ขาวพื้นหลัง, ชมพูข้อความ */
    background-color: #ffffff; 
    color: #D81B60;
}

.btn-download.ios {
    /* ใช้สีที่คุณกำหนด: ขาวพื้นหลัง, ชมพูข้อความ */
    background-color: #ffffff; 
    color: #D81B60;
}

.btn-download.line {
    background-color: #00B900; 
    color: white;
    margin-top: 10px;
}

.icon-android, .icon-apple {
    margin-right: 10px;
    font-size: 20px;
}

.safety-guarantee {
    margin-top: 20px;
    font-weight: 700;
    color: #D81B60;
    font-size: 16px;
}

/* 3.2 ส่วนรูปภาพ Mockup/Banner */
.app-mockup-v2 {
    flex: 1;
    text-align: center;
    position: relative;
    max-width: 450px;
}

.app-mockup-v2 img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.app-mockup-v3 {
    display: flex;
    justify-content: center;
}

.app-mockup-v3 img {
    max-width: 100%;
    height: auto;
}


/* --- 4. Main Content Sections --- */
.main-content {
    padding: 50px 0;
}

h2 {
    text-align: center;
    font-size: 32px;
    color: #D81B60;
    margin-bottom: 30px;
}

/* Feature Section */
.feature-list {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.feature-item {
    flex: 1;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    color: #FF69B4;
    font-size: 20px;
    margin-bottom: 10px;
}

/* Install Guide Section */
.guide-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.step-card {
    background-color: #fff0f5; 
    border-left: 5px solid #FF69B4;
    padding: 20px;
    border-radius: 8px;
    width: calc(50% - 10px); 
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.step-number {
    font-size: 12px;
    font-weight: 700;
    color: #D81B60;
    margin-bottom: 5px;
}

/* FAQ Section */
.faq-item {
    background-color: #ffffff;
    border: 1px solid #eee;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.faq-question {
    color: #D81B60;
    cursor: pointer;
    margin-bottom: 5px;
}

.faq-answer {
    margin-top: 10px;
}


/* --- 5. Download Table Section (สำหรับ download.html) --- */
.download-table-wrapper {
    overflow-x: auto; 
    margin-bottom: 20px;
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    min-width: 600px;
}

.download-table th, .download-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.download-table th {
    background-color: #FF69B4; 
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
}

.download-table tbody tr:hover {
    background-color: #fff0f5; 
}

.download-table .mod-version td {
    font-weight: 700;
    background-color: #ffe0e6;
}

.btn-table-download {
    display: inline-block;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.btn-table-download.android {
    background-color: #4CAF50;
}

.btn-table-download.ios {
    background-color: #007AFF;
}

.btn-table-download.mod {
    background-color: #D81B60; 
}

.btn-submit {
    display: inline-block;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
    background-color: #D81B60; 
    margin-top: 15px;
    border: none;
}


/* --- 6. Contact Page Layout (สำหรับ contact.html) --- */
.contact-page-layout {
    display: flex;
    gap: 40px;
}

.contact-form-section {
    flex: 2; 
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-form-section h2, .contact-info-section h2 {
    text-align: left;
    margin-bottom: 25px;
    color: #D81B60;
    font-size: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #555;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
}

.contact-info-section {
    flex: 1;
}

.info-card {
    background-color: #fff0f5; 
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-card h3 {
    color: #D81B60;
    font-size: 20px;
    margin-bottom: 10px;
}

.contact-detail a, .contact-detail {
    font-weight: 700;
    color: #007AFF;
    word-break: break-word;
    text-decoration: none;
}

/* --- 7. Policy/Terms/Blog Content Styles --- */
.policy-content, .blog-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.policy-content h2, .blog-content h2 {
    text-align: left;
    color: #D81B60;
    font-size: 28px;
    margin-top: 30px;
    padding-bottom: 5px;
    border-bottom: 2px solid #FFDDE1;
}

/* Blog Specific */
.meta-info {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    border-left: 3px solid #FF69B4;
    padding-left: 10px;
}

/* Sitemap Specific */
.sitemap-group a {
    color: #007AFF; 
    text-decoration: none;
    font-size: 18px;
    padding: 5px 0;
    display: block;
}


/* --- 8. Footer --- */
.main-footer {
    background-color: #333;
    color: #bbb;
    padding: 30px 0;
    text-align: center;
}

.footer-links a {
    color: #FF69B4;
    text-decoration: none;
    margin: 0 10px;
}


/* --- 9. Floating LINE Contact Button --- */
.floating-line-cta {
    position: fixed;
    bottom: 85px; /* เลื่อนขึ้นเล็กน้อยจาก 25px เป็น 30px */
    right: 40px; /* เลื่อนเข้าด้านในจาก 25px เป็น 30px */
    width: 70px; /* ขยายขนาดปุ่มจาก 60px เป็น 70px */
    height: 70px; /* ขยายขนาดปุ่มจาก 60px เป็น 70px */
    background-color: #00b90044; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000; 
    text-decoration: none;
    animation: pulse 2s infinite; 
}

.floating-line-cta .line-icon-img {
    width: 40px; /* ขยายขนาดไอคอนไลน์จาก 35px เป็น 40px */
    height: 40px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 185, 0, 0.4); }
    70% { box-shadow: 0 0 0 18px rgba(0, 185, 0, 0); } /* ปรับวงกลมให้ใหญ่ขึ้น */
    100% { box-shadow: 0 0 0 0 rgba(0, 185, 0, 0); }
}


/* --- 10. Mobile Responsiveness & Hamburger Menu Logic --- */

/* 10.1 Mobile/Tablet (<= 900px) */
@media (max-width: 900px) {
    /* Hero V2 Layout */
    .hero-layout-v2 {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .hero-text-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: 36px;
    }

    .app-mockup-v2 {
        order: -1; /* ให้รูปภาพอยู่ด้านบนในมุมมองมือถือ */
    }
        .app-mockup-v2 {
        order: -3;
    }
}


/* 10.2 Mobile/Tablet (<= 768px) - Hamburger Menu Logic (แก้ไขแล้ว) */
@media (max-width: 768px) {
    
    .main-header .container {
        /* ตรวจสอบว่ามีพื้นที่ระหว่าง Logo และ Hamburger */
        justify-content: space-between;
        padding-top: 15px; 
        padding-bottom: 15px;
        padding-left: 25px;
        padding-right: 25px;
        
    }
    
    /* แสดงปุ่ม Hamburger */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 200; /* ต้องอยู่เหนือทุกอย่าง */
        position: relative;
    }

    .menu-toggle .bar {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #D81B60; /* สีชมพูเข้ม */
        border-radius: 10px;
        transition: all 0.3s linear;
    }
    
    /* Hamburger Animation (เปลี่ยนเป็นปุ่มปิด 'X') */
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
        
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);

    }

    /* การแสดงผลเมนู (Full-Screen Overlay) */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #fff; /* พื้นหลังสีขาว */
        transform: translateX(100%); /* ซ่อนเมนูไว้ทางขวา */
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* เพิ่มความนุ่มนวล */
        z-index: 150; /* อยู่ใต้ปุ่มปิด/Hamburger */
        padding-top: 100px; /* เพิ่มพื้นที่ด้านบนให้มีอากาศหายใจ */
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
        overflow-y: auto; /* อนุญาตให้เลื่อนได้ถ้าเมนูยาว */
    }

    .main-nav.active {
        transform: translateX(0); /* แสดงเมนู */
    }

    /* สไตล์รายการในเมนู */
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        width: 100%;
        padding: 0;
    }

    .main-nav ul li {
        margin: 0 auto;
        border-bottom: 1px solid #f0f0f0; /* เส้นแบ่งที่เบาลง */
        width: 80%; /* จำกัดความกว้างเล็กน้อย */
        max-width: 300px; /* จำกัดความกว้างสูงสุด */
    }
    
    .main-nav ul li:first-child {
        border-top: 1px solid #f0f0f0; 
    }
    
    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav ul li a {
        display: block;
        padding: 18px 15px; /* เพิ่ม Padding ให้กดง่ายขึ้น */
        font-size: 22px; /* ขยายขนาดตัวอักษร */
        font-weight: 700;
        color: #555;
        transition: background-color 0.2s;
    }
    
    /* เน้นสถานะ Active และ Hover */
    .main-nav a:hover,
    .main-nav a.active {
        color: #D81B60; /* สีชมพูเข้ม */
        background-color: #fff0f5; /* พื้นหลังชมพูอ่อนมากเมื่อ Hover/Active */
        border-bottom: none; 
    }

    /* Layout Sections */
    .feature-list, .guide-steps {
        flex-direction: column;
    }
    
    .step-card {
        width: 100%;
    }
    
    /* Contact Page */
    .contact-page-layout {
        flex-direction: column;
        gap: 20px;
    }
    .contact-info-section {
        order: -1; 
    }
}


/* 10.3 Mobile Only (<= 600px) */
@media (max-width: 600px) {
    /* Mobile Buttons Fit Screen */
    .download-cta {
        flex-direction: column; 
        align-items: stretch;
        gap: 15px;
        /* สำคัญ: ให้องค์ประกอบภายใน download-cta ยืดเต็ม width ที่มี */
        width: 100%; 
        max-width: 400px; /* จำกัดความกว้างสูงสุดเพื่อให้ไม่กว้างเกินไปบนจอเล็ก */
        margin-left: auto;
        margin-right: auto;
    }
    
    /* ปุ่มดาวน์โหลดหลักจะต้องยืด 100% ใน Hero Section */
    .btn-download {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 20px; 
        font-size: 16px;
    }
    
    /* ปรับขนาดตัวอักษรอื่นๆ */
    .hero-title {
        font-size: 32px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    
    /* Install Guide */
    .step-card {
        width: 100%;
    }
    
    .hero-layout-v2 {
        /* ตรวจสอบว่ามี padding เพียงพอ เพื่อไม่ให้ปุ่มติดขอบมากเกินไป */
        padding-left: 15px;
        padding-right: 15px;
    }
}


/* 🔹 สไตล์พื้นฐานสำหรับภาพและวิดีโอ */
.featured-image img {
    display: block;
    width: 100%;
    max-width: 500px;   /* จำกัดความกว้างสูงสุดเมื่ออยู่บนจอใหญ่ */
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: cover;
}

/* 🔹 จัดให้อยู่กึ่งกลางใน container */
.featured-image {
    text-align: center;
    margin: 20px auto;
}

/* 🔹 ปรับเฉพาะมือถือ (จอกว้างไม่เกิน 768px) */
@media (max-width: 768px) {
    .featured-image img {
        max-width: 100%;
        border-radius: 8px;
    }
}

/* 🔹 ปรับเฉพาะ PC หรือจอใหญ่ (จอกว้างเกิน 1024px) */
@media (min-width: 1024px) {
    .featured-image img {
        max-width: 600px;
    }
}

