* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Prompt', sans-serif;
    color: #333;
    background-color: #f9f9f9;
    overflow-x: hidden;
}

/* --- Hero Section --- */
.hero-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    z-index: 100; /* สูงสุด */
    position: absolute;
    width: 100%;
    top: 0;
}
.logo { font-size: 24px; font-weight: 700; color: #ff4500; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: #555; font-weight: 500; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: #ff4500; }
.search-box { display: flex; align-items: center; background: #f0f0f0; padding: 8px 15px; border-radius: 20px; }
.search-box input { border: none; background: transparent; outline: none; font-family: 'Prompt', sans-serif; }

/* Hero Layout */
.hero-content-wrapper {
    display: flex;
    flex: 1;
    position: relative;
    padding-top: 80px;
}

/* Left: Text */
.hero-text {
    width: 45%;
    padding: 5% 5% 5% 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}
.main-title { font-size: 3.5rem; line-height: 1.1; color: #ff4500; margin-bottom: 10px; text-transform: uppercase; }
.main-title span { color: #888; font-weight: 300; }
.sub-title { font-size: 1.8rem; color: #333; margin-bottom: 20px; }
.description { color: #666; margin-bottom: 40px; line-height: 1.6; max-width: 500px; }
.cta-button {
    padding: 15px 40px; font-size: 1.1rem; font-weight: 600; color: white;
    background: linear-gradient(90deg, #ffaf00, #ff4500);
    border: none; border-radius: 50px; cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 69, 0, 0.3);
    transition: transform 0.2s;
    font-family: 'Prompt', sans-serif;
    width: fit-content;
}
.cta-button:hover { transform: translateY(-3px); }

/* Right: Visual & Slider */
.hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    /* ตัดขอบโค้งแบบคลื่น */
    border-bottom-left-radius: 50% 100%;
    border-top-left-radius: 40% 100%;
    transform: translateX(10%); 
    overflow: hidden;
    z-index: 1; 
    background-color: #eee; /* Fallback color: ถ้าไฟล์รูปเสีย จะเห็นเป็นสีเทาแทนสีขาวโล่งๆ */
}

/* Slider CSS */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* แก้จาก -1 เป็น 0 เพื่อไม่ให้จมหาย */
}

.slide-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.slide-item.active { opacity: 1; }

/* Overlay สีส้มจางๆ ทับรูป */
.hero-slider::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,69,0,0.3));
    z-index: 1;
}

/* ขอบสีส้มด้านหลังคลื่น */
.hero-visual::after {
    content: ''; position: absolute; top: 0; left: -15px; width: 100%; height: 100%;
    background: linear-gradient(to bottom, #ffd700, #ff4500);
    z-index: -1; /* ให้อยู่หลังสุดของ container นี้ */
    border-bottom-left-radius: 50% 100%;
    border-top-left-radius: 40% 100%;
}

.social-floating {
    position: absolute; bottom: 30px; right: 50px;
    display: flex; flex-direction: column; gap: 20px; z-index: 10;
}
.social-floating a { color: white; font-size: 24px; transition: 0.3s; }
.social-floating a:hover { color: #ffd700; transform: scale(1.2); }

/* --- Services --- */
.services-section { padding: 80px 5%; background: #fff; }
.section-header { text-align: center; font-size: 2.5rem; margin-bottom: 50px; color: #333; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card {
    background: white; border-radius: 15px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); transition: transform 0.3s;
}
.service-card:hover { transform: translateY(-10px); }
.card-image { height: 180px; background-size: cover; background-position: center; }
.card-content { padding: 20px; }
.card-content h3 { margin: 10px 0; font-size: 1.2rem; color: #333; }
.card-content p { font-size: 0.9rem; color: #666; margin-bottom: 15px; }
.badge { padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge.ready { background: #e6fffa; color: #00b894; }
.badge.dev { background: #fff5cb; color: #f1c40f; }
.badge.dark { background: #f0f0f0; color: #333; }
.badge.news { background: #ffe6e6; color: #ff4500; }
.rating { display: flex; align-items: center; gap: 5px; font-size: 0.9rem; color: #ffb400; font-weight: 600; }

/* Footer */
.site-footer { background: #333; color: #fff; padding: 50px 5%; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-info h4 { color: #ffd700; margin-bottom: 10px; }
.footer-info a { color: #fff; text-decoration: none; }
.footer-links a { display: block; color: #bbb; text-decoration: none; text-align: right; }
.footer-links a:hover { color: #ffd700; }

@media (max-width: 900px) {
    .hero-content-wrapper { flex-direction: column; }
    .hero-text { width: 100%; padding: 100px 5% 50px; text-align: center; }
    .hero-visual { position: relative; width: 100%; height: 300px; clip-path: none; border-radius: 0; transform: none; }
    .social-floating { flex-direction: row; bottom: 20px; right: 20px; }
}