
/* ================= พื้นฐาน / รีเซ็ตค่าเริ่มต้น + ฟอนต์ ================= */
:root {
    --background-white: #f8f9fa;
    --primary-color: #0d6efd;
    --secondary-color: #ffc107;
    --text-color: #333;
    --background-btn :linear-gradient(135deg, #0dcaf0, #f5b731); 
    --text-nav:#f8f9fa;
    --bg-nav:#1900bd;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background:var(--background-white);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: 80px;
    
}


/* ================= ส่วนเมนูนำทาง (NAVBAR) ================= */
.navbar {
    background: var(--background-btn);
    color: var(--background-white);
    padding: 0.8rem 0;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: auto;
    align-items: center;
    justify-content: space-between;
}

/* โลโก้ */
.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--background-white);
    text-decoration: none;
}

.logo span {
    color: var(--secondary-color);
}

/* ลิงก์เมนู */
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links li a {
    color: var(--text-nav);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-links li a:hover {
    color: var(--bg-nav);
}

/* ปุ่มล็อกอิน */
.btn-login {
    background: var(--secondary-color);
    color: #000 !important;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 600;
}

.btn-login:hover {
    background: var(--secondary-color);
}

/* เมนูมือถือ (Hamburger menu) */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--background-white);
}

/* ================= Responsive (สำหรับจอเล็ก) ================= */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--background-btn);
        flex-direction: column;
        gap: 0;
        display: none;
        text-align: center;
        padding: 1rem 0;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .menu-icon {
        display: block;
    }

    .nav-links.active {
        display: flex;
    }
}

/* ================= ส่วนเนื้อหาหลักของเว็บ (BODY CONTENT) ================= */
.body {
    padding: 4rem 1rem;
    text-align: center;
}

.title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* ================= ส่วนท้ายเว็บ (FOOTER) ================= */
.footer {
    background: #212529;
    color: var(--background-white);
    padding: 3rem 1rem 0;
    margin-top: 3rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.footer h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-logo h2 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--background-white);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-contact p {
    margin-bottom: 0.5rem;
}

/* ไอคอนโซเชียล */
.social-icons a {
    color: var(--background-white);
    margin-right: 10px;
    font-size: 1.2rem;
    transition: 0.3s;
    padding: 0.3rem;
    border-radius: 4px;
}

.social-icons a:hover {
    background: rgba(255, 193, 7, 0.2);
    color: var(--secondary-color);
}

