/* ส่วนของภาพพื้นหลังขนาดใหญ่ที่แสดงข้อความ */
/* สไตล์สำหรับ hero */
.hero {
    position: relative;
    width: 100%;
    height: 600px; /* ปรับให้ความสูงของภาพ */
    overflow: hidden;
}

/* ภาพพื้นหลัง */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; /* ซ่อนภาพเริ่มต้น */
    transition: opacity 1s ease-in-out;
}

/* ส่วนของข้อความ */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* จัดให้อยู่กลาง */
    color: white;
    text-align: center;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    margin: 0;
}

.hero-content p {
    font-size: 24px;
    margin-top: 10px;
    font-weight: lighter;
}

/* สำหรับข้อความใน hero-content */
.hero-content {
    background-color: rgba(0, 0, 0, 0.5); /* พื้นหลังสีดำบางๆ เพื่อให้ข้อความเด่นขึ้น */
    padding: 20px;
    border-radius: 8px;
}

/* ฟอร์มจองสนาม (ซ่อนชั่วคราว) */
.booking-form {
    background: white;
    margin: 20px auto;
    width: 50%;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #222; /* เปลี่ยนเป็นสีดำ */
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    font-weight: bold;
    color: #222;
}

form input, form select {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    background: #4A90E2;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

button:hover {
    background: #357ABD;
}

/* ส่วนของภาพพื้นหลัง */
.hero {
    position: relative;
    width: 100%;
    height: 600px; /* ปรับความสูงให้พอดีกับพื้นที่ */
    background-image: url('football-pitch.jpg'); /* เปลี่ยนเป็นไฟล์ของคุณ */
    background-size: cover; /* ให้ภาพขยายเต็มพื้นที่ของ element */
    background-position: center; /* จัดตำแหน่งภาพให้อยู่กลาง */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ให้ภาพขยายเต็มพื้นที่ */
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1; /* ทำให้ภาพอยู่ด้านหลัง */
}

/* สำหรับข้อความใน hero-content */
.hero-content {
    background-color: rgba(0, 0, 0, 0.5); /* พื้นหลังสีดำบางๆ เพื่อให้ข้อความเด่นขึ้น */
    padding: 30px;
    border-radius: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* จัดให้อยู่กลาง */
}

.hero-content h1 {
    font-size: 30px; /* ขนาดตัวอักษรใหญ่ขึ้น */
    margin: 10;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); /* เพิ่มเงาให้ข้อความ */
}

.hero-content p {
    font-size: 17px; /* ขนาดข้อความเล็กลง */
    margin-top: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); /* เพิ่มเงาให้ข้อความ */
}

/* Section 2: Booking Steps */
/* Booking Steps */
.booking-steps {
    text-align: center;
    padding: 60px 20px;
    background-color: #ffffff;
}

.booking-steps h2 {
    font-size: 28px;
    color: #222;
    margin-bottom: 20px;
}

/* Container สำหรับ 3 ขั้นตอน */
.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.step {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    width: 250px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.step:hover {
    transform: translateY(-5px);
}

.step img {
    width: 200px;
    margin-bottom: 15px;
}

.step h3 {
    font-size: 20px;
    color: #444;
    margin-bottom: 10px;
}

.step p {
    font-size: 14px;
    color: #666;
}

/* ลูกศรขั้นตอน */
.arrow {
    font-size: 40px; /* ขนาดลูกศรใหญ่ขึ้น */
    font-weight: bold;
    color: #357ABD; /* สีส้ม */
    margin: 0 15px;
}

/* ปรับแต่งสำหรับหน้าจอมือถือ */
@media (max-width: 768px) {
    .steps-container {
        flex-direction: column; /* จัดให้อยู่ในแนวตั้ง */
    }

    .arrow {
        transform: rotate(90deg); /* หมุนลูกศรให้ชี้ลง */
        margin: 10px 0;
    }

    .hero-content h1 {
        font-size: 24px; /* ลดขนาดฟอนต์ของข้อความใหญ่ */
    }

    .hero-content p {
        font-size: 14px; /* ลดขนาดฟอนต์ของข้อความเล็ก */
    }

    /* ปรับขนาดฟอร์มจอง */
    .booking-form {
        width: 80%; /* ขยายฟอร์มให้เต็มพื้นที่มากขึ้น */
    }

    /* ปรับขนาดปุ่ม */
    button {
        padding: 12px;
    }

    .btn-booking {
        padding: 12px 20px;
    }

    /* ปรับขนาดรูปภาพ */
    .step img {
        width: 100%; /* ให้ภาพปรับขนาดตามขนาดของ container */
        margin-bottom: 10px;
    }
}

/* ปุ่มจองสนาม */
.booking-button {
    margin-top: 20px;
}

.btn-booking {
    background: #e67e22;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s ease;
}

.btn-booking:hover {
    background: #d35400;
}

/* กำหนดขนาดและกรอบกลมให้ไอคอน */
.football-icon {
    font-size: 40px; /* ขนาดไอคอน */
    color: #4CAF50; /* สีไอคอน */
    border-radius: 50%; /* ทำให้กรอบกลม */
    padding: 10px; /* ระยะห่างภายในกรอบ */
    background-color: #fff; /* สีพื้นหลัง */
    border: 2px solid #4CAF50; /* กรอบสีเขียว */
    margin-right: 15px; /* ระยะห่างระหว่างไอคอนกับข้อความ */
}

/* กำหนดขนาดข้อความ */
.football-text {
    font-size: 24px;
    color: #333;
}

.latest-news {
    padding: 50px 0;
    background-color: #f4f4f4;
    text-align: center;
    position: relative;
}

.news-container h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-family: 'Roboto', sans-serif; /* ฟอนต์สวยๆ */
    font-weight: 700;
    letter-spacing: 1px;
}

