/* --- Global Reset & Variables --- */
:root {
    --primary-color: #F64747;
    --text-color: #ffffff;
    --shadow-hard: 0 1px 3px rgba(0, 0, 0, 0.9);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Kanit', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Global Typography Styles */
h1, h2, h3, h4, p, li {
    font-weight: 300;
    color: #ffffff;
    text-shadow: var(--shadow-hard), var(--shadow-soft);
}

h1 { font-weight: 700; line-height: 1.2; margin-bottom: 20px; font-size: 3rem; }
p { font-size: 1.2rem; margin-bottom: 30px; backdrop-filter: blur(1.5px); }
a { text-decoration: none; }

/* =========================================
   1. Fixed Background
   ========================================= */
.fixed-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--primary-color); z-index: -1; overflow: hidden;
}

.fixed-bg .wave {
    position: absolute; background-color: #EFEFEF; width: 150vmax; height: 150vmax;
    top: -85vmax; right: -60vmax; border-radius: 40%;
    animation: wave-spin 15s linear infinite; box-shadow: -10px 10px 30px rgba(0,0,0,0.1); 
}

@keyframes wave-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =========================================
   2. Layout & Containers
   ========================================= */
.container { width: 90%; max-width: 1100px; margin: 0 auto; }

/* Hero Section */
.hero-section {
    position: relative; padding-top: 150px; padding-bottom: 80px; min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center; background: transparent;
}

.hero-content {
    display: flex; align-items: center; justify-content: space-between;
    position: relative; z-index: 10;
}

/* ปรับ Flex เพื่อให้แบ่งพื้นที่ 50/50 บนจอใหญ่ */
.hero-text { flex: 1; padding-right: 40px; } 
.hero-image { flex: 1; display: flex; justify-content: center; position: relative; }

/* Content Wrapper */
.white-content-wrapper {
    position: relative; width: 100%; z-index: 20; background: transparent;
    padding-top: 80px; padding-bottom: 50px;
    border-top-left-radius: 50px; border-top-right-radius: 50px; margin-top: -60px; 
}

/* Feature Sections */
.feature-section { padding: 40px 0; }

.feature-content {
    display: flex; align-items: center; justify-content: space-between; gap: 60px;
}

.feature-reverse { flex-direction: row-reverse; }

/* ปรับ Flex เพื่อให้แบ่งพื้นที่ 50/50 บนจอใหญ่ */
.feature-text { flex: 1; }
.feature-image { flex: 1; display: flex; justify-content: center; }

/* --- Phone Mockup Images (New Standard Class) --- */
/* ใช้คลาสนี้คุมขนาดรูปโทรศัพท์ทั้งหมดให้เท่ากัน */
.phone-mockup {
    width: 100%;            /* ให้ขยายเต็ม container ของตัวเอง */
    max-width: 380px;       /* แต่ไม่เกิน 380px เพื่อไม่ให้ใหญ่เกินไปบนจอ PC */
    height: auto;           /* รักษาสัดส่วนเดิม */
    border-radius: 40px;    /* ความมนของขอบ */
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

/* หมุนกลับด้านสำหรับ section ที่สลับข้าง */
.feature-reverse .phone-mockup { transform: rotate(2deg); }

/* Effect ตอนเอาเมาส์ไปชี้ */
.phone-mockup:hover { transform: scale(1.02) rotate(0); }


/* Buttons */
.app-buttons { display: flex; gap: 15px; margin-top: 35px; }
.store-btn {
    display: flex; align-items: center; padding: 0; border-radius: 12px;
    transition: transform 0.2s ease; background: transparent;
}
.store-btn:hover { transform: translateY(-3px); }

/* Footer */
footer { padding: 40px 0; text-align: center; font-size: 0.9rem; }
footer p { color: rgba(255,255,255,0.7); text-shadow: none; margin-bottom: 0; }

/* =========================================
   3. Responsive Design (Mobile)
   ========================================= */
@media (max-width: 767px) { /* ปรับ breakpoint ให้เร็วขึ้นเล็กน้อยสำหรับ Tablet แนวตั้ง */
    
    /* Layout Adjustments */
    .hero-section {
        padding-top: 120px; text-align: center; justify-content: flex-start;
    }

    .hero-content, .feature-content, .feature-reverse {
        flex-direction: column; gap: 40px; text-align: center;
    }

    .hero-text { padding-right: 0; }
    .hero-text h1 { font-size: 2.5rem; }
    .feature-text h1 { font-size: 2.5rem; }

    /* Button Adjustments */
    .app-buttons { width: 100%; justify-content: center; gap: 15px; }

    /* Image Adjustments for Mobile */
    /* ตั้งค่าขนาดเดียวสำหรับมือถือ ให้เท่ากันทุกรูป */
    .phone-mockup {
        max-width: 80% !important; /* ให้กว้าง 80% ของหน้าจอ */
        transform: rotate(0) !important; /* ไม่ต้องเอียงในมือถือ */
        margin-top: 20px;
    }

    /* Background & Content Wrapper */
    .fixed-bg .wave {
        width: 900px; height: 900px; top: -100px; left: -5px; border-radius: 45%; 
    }
    .white-content-wrapper {
        border-top-left-radius: 35px; border-top-right-radius: 35px;
        margin-top: -40px; padding-top: 50px;
    }
}
@media (max-width: 1024px) { /* ปรับ breakpoint ให้เร็วขึ้นเล็กน้อยสำหรับ Tablet แนวตั้ง */
    
    .hero-text { padding-right: 0; }
    .hero-text h1 { font-size: 2.2rem; }
    .feature-text h1 { font-size: 2.2rem; }
}