/* ── หน้าแรก (home) — ยกมาจาก main.php ของเว็บเดิมแบบตรงตัว เพื่อให้ UI ไม่ขยับ ── */

    .bg-white-50 {
        background-color: #f5f5f5 !important;
    }

    .form-control {
        font-size: 16px !important;
    }

    .preloader {
        z-index: 100;
        background: #fbfbfbb5;
    }

    .dots .dot {
        display: inline-block;
        width: 20px;
        height: 20px;
        margin: 0 10px;
        border-radius: 50%;
        background: #017acc;
        -webkit-animation: dot-dot-dot 1.4s linear infinite;
        animation: dot-dot-dot 1.4s linear infinite;
    }

    .img-slide,
    .carousel-control-prev,
    .carousel-control-next {
        height: 320px !important;
    }

    .carousel-control-next,
    .carousel-control-prev {
        width: 10%;
    }

    #searchform {
        width: 100%;
        height: 710px;
    }

    .icon-menu {
        background-color: #017acc;
        width: 100px;
        height: 100px;
        border-radius: 100%;
        line-height: 30px;
        text-align: center;
        margin: 0px auto;
    }

    button:focus {
        outline: unset;
    }

    .column {
        padding: 0;
    }

    .column:last-child {
        padding-bottom: 20px;
    }

    .column::after {
        content: '';
        clear: both;
        display: block;
    }

    .column div:first-child {
        margin-left: 0;
    }

    .column div span {
        position: absolute;
        bottom: -20px;
        left: 0;
        z-index: -1;
        display: block;
        width: 300px;
        margin: 0;
        padding: 0;
        color: #444;
        font-size: 18px;
        text-decoration: none;
        text-align: center;
        -webkit-transition: .3s ease-in-out;
        transition: .3s ease-in-out;
        opacity: 0;
    }

    figure {
        margin: 0;
        padding: 0;
        background: #fff;
        overflow: hidden;
        border-radius: 0.25rem;
    }

    figure:hover+span {
        bottom: -36px;
        opacity: 1;
    }

    /* Zoom In #1 */
    .hover01 figure img {
        -webkit-transform: scale(1);
        transform: scale(1);
        -webkit-transition: .3s ease-in-out;
        transition: .3s ease-in-out;
    }

    .hover01 figure:hover img {
        -webkit-transform: scale(1.3);
        transform: scale(1.3);
    }



    @media (max-width: 600px) {
        .img-promo:hover {
            -webkit-transform: unset !important;
            transform: unset !important;
        }

        .route-link {
            font-size: 16px;
        }
    }

    .jbDibN {
        display: block;
        outline: none;
        height: 1em;
        width: 1em;
        fill: currentcolor;
        color: rgb(245 245 245);
        border-radius: 0px;
        padding: 0px;
        font-size: 1.5rem !important;
        cursor: pointer;
    }

    .close {
        color: #dee2e6 !important;
        opacity: 1;
        text-shadow: 0 0 black;
    }

    button.close {
        padding: 0;
        background-color: transparent;
        border: 0;
    }

    .route-text,
    .route-text:hover {

        border-bottom-left-radius: 0.25rem !important;
        border-bottom-right-radius: 0.25rem !important;
    }

    .img-promo {
        display: block;
        width: 100%;
        border-radius: 0.25rem;
        transform: scale(1);
        -webkit-transition: .3s ease-in-out;
        transition: .3s ease-in-out;
    }

    /* เดิมเป็น class .pe-2 ของ Bootstrap ติดอยู่บน <a> ที่ครอบรูปโปรโมชั่น
       ยุบมาไว้ที่นี่เพราะมีผลเฉพาะบริบทนี้ที่เดียว */
    .news-promo-item a {
        padding-right: .5rem;
    }

    .img-promo:hover {
        -webkit-transform: scale(1.1);
        transform: scale(1.1);
    }

    .route-link a,
    .route-link a:hover {
        color: #ff6701;
    }
    .popular-destinations {
        width: 100%;
        background-color: #fff;
        padding-top: 60px;
        padding-bottom: 60px;
        /* Responsive Styles */
    }

    .popular-destinations .wrap-popular {
        max-width: 980px;
        margin: 0 auto;
    }

    .popular-destinations .wrap-popular .header {
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .popular-destinations .wrap-popular .header h2 {
        font-size: 24px;
    }

    .popular-destinations .wrap-popular .header a {
        text-decoration: none;
        color: #ff6500;
    }

    .popular-destinations .wrap-popular .items {
        padding: 0 15px;
    }

    .popular-destinations .wrap-popular .items a {
        text-decoration: none;
    }

    .popular-destinations .wrap-popular .items .card-routes {
        position: relative;
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 0.5rem;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
        transition: box-shadow 0.3s ease;
    }

    .popular-destinations .wrap-popular .items .card-routes .route-img {
        width: 100%;
        height: 300px;
        overflow: hidden;
    }

    .popular-destinations .wrap-popular .items .card-routes .route-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top;
        transition: transform 0.3s ease;
    }

    .popular-destinations .wrap-popular .items .card-routes .route-name {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: transparent;
        background: linear-gradient(180deg, transparent, #000);
        box-sizing: border-box;
        display: flex;
        justify-content: start;
        gap: 5px;
        padding: 24px 15px;
    }

    .popular-destinations .wrap-popular .items .card-routes .route-name .name {
        flex: 1;
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        margin: 0;
    }

    .popular-destinations .wrap-popular .items .card-routes .route-name .price {
        font-size: 14px;
        color: #fff;
        font-weight: 500;
    }

    .popular-destinations .wrap-popular .items .card-routes:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .popular-destinations .wrap-popular .items .card-routes:hover .route-img img {
        transform: scale(1.05);
    }

    @media (max-width: 768px) {
        .popular-destinations .wrap-popular .items {
            padding: 0 15px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-img {
            height: 250px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-name .name {
            font-size: 14px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-name .price {
            font-size: 14px;
        }
    }

    @media (max-width: 576px) {
        .popular-destinations {
            padding: 30px 0px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-img {
            height: 250px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-name {
            padding: 10px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-name .name {
            font-size: 14px;
        }

        .popular-destinations .wrap-popular .items .card-routes .route-name .price {
            font-size: 14px;
        }
    }

    .news-hero {
        width: 100%;
        background-color: #fff;
        padding-top: 60px;
        padding-bottom: 60px;
        /* Responsive Styles */
    }

    .news-hero .wrap-news {
        max-width: 980px;
        margin: 0 auto;
    }

    .news-hero .wrap-news .header {
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .news-hero .wrap-news .header h2 {
        font-size: 24px;
        margin-bottom: 0;
    }

    .news-hero .wrap-news .header a {
        text-decoration: none;
        color: #ff6500;
    }

    .news-hero .wrap-news .items {
        padding: 0 10px;
    }

    .news-hero .wrap-news .items a {
        text-decoration: none;
    }

    .news-hero .wrap-news .items .card-news {
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
        transition: box-shadow 0.3s ease;
    }

    .news-hero .wrap-news .items .card-news .card-img {
        width: 100%;
        height: 170px;
        overflow: hidden;
        padding: 0;
    }

    .news-hero .wrap-news .items .card-news .card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top;
        transition: transform 0.3s ease;
    }

    .news-hero .wrap-news .items .card-news .card-text {
        padding: 15px 10px;
    }

    .news-hero .wrap-news .items .card-news .card-text .title h2 {
        font-size: 14px;
        margin-bottom: 4px;
        color: #333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .news-hero .wrap-news .items .card-news .card-text .desc .excerpt {
        font-size: 12px;
        color: #666;
        margin-bottom: 0px;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .news-hero .wrap-news .items .card-news .card-text .desc .created-at {
        font-size: 10px;
        color: #999;
    }

    .news-hero .wrap-news .items .card-news .card-text .cta {
        margin-top: 10px;
        text-align: center;
    }

    .news-hero .wrap-news .items .card-news .card-text .cta .btn-read-more {
        display: inline-block;
        border: 1px solid #ff6701;
        color: #ff6701;
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 5px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .news-hero .wrap-news .items .card-news .card-text .cta .btn-read-more:hover {
        background-color: #ff6701;
        color: #fff;
    }

    .news-hero .wrap-news .items .card-news:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .news-hero .wrap-news .items .card-news:hover .card-img img {
        transform: scale(1.05);
    }

    @media (max-width: 768px) {
        .news-hero .wrap-news .items {
            padding: 0 15px;
        }

        .news-hero .wrap-news .items .card-news .card-img {
            height: 250px;
        }

        .news-hero .wrap-news .items .card-news .card-text .title h2 {
            font-size: 16px;
        }

        .news-hero .wrap-news .items .card-news .card-text .desc .excerpt {
            font-size: 14px;
        }

        .news-hero .wrap-news .items .card-news .card-text .desc .created-at {
            font-size: 12px;
        }
    }

    @media (max-width: 576px) {
        .news-hero {
            padding: 40px 0px;
        }

        .news-hero .wrap-news .items .card-news .card-img {
            height: 250px;
        }

        .news-hero .wrap-news .items .card-news .card-text {
            padding: 10px;
        }

        .news-hero .wrap-news .items .card-news .card-text .title h2 {
            font-size: 16px;
        }

        .news-hero .wrap-news .items .card-news .card-text .desc .excerpt {
            font-size: 14px;
        }

        .news-hero .wrap-news .items .card-news .card-text .desc .created-at {
            font-size: 12px;
        }
    }

    .item-quick-menu {
        width: 120px;
        height: 120px;
        padding: 20px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: #ff6500;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
    }

    .item-quick-menu:hover {
        transform: translateY(-5px);
    }

    .item-quick-menu a {
        text-decoration: none;
        color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .item-quick-menu a:hover {
        color: #fff;
    }

    .item-quick-menu a i {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .item-quick-menu a span {
        font-size: 18px;
        font-weight: bold;
    }

    @media (max-width: 576px) {
        .item-quick-menu {
            width: 90px;
            height: 90px;
            padding: 0px;
        }

        .item-quick-menu a i {
            font-size: 24px;
            margin-bottom: 8px;
        }

        .item-quick-menu a span {
            font-size: 16px;
        }
    }

    .about-service {
        position: relative;
        overflow: hidden;
        width: 100%;
        background-color: transparent;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .about-service .bg-about-service {
        background-image: url("../images/site/home/woman-red-photo.webp");
        background-size: cover;
        background-position: center;
        background-position-y: 10%;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -2;
    }

    .about-service .overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .about-service .wrapper {
        padding: 30px 20px;
    }

    .about-service .wrapper .wrap-about-service {
        max-width: 980px;
        margin: 0 auto;
        color: #fff;
        text-align: center;
    }

    .about-service .wrapper .wrap-about-service .wrap-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .about-service .wrapper .wrap-about-service .wrap-desc {
        font-size: 16px;
        line-height: 28px;
        max-width: 800px;
        margin: 0 auto;
    }
        .owl-carousel .item {
            transition: transform 0.3s ease-in-out;
        }

        .owl-carousel .item:hover {
            transform: scale(1.1);
        }

        /* เดิมคือ class text-decoration-none d-flex justify-content-center บน <a>
           และ p-2 บน <img> ยุบมารวมไว้ตรงนี้ */
        .owl-carousel .item a {
            display: flex;
            justify-content: center;
            text-decoration: none;
        }

        .owl-carousel .item a img {
            max-width: 100%;
            max-height: 150px;
            width: auto;
            height: auto;
            padding: .5rem;
        }

    /* ฟอร์มค้นหาของระบบจอง — บล็อกนี้อยู่แยกใน main.php เดิม */
    #btn-search {
        font-size: 18px !important;
        font-weight: 600 !important;
    }

    #busx-search-form {
        padding-bottom: 50px;
        min-height: 230px;
    }

/* ===== ค่าที่เดิมเขียน inline อยู่ใน main.php — ย้ายมารวมไว้ที่นี่ ===== */
.page-home section {
    width: 100%;
}

/* ── Hero (เดิมคือ .bg-head + .p-t-title + .text-title ที่ layout.css) ──────
   ย้ายมารวมไว้ที่นี่เพราะใช้เฉพาะหน้าแรกหน้าเดียว */
.hero-section {
    width: 100%;
    background-image: url("../images/site/banner/bn-busandvan.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 50px 15px 0;
    text-align: center;
}

.hero-title {
    padding-bottom: 15px;
    font-size: 24px;
    color: #fff;
}

@media (min-width: 576px) {
    .hero-container {
        padding: 100px 15px 30px;
    }

    .hero-title {
        padding-bottom: 5px;
        font-size: 28px;
    }
}

/* หน้าอังกฤษ — en/header.inc.php ของเว็บเดิมตั้ง padding-bottom สลับกับฝั่งไทย (มือถือ 5px · จอใหญ่ 15px) */
html[lang="en"] .hero-title {
    padding-bottom: 5px;
}

@media (min-width: 576px) {
    html[lang="en"] .hero-title {
        padding-bottom: 15px;
    }
}

/* หน้าอังกฤษ — <style> ของ en/main.php ต่างจาก main.php 3 จุด: การ์ดบทความ · ระยะรอบรายการบทความ ≤991px
   · ตัวอักษรปุ่มลัด (เลื่อนตั๋ว/คืนตั๋ว/พิมพ์ตั๋ว) 16px แทน 18px */
html[lang="en"] {
    .news-hero .wrap-news .items .card-news {
        height: 100%;
        margin-bottom: 10px;
    }

    @media (max-width: 991px) {
        .news-hero .wrap-news .items {
            margin: 10px 0;
        }
    }

    .item-quick-menu a span {
        font-size: 16px;
    }

    /* หน้าแรกอังกฤษของ production ยังเป็น XHTML (almost standards) บรรทัดวันที่ไม่นับ strut 14px
       ของ .desc จึงสูงพอดี line-height · doctype ใหม่นับ การ์ดสูงเกิน 1px (กับดักข้อ 13 · เซสชัน 18)
       ฝั่งไทย production เปลี่ยนเป็น <!DOCTYPE html> แล้ว จึงไม่ต้องแก้ */
    .news-hero .wrap-news .items .card-news .card-text .desc .created-at {
        display: block;
    }
}

/* ── กล่องเนื้อหากว้าง 980px ที่ใช้ซ้ำหลาย section ──────────────────────────
   เดิมคือ Bootstrap .container + style="max-width:980px" ผสมกันทุกจุด
   ยุบเหลือคลาสเดียว ใช้ซ้ำได้ตามหลัก "1 declaration ใช้ได้หลายที่" */
.section-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-quick-menu {
    padding-top: 40px;
    padding-bottom: 24px;
    background-color: #f5f5f5;
}

.section-quick-menu .col-4 {
    padding: 0;
}

.quick-menu-list {
    margin-bottom: 24px;
    padding-top: 8px;
    text-align: center;
}

.section-news-promotion,
.section-providers {
    padding-top: 50px;
    padding-bottom: 24px;
}

.section-news-promotion {
    background-color: #fff;
}

.section-providers,
.section-routes-recommend {
    background-color: #f5f5f5;
}

.section-routes-recommend {
    padding-top: 60px;
    padding-bottom: 24px;
}

.page-home .section-title h2 {
    font-size: 24px;
}

/* หัวข้อที่วางคู่กับลิงก์ "ดูเพิ่มเติม" — เดิมคือ d-flex justify-content-between
   align-items-center บนตัว .section-title เอง ยุบเข้ามาเป็นส่วนหนึ่งของ class นี้ */
.page-home .section-news-promotion .section-title,
.page-home .section-providers .section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
}

/* h2 มี margin-bottom ของ Bootstrap ติดมาเป็นค่าเริ่มต้น (.5rem) แต่ของเดิมไม่มี
   ระยะห่างส่วนนี้ ต้องตัดทิ้งไม่งั้น .section-title จะสูงเกินจริงไป 8px */
.page-home .section-news-promotion .section-title h2,
.page-home .section-providers .section-title h2 {
    margin-bottom: 0;
}

.news-promo-list,
.section-providers .owl-carousel {
    margin-bottom: 24px;
}

.page-home .popular-destinations .header h2,
.page-home .news-hero .header h2 {
    margin-bottom: 0;
}

.page-home .link-view-more {
    color: #ff6700;
}

.routes-recommend-content {
    margin-bottom: 48px;
    text-align: center;
}

.page-home .list-routes-recommend {
    padding-top: 16px;
    font-size: 14px;
    line-height: 32px;
}

.list-routes-recommend .row {
    text-align: center;
}

@media (min-width: 576px) {
    .list-routes-recommend .row {
        text-align: left;
    }
}