.news-scroll {
    display: flex;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
    width: 100%;
    gap: 20px;
}

.news-item {
    display: flex;
    flex-direction: column;
    width: 33%;  /* ขนาดของแต่ละข่าว */
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.2;  /* ทำให้ข่าวที่ยังไม่ถึงดูจางๆ */
    transform: scale(0.9);  /* ทำให้ขนาดของข่าวที่ยังไม่ถึงเล็กลง */
    transition: opacity 1s ease, transform 1s ease;  /* เพิ่มการเคลื่อนไหวให้ชัดเจน */
    text-align: center;
}

.news-item.active {
    opacity: 1;  /* ทำให้ข่าวที่มาถึงแสดงเต็มที่ */
    transform: scale(1);  /* ขยายข่าวให้ใหญ่ขึ้นเต็มที่ */
}

.news-text h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #070feb;
    font-weight: bold;
}

.news-text p {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #555;
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.news-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* เพิ่มการคลุมการแสดงผลของลูกศร */
.arrow-left, .arrow-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #333;
    cursor: pointer;
    z-index: 2;
}

.arrow-left {
    left: 10px;
}

.arrow-right {
    right: 10px;
}

.btn-read-more {
    padding: 8px 15px;
    background-color: #2ecc71;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: 2px solid #2ecc71;  /* เพิ่มกรอบสีเขียว */
}

.btn-read-more:hover {
    background-color: #27ae60;
    border-color: #27ae60;  /* สีกรอบเปลี่ยนเมื่อ hover */
}

/* ✅ ส่วนข่าวสาร */
/* ✅ ส่วนข่าวสาร */
.news-section {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
}

.news-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* ✅ ตัวเลื่อนข่าว */
.news-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1000px;
    margin: auto;
    position: relative;
}

/* ✅ สไลด์ข่าวแนวนอน */
.news-slider {
    width: 80%;
    overflow: hidden;
    position: relative;
}

.news-wrapper {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease-in-out;
}

/* ✅ การ์ดข่าว */
/* ✅ ปรับสไตล์ให้ข่าวตรงกลางสว่างขึ้น */
.news-item {
    flex: 0 0 300px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    opacity: 0.3; /* ทำให้ข่าวเริ่มต้นจาง */
    transform: scale(0.9); /* ทำให้ข่าวที่ไม่ใช่ตัวหลักเล็กลง */
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ✅ ข่าวที่อยู่ตรงกลางจะสว่างขึ้น */
.news-item.active {
    opacity: 1; /* ทำให้ข่าวตรงกลางสว่าง */
    transform: scale(1); /* ขยายขนาดข่าว */
}


.news-item img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 15px;
}

.news-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* จัดให้อยู่ตรงกลางแนวนอน */
    text-align: center;
}

.news-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.news-content p {
    font-size: 1rem;
    margin-bottom: 15px;
}

/* ✅ ปรับปุ่มให้อยู่ตรงกลาง */
.news-content a {
    display: inline-block;
    padding: 10px 15px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s ease;
    text-align: center;
}

.news-content a:hover {
    background: #0056b3;
}

body {
    min-height: 100vh; /* ทำให้ body กินพื้นที่เต็มจอ */
    display: flex;
    flex-direction: column;
}

/* ✅ ปุ่มเลื่อน */
.arrow-left, .arrow-right {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #007bff;
    transition: color 0.3s;
}

.arrow-left:hover, .arrow-right:hover {
    color: #0056b3;
}

/* ✅ Responsive */
@media (max-width: 768px) {
    .news-slider {
        width: 100%;
    }

    .news-wrapper {
        gap: 10px;
    }

    .news-item {
        flex: 0 0 250px;
        padding: 10px;
        flex-direction: column;
        text-align: center;
    }

    .news-item img {
        width: 100%;
        height: 120px;
        margin-bottom: 10px;
        margin-right: 0;
    }
}

.container {
    margin-bottom: 100px; /* เพิ่มระยะห่างระหว่างปุ่มกับ footer */
}

