@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

@font-face {
    font-family: 'Canva Sans';
    src: url('../fonts/canva-sans/CanvaSans-Regular.woff2') format('woff2'),
        url('../fonts/canva-sans/CanvaSans-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}



html,
body {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
}

a,
span {
    font-family: 'Montserrat', 'Kanit', sans-serif;

}

h1 {
    font-size: 2.45rem !important;
    line-height: 1 !important;
}

h2 {
    font-size: 1.96rem !important;
    /* ~80% ของ h1 */
    line-height: 0.8 !important;
    /* เพิ่มจาก h1 (0.8) ตามสัดส่วน */
}

h3 {
    font-size: 1.47rem !important;
    /* ~60% ของ h1 */
    line-height: 0.7 !important;
    /* เพิ่มจาก h1 (0.8) ตามสัดส่วน */
}

h4 {
    font-size: 1.225rem !important;
    /* ~50% ของ h1 */
    line-height: 0.8 !important;
    /* เพิ่มจาก h1 (0.8) ตามสัดส่วน */
}

h5 {
    font-size: 0.98rem !important;
    /* ~40% ของ h1 */

}

@media (max-width: 576px) {
    h1 {
        font-size: 1.65rem !important;
        line-height: 1.1 !important;
    }

    h2 {
        font-size: 1.68rem !important;
        /* ~80% ของ h1 mobile */
        line-height: 0.7 !important;
        /* เพิ่มจาก h1 (0.8) ตามสัดส่วน */
    }

    h3 {
        font-size: 1.26rem !important;
        /* ~60% ของ h1 mobile */
        line-height: 0.9 !important;
        /* เพิ่มจาก h1 (0.8) ตามสัดส่วน */
    }

    h4 {
        font-size: 1.05rem !important;
        /* ~50% ของ h1 mobile */
        line-height: 0.9 !important;
        /* เพิ่มจาก h1 (0.8) ตามสัดส่วน */
    }

    h5 {
        font-size: 0.84rem !important;
        /* ~40% ของ h1 mobile */

    }

    body {
        font-size: 0.7rem !important;

    }

    small {
        font-size: 7.7px !important;
        line-height: 0.98 !important;
    }
}

.pointer {
    cursor: pointer;
}

.text-main {
    color: #045990;
}

.btn-main {
    background-color: #f16225 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #ffffff !important;
}

.btn-letgo {
    background-color: #004ff0 !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #ffffff !important;

}

.bg-menu {
    background-image: linear-gradient(to right, #0c79b6, #253b7a);
    color: white;
    transition: background 0.3s ease;
}



.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
}


.nav-tabs .nav-link.active {
    background-color: transparent;
    border: none;
    color: #f16225 !important;
    font-weight: bold;
}

.nav-link {
    color: #ffffff;
    font-weight: 600;
    font-size: 20px;

}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.show {
    color: #f16225 !important;

}

.navbar-scrolled {
    background-color: #0b79bc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}



/* CSS */
:root {
    --hero-height: 70vh;
}

/* fixed background layer (อยู่เบื้องหลังทั้งหมด) */
.hero-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--hero-height);
    /* แสดงเฉพาะช่วง hero สูงเท่านี้ */
    background-image: url('../img/home-cover-04.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    /* อยู่หลังเนื้อหา */
    pointer-events: none;
}

/* ถ้าต้องการให้ background ขยายเต็ม viewport ตลอดเวลา ให้ใช้ height:100vh; */
.hero {
    height: var(--hero-height);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    /* ให้เนื้อหา hero อยู่เหนือ .hero-bg */
    color: white;
    /* ถ้าต้องการ อ่านง่าย ใส่ overlay บน .hero แทน .hero-bg */
}

main {
    position: relative;

    /* เนื้อหาหลักเลื่อนมาทับภาพ */
    background-color: #ffffff;
}

/* ตัวอย่าง overlay มืด */
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25));
}



.search-form {

    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;

    max-width: 600px;
    margin: auto;
}

.dropdown {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.dropdown label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #555;
    display: block;
    margin-bottom: 0.25rem;
}

.dropdown input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 0.25rem;
    z-index: 1000;
    display: none;
}

.dropdown-list div {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.dropdown-list div:hover {
    background: #ffec99;
}




.carousel img {
    width: 70px;
    max-height: 70px;
    border-radius: 50%;
    margin-right: 1rem;
    overflow: hidden;
}

.carousel-inner {
    padding: 1em;
}

@media screen and (min-width: 576px) {
    .carousel-inner {
        display: flex;
        width: 90%;
        margin-inline: auto;
        padding: 1em 0;
        overflow: hidden;
    }

    .carousel-item {
        display: block;
        margin-right: 0;
        flex: 0 0 calc(100% / 2);
    }
}

@media screen and (min-width: 768px) {
    .carousel-item {
        display: block;
        margin-right: 0;
        flex: 0 0 calc(100% / 3);
    }
}

.carousel .card {
    margin: 0 0.5em;
    border: 0;
}

.carousel-control-prev,
.carousel-control-next {
    width: 3rem;
    height: 3rem;
    background-color: grey;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}


.bg-cover {
    background-size: cover;
    background-position: center;
    height: 300px;
    /* กำหนดความสูงของ card */
    display: flex;
    align-items: center;
    justify-content: center;
}




.dropdown-passenger {
    position: relative;

}

.dropdown-menu-passenger {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 15px;
    width: 300px;
    z-index: 1000;
}

.passenger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.counter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.counter button {
    background: #f06222;
    color: #ffffff !important;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.counter span {
    min-width: 20px;
    text-align: center;
    font-size: 18px;
}

.btn-done {
    background: black;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
}

.station-nickname {}

.flatpickr-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    border: 0;
    padding: 0;
    margin: 0;
}

.flatpickr-align-right {
    left: auto !important;
    right: 8px !important;
}

/* Rounded button style (iOS-like) */
.btn-ios {
    border-radius: 23px !important;

    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

@media (max-width: 576px) {

    .btn-ios {
        border-radius: 14px !important;

        font-weight: 600;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }

    /* Override Bootstrap fs-* on mobile */
    .btn-station .station-nickname,
    .station-nickname {
        font-size: 98% !important;

    }

    /* st.name: keep to max 3 lines on mobile */
    .station-name {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.15;
        word-break: break-word;
    }

    /* Hide layout-navbar on mobile */
    .layout-navbar {
        display: none !important;
    }

    /* Remove border-radius on mobile for specific card */
    .card-no-radius-mobile {
        border-radius: 0px !important;
    }

    /* Rotate logo on mobile */
    .logo-rotate-mobile {
        transform: rotate(13deg);
    }
}
