/* 🔥 Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* 🎨 Body */
body {
    background-color: white;
    color: rgb(14, 14, 14);
}

/* 🔝 Navbar */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #111;
    border-bottom: 2px solid #ffffff;
}

.logo {
    font-size: 22px;
    font-weight: bold;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    position: relative;
    transition: color 0.3s ease;
}

/* 🔥 Hover เป็นสีแดง */
nav a:hover {
    color: #ff0000;
}

/* ✨ เส้นใต้เท่ๆ */
nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #ff0000;
    left: 0;
    bottom: -5px;
    transition: 0.3s;
}

/* 🔴 ตอน hover เส้นวิ่ง */
nav a:hover::after {
    width: 100%;
}

/* 🎨 Colors */
.red {
    color: #ff0000;
}

.blue {
    color: #115baa;
}

.white {
    color: white;
}

/* 🔥 Hero */
.hero {
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(90deg,#001f3f,#8b0000);
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(90deg, #ff0000, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* 🔘 Button */
.btn {
    padding: 12px 25px;
    border: none;
    background: linear-gradient(90deg,#001f3f);
    color: rgb(255, 255, 255);
    font-size: 20px;
    cursor: pointer;
    border-radius: 25px;
    transition: 0.3s;

    text-decoration: none; /* 🔥 เอาเส้นใต้ออก */
}
a.btn {
    text-decoration: none;
}

.btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* 🏢 Section ทั่วไป */
section {
    padding: 60px 50px;
    text-align: center;
}

/* 🏢 About */
.about {
    background-color: white;
}

.about p {
    margin-top: 15px;
    line-height: 1.6;
}

/* 🧩 Services layout ให้กลาง + สวย */
.services .title-blue {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
}
.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* ระยะห่างเท่ากัน */
}

/* 🧱 กล่องบริการ (รองรับ <a> ครอบ) */
.service-box {
    display: block;              /* ทำให้ <a> เป็นกล่อง */
    width: 220px;
    padding: 20px;
    border-radius: 12px;
    background: #111;
    color: white;
    text-decoration: none;       /* 🔥 เอาเส้นใต้ลิงก์ออก */
    border: 2px solid transparent;
    transition: all 0.3s ease;
}



/* 🖱️ Hover */
.service-box:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border-color: #ff0000;
}

/* 🎯 หัวข้อ */
.service-box h3 {
    margin-bottom: 10px;
}

/* 🔗 กรณีมี <a> "ดูรายละเอียด" ข้างใน */
.service-box a {
    color: white;
    text-decoration: underline;
}

/* ✨ Hover แล้วตัวหนังสือเปลี่ยนสี */
.service-box:hover h3 {
    color: #ff0000;
}

/* 📞 Contact CTA */
.contact-cta {
    background: linear-gradient(135deg, #ffffff, #ffffff);
}

.contact-cta p {
    margin: 15px 0;
}

/* 🔻 Footer */
footer {
    background-color: #ffffff;
    text-align: center;
    padding: 20px;
    border-top: 2px solid #000000;
}

/* 🔤 Titles */
.title-red {
    color: #ff0000;
    font-size: 28px;
}

.title-blue {
    color: #007bff;
    font-size: 28px;
}

/* 📱 RESPONSIVE (มือถือ) */
@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    nav {
        margin-top: 10px;
    }

    .service-box {
        width: 90%;
    }

    .hero h1 {
        font-size: 24px;
    }
}