/* แถบล่างสุดของ footer */
.footer-bottom {
    text-align: center;
    padding: 1rem;
    background: #181a1d;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* ================= ฟอร์มค้นหาเส้นทาง ================= */
.form-wrapper {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* ฟอร์มแนวนอน */
.travel-form-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: var(--background-white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

/* กลุ่ม input */
.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Label */
.form-group label {
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Input + Icon */
.icon-input i {
    position: absolute;
    left: 10px;
    top: 50px;
    color: var(--primary-color);
}

.icon-input input {
    padding: 8px 8px 8px 30px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 180px;
}

/* ตัวอักษร "TO" */
.to-text {
    font-weight: bold;
    font-size: 1rem;
    align-self: center;
    color: #555;
}

/* ปุ่มค้นหา */
.btn-submit {
    background: var(--primary-color);
    color:var(--background-white);
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    height: 42px;
    align-self: center;
}

.btn-submit:hover {
    background: var(--background-btn);
}

/* Responsive ของฟอร์ม (มือถือ/จอเล็ก) */
@media (max-width: 768px) {
    .travel-form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .to-text {
        align-self: flex-start;
        margin: 0.5rem 0;
    }

    .btn-submit {
        width: 100%;
        align-self: stretch;
    }

    .icon-input input {
        min-width: unset;
        width: 100%;
    }
}
/* ================= สไลด์พื้นหลังด้านบน ================= */
#mainCarousel {
    position: relative;
    /* ไม่ต้อง fixed ถ้าอยากให้เลื่อนตามเพจ */
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    /* ความสูงครึ่งจอ หรือปรับ px เช่น 400px */
    z-index: 1;
    overflow: hidden;
}

#mainCarousel .carousel-inner,
#mainCarousel .carousel-item,
#mainCarousel img {
    height: 50vh;
    /* ให้รูปตามความสูงเดียวกัน */
    object-fit: cover;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(0);
}

/* ================= ฟอร์มรับสถานที่หน้า home  ================= */
/* Trip Type Selection */
.trip-type-selection {
    background: var(--background-white);
    padding: 5px 10px;
    border-radius: 50px;
}

.trip-type-label {
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.trip-type-label:hover {
    background: var(--background-btn);
    color: var(--background-white);
}

/* ปรับ form-floating ให้ฟอร์มดูทันสมัย */
.form-floating .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.search-btn {
    background: var(--primary-color);
    border-radius: 8px;
    transition: 0.3s;
}

.search-btn:hover {
    background: var(--background-btn);
}

.card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    background-color: var(--background-white);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    /* cursor: pointer; */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(21, 12, 255, 0.2);
}

.card-img-top {
    border-radius: 12px 12px 0 0;
    object-fit: cover;
    height: 160px;
}

.card-body h5 {
    font-weight: 600;
}

.btn-car {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; 
}

.btn-car:hover {
    background-color: var(--secondary-color);
    color: var(--background-white);
    border-color: var(--secondary-color);
}


/* ครอบทั้ง dropdown และตารางกลางจอ */
.center-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    /* ครอบเต็มความสูงหน้าจอ */
    padding: 20px;
    background-color:var(--background-white);
}

.center-screen label {
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.center-screen #fromLocation {
    max-width: 300px;
    width: 100%;
    margin-bottom: 20px;
}

.center-screen .table-responsive {
    width: 100%;
    max-width: 900px;
    overflow-x: auto;
}

/* เงา hover ของแถวตาราง */
.table-hover-shadow tbody tr:hover {
    background-color: var(--background-white);
    transition: all 0.3s ease;
}

/* ปรับ responsive */
@media (max-width: 768px) {
    .center-screen #fromLocation {
        max-width: 100%;
    }

    .center-screen .table-responsive {
        max-width: 100%;
    }

    .badge {
        font-size: 0.75rem;
    }
}
/* ปุ่มรายละเอียด */
.btn-detail {
    background-color: var(--primary-color);
    color: var(--background-white);
    border: none;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
}


/* ปุ่มรีวิว */
.btn-review {
    background-color: var(--secondary-color);
    color: #212529;
    border: none;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-review:hover {
    background-color: var(--secondary-color);
}


/* Section ของดาว */
.star-rating i {
    font-size: 2.5rem;
    margin: 0 5px;
    cursor: pointer;
    transition: color 0.2s;
}

/* เมื่อ hover */
.star-rating i:hover {
    color: var(--secondary-color);
    /* สีส้มตอน hover */
}

/* Section ของ textarea */
.review-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 1rem;
    resize: vertical;
}

/* จัดให้ label มี margin เหมาะสม */
.review-modal-container .form-label {
    font-weight: 500;
}

/* ================= Contact Page ================= */
.contact-hero-section {
    background: var(--background-btn);
    color: var(--background-white);
    padding: 120px 0 80px;
    /* รองรับ navbar fixed */
    text-align: center;
}

.contact-hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
}

.contact-hero-section p {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Card Layout */
.contact-section .card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.contact-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Contact Icon */
.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin: 0 auto 15px auto;
    transition: all 0.3s ease;
}

.contact-icon:hover {
    transform: scale(1.1);
}

/* Card Titles */
.contact-section .card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Card Text */
.contact-section .card-text {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

/* Buttons */
.contact-section .btn {
    border-radius: 50px;
    font-weight: 500;
    padding: 6px 16px;
    transition: all 0.3s ease;
}

.contact-section .btn-outline-primary:hover,
.contact-section .btn-outline-success:hover,
.contact-section .btn-outline-info:hover,
.contact-section .btn-outline-warning:hover {
    color: var(--background-white);
}

.contact-section .btn-light {
    border-radius: 50px;
    font-weight: 600;
    padding: 6px 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-hero-section h1 {
        font-size: 2.2rem;
    }

    .contact-hero-section p {
        font-size: 1rem;
    }
}