/**
 * timetable.css — หน้ารายการผู้ให้บริการเดินรถ (/timetable)
 *
 * ยกมาจาก <style> ที่ฝังใน timetable.php ของเว็บเดิม (บรรทัด 327-642) ตรงตัวทุกค่า
 * ตรวจแล้วว่าตรงกับ HTML บน production ทุกไบต์
 */

.timetable-page {
    padding-top: 60px;
    background-color: #f4f5f7;
    min-height: 100vh;

    /* ── Hero ── */
    .wrap-header {
        position: relative;
        background-image: url(../images/site/banner/thailand-bus-travel-sunrise-website-banner.webp);
        background-position: bottom;
        background-size: cover;
        height: 280px;
        display: flex;
        align-items: center;
        justify-content: center;

        .overlay-header {
            position: absolute;
            inset: 0;
            background-color: #ff650029;
        }

        .container-header {
            position: relative;
            z-index: 1;
            width: 100%;
            text-align: center;
            padding: 0 24px;

            .title {
                margin-bottom: 14px;

                h1 {
                    font-size: 36px;
                    font-weight: 800;
                    color: #fff;
                    margin: 0 0 6px;
                    letter-spacing: -0.3px;
                    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
                }

                p {
                    font-size: 15px;
                    color: rgba(255, 255, 255, 0.78);
                    margin: 0;
                }
            }

            .breadcrumb-bar ul {
                list-style: none;
                padding: 0;
                margin: 0;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-wrap: wrap;
                gap: 4px;

                li a {
                    color: rgba(255, 255, 255, 0.75);
                    text-decoration: none;
                    font-size: 13px;
                    transition: color 0.15s;

                    &:hover {
                        color: #fff;
                    }
                }

                .separator span,
                .link-none span {
                    color: rgba(255, 255, 255, 0.4);
                    font-size: 13px;
                }
            }
        }
    }

    /* ── Content ── */
    .wrap-content {
        max-width: 1300px;
        margin: 0 auto;
        padding: 40px 24px 64px;

        .section-header {
            border-bottom: 1px solid #e5e7eb;
            padding-bottom: 16px;
            margin-bottom: 28px;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;

            .section-header-text {
                flex: 1;
            }

            .section-title {
                font-size: 24px;
                font-weight: normal;
                color: #111827;
                margin: 0 0 6px;
            }

            .section-desc {
                font-size: 15px;
                color: #6b7280;
                margin: 0;
            }

            .provider-count {
                font-size: 13px;
                color: #6b7280;
                background: #e5e7eb;
                padding: 4px 12px;
                border-radius: 20px;
                font-weight: 500;
                flex-shrink: 0;
            }
        }

        /* ── Grid ── */
        .list-carrier {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 18px;
        }
    }

    /* ── Card ── */
    .card-carrier {
        background: #fff;
        border-radius: 14px;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
        transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;

        &:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 32px rgba(0, 0, 0, 0.11);
            border-color: #bfdbfe;
        }

        .card-carrier-link {
            display: flex;
            flex-direction: column;
            text-decoration: none;
            height: 100%;
        }

        .card-carrier-logo {
            background: #f9fafb;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 124px;
            border-bottom: 1px solid #f0f0f0;

            img {
                max-width: 100%;
                max-height: 84px;
                width: auto;
                height: auto;
                object-fit: contain;
                transition: transform 0.22s ease;
            }
        }

        &:hover .card-carrier-logo img {
            transform: scale(1.04);
        }

        .card-carrier-body {
            padding: 14px 16px;
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;

            .card-carrier-name {
                font-size: 14px;
                font-weight: 600;
                color: #1f2937;
                line-height: 1.45;
                text-align: center;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
                transition: color 0.2s;
            }
        }

        &:hover .card-carrier-name {
            color: #0055cc;
        }
    }

    /* ── Responsive ── */
    @media (max-width: 1200px) {
        .wrap-content .list-carrier {
            grid-template-columns: repeat(4, 1fr);
        }
    }

    @media (max-width: 992px) {
        .wrap-header {
            height: 240px;
        }

        .wrap-header .container-header .title h1 {
            font-size: 28px;
        }

        .wrap-content {
            padding: 30px 18px 50px;

            .list-carrier {
                grid-template-columns: repeat(3, 1fr);
                gap: 14px;
            }
        }
    }

    @media (max-width: 768px) {
        padding-top: 52px;

        .wrap-header {
            height: 210px;

            .container-header {
                .title h1 {
                    font-size: 22px;
                }

                .title p {
                    font-size: 13px;
                }
            }
        }

        .wrap-content {
            padding: 24px 14px 44px;

            .section-header .section-title {
                font-size: 17px;
            }

            .list-carrier {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }
        }

        .card-carrier .card-carrier-logo {
            height: 100px;
            padding: 14px;

            img {
                max-height: 70px;
            }
        }

        .card-carrier .card-carrier-body .card-carrier-name {
            font-size: 13px;
        }
    }

    @media (max-width: 576px) {
        .wrap-header {
            height: 185px;

            .container-header .title h1 {
                font-size: 18px;
            }
        }

        .wrap-content {
            padding: 20px 12px 36px;

            .section-header .section-title {
                font-size: 15px;
            }

            .section-header .provider-count {
                font-size: 12px;
            }

            .list-carrier {
                gap: 10px;
            }
        }

        .card-carrier .card-carrier-logo {
            height: 88px;
            padding: 12px;

            img {
                max-height: 62px;
            }
        }

        .card-carrier .card-carrier-body {
            padding: 10px 12px;

            .card-carrier-name {
                font-size: 12px;
            }
        }
    }
}
