@media screen and (max-width: 1399px) {
    .home-about-us h1 {
        padding: 30px 0px;
    }
}

@media screen and (max-width: 1199px) {
    .collapse:not(.show) {
        display: none !important;
    }
    .animeslide-slide {
        min-height: 420px;
    }
    .home-about-us h1 {
        font-size: 25px;
        line-height: 34px;
    }
    .about-as-text {
        padding: 1.6rem 2rem;
    }
    .brand-logos a {
        display: block;
        padding: 10px;
    }
    .finance-info {
        background-color: transparent;
    }
}

@media screen and (max-width: 1024px) {
    .sidebar {
        position: fixed !important;
        left: 0;
        top: 56px;
        z-index: 1050;
        width: 280px !important;
        min-width: 280px !important;
        overflow: hidden;
        height: calc(100vh - 56px);
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
    }
    .sidebar.open {
        transform: translateX(0);
        overflow-y: auto;
    }
    .sidebar .sidebar-content {
        width: 280px;
        transform: none;
        transition: none;
    }
    .sidebar.open .sidebar-content {
        transform: none;
    }
    .menu-toggle {
        top: 15px;
        left: 15px;
        padding: 10px;
        font-size: 1.1rem;
    }
    .main-content {
    }
}

@media screen and (max-width: 991px) {
    .animeslide-slide {
        min-height: 385px;
    }
    .home-title {
        line-height: 36px;
    }
    .animeslide-slide .container {
        margin-top: 6%;
    }
    .home-about-us h1 {
        line-height: 39px;
    }
    .about-as-text {
        padding: 7.6rem 2rem;
    }
    .brand-logos a {
        display: block;
        padding: 10px;
    }
    .testimonial-slider .animeslide-bottom,
    .add-slider .animeslide-bottom {
        position: relative;
        z-index: 1002;
        bottom: 0;
        left: auto;
        right: auto;
        max-width: 515px;
    }
    .testimonial-slider .animeslide-bottom .cell,
    .add-slider .animeslide-bottom .cell {
        position: initial;
    }
    .testimonial-slider .swiper-pagination,
    .add-slider .swiper-pagination {
        text-align: left;
    }
    .floating-bar {
        display: block;
    }
    .car-details-sticky-top {
        position: -webkit-sticky;
        position: sticky;
        top: 157px;
        z-index: 1010;
        border-bottom: 1px solid #dee2e6;
        background: #f9f9f9;
    }
    .location-accordion .location-hero-img {
        height: 240px;
    }
    .location-accordion .map-container-google {
        height: 280px;
    }
}

@media screen and (max-width: 768px) {
    .megamenu {
        margin-left: 0;
        margin-right: 0;
    }

    .megamenu > li {
        margin-bottom: 30px;
    }

    .megamenu > li:last-child {
        margin-bottom: 0;
    }

    .megamenu.dropdown-header {
        padding: 3px 15px !important;
    }

    .navbar-nav .open .dropdown-menu .dropdown-header {
        color: #fff;
    }
    .dropdown-container,
    .price-slider-container,
    .kms-slider-container {
        position: initial;
    }
    #dropdownHeaderMakesModels {
        border-bottom-right-radius: 0px;
        border-bottom-left-radius: 0px;
    }
    #dropdownHeaderPriceFilter {
        border-radius: 0px;
    }
    #dropdownHeaderKmFilter {
        border-top-right-radius: 0px;
        border-top-left-radius: 0px;
    }
    .dropdown-content {
        overflow-y: scroll;
        padding-bottom: 13rem;
        height: 100%;
        max-height: 100%;
    }
    .save-button-container {
        position: absolute;
        width: 100%;
        bottom: 0;
        border-radius: 0px;
        padding: 15px 10px 10px 10px;
    }
    .search-dropdown-menu,
    .filter-content {
        position: fixed;
        height: 95%;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border: 0px solid #1b43a0;
        border-radius: 16px 16px 0px 0px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1050;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border-top: 0px solid #1b43a029;
        top: 5%;
    }
    .menu-hover-bg:before {
        content: "";
        height: 100%;
        width: 100%;
        position: absolute;
        background: #333;
        z-index: 1030;
        opacity: 0.5;
        pointer-events: none;
        left: 0;
        right: 0;
        top: 0;
    }
    .dropdown-top-title {
        color: #3a393b;
        font-size: 14px;
        line-height: 15px;
    }
    .dropdown-top-title button {
        border-radius: 40px;
        background: #1b43a014;
        border: 0px;
        color: #1b43a0;
        width: 32px;
        height: 32px;
        flex-shrink: 0;
        aspect-ratio: 1 / 1;
        position: absolute;
        top: 15px;
        right: 15px;
    }
    .back-button-main {
        padding: 15px 20px 12px 20px;
    }
    .home-about-us h1 {
        padding: 4.3rem 0rem;
    }
    .about-as-text {
        padding: 3.6rem 2rem;
    }
    .home-title a {
        display: none;
    }
    .car-filters {
        display: none;
    }
    .sidebar {
        left: 0;
        right: 0;
        width: 100% !important;
        min-width: 100% !important;
        top: 56px;
        bottom: 0;
        position: fixed !important;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        overflow: hidden;
        transform: translateY(100vh);
        transition: transform 0.3s ease-in-out;
    }
    .sidebar.open {
        transform: translateY(0);
        overflow-y: auto;
    }
    .sidebar .sidebar-content {
        width: 100%;
        padding-bottom: 90px;
        transform: none;
        transition: none;
    }
    .sidebar.open .sidebar-content {
        transform: none;
    }
    .scroll-container {
        max-width: 830px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        margin: 0;
    }

    .scroll-container::-webkit-scrollbar {
        height: 6px;
        display: none;
    }

    .scroll-container:hover {
        scrollbar-width: thin;
        -ms-overflow-style: auto;
    }

    .scroll-container:hover::-webkit-scrollbar {
        display: block;
    }

    .scroll-container:hover::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .scroll-container:hover::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

    .scroll-container:hover::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }

    .scroll-container::-webkit-scrollbar {
        display: none;
    }
    .thumbSwiper {
        display: none;
    }
    .nav-link {
        font-size: 14px;
        padding: 15px 10px !important;
    }

    .nav-link i {
        display: block;
        margin-bottom: 5px;
        margin-right: 0 !important;
    }

    .nav-pills .nav-item .nav-link i {
        display: none;
    }
    .main-title {
        font-size: 14px;
    }

    .package-headers,
    .features-grid {
        grid-template-columns: 1fr 100px 100px 100px;
        gap: 10px;
    }

    .package-title {
        font-size: 18px;
    }

    .package-price {
        font-size: 16px;
    }

    .btn-package {
        padding: 8px 12px;
        font-size: 12px;
    }

    .feature-name {
        font-size: 13px;
    }

    .checkmark {
        font-size: 16px;
    }
    .footer-floating-bar-service {
        position: fixed;
        width: 100%;
        bottom: 0;
        left: 0;
        right: 0;
        border: 1px solid rgba(27, 67, 160, 0.16);
        background: #edf0f8;
        padding: 15px 10px;
        text-align: center;
        z-index: 10;
    }
    .service-container {
        min-height: 77vh;
    }
    .header-slant {
        height: 7vw;
    }
    .car-card {
    }

    .price-tag {
        font-size: 1.8rem;
    }

    .btn-section {
        flex-direction: column;
    }

    .timeline-line {
        left: 30px;
    }
    .timeline-icon {
        left: 0;
        transform: translateX(0);
    }
    .timeline-content {
        width: calc(100% - 80px);
        left: 75px !important;
    }
    .article-title {
        font-size: 1.8rem;
    }

    .article-body {
        padding: 1.5rem;
    }

    .article-meta {
        gap: 1rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .article-text table {
        font-size: 0.9rem;
    }

    .article-text table th,
    .article-text table td {
        padding: 8px 12px;
    }

    .listing-slider .swiper-wrapper {
        height: auto !important;
        min-height: auto !important;
    }
    .cc-payment {
        display: none;
    }
    .shopping-cart .table thead {
        display: none;
    }
    .shopping-cart .table tr {
        display: grid;
    }
    .scroll-hint {
        display: block;
    }
    .compare-col {
        width: 260px;
    }
}

@media screen and (max-width: 576px) {
    .animeslide-slide {
        min-height: 250px;
        background-position: center center;
    }
    .animeslide-slide::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 0;
    }
    .animeslide-slide .container {
        position: relative;
        z-index: 1;
        margin-top: 3%;
    }
    .slider-text h1 {
        font-size: 22px;
        line-height: 28px;
        margin-bottom: 0.5rem !important;
    }
    .animeslide-slide.swiper-slide-active .animeslide-heading {
        font-size: 14px;
        margin-bottom: 4px;
    }
    .slider-text h6 {
        font-size: 12px;
        margin-top: 15px;
    }
    .animeslide-desc {
        margin-bottom: 0.5rem !important;
    }
    .animeslide-desc .btn {
        padding: 0.35rem 1rem;
        font-size: 0.8rem;
    }
    .main-slider .animeslide-bottom {
        right: 0 !important;
        left: 0 !important;
        bottom: 5% !important;
        max-width: 100% !important;
        justify-content: center;
        text-align: center;
    }
    .main-slider .animeslide-bottom .cell {
        display: none;
    }
    .add-slider .animeslide-bottom {
        right: 0;
        bottom: -29%;
        padding-bottom: 0px;
        position: relative;
        background: #3a393b !important;
    }
    .home-about-us h1 {
        padding: 2.6rem 0rem;
    }
    .about-as-text h3 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    .breadcrumb-item + .breadcrumb-item::before {
        padding-right: 5px;
    }
    .breadcrumb-item + .breadcrumb-item {
        padding-left: 5px;
    }
    .car-title h1 {
        font-size: 15px;
    }
    .car-listing .swiper-button-next,
    .car-listing .swiper-button-prev {
        display: none;
    }
    .listing-item {
        padding: 0.75rem 1rem;
    }
    .label {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    .value {
        font-size: 0.95rem;
    }
    .package-headers,
    .features-grid {
        grid-template-columns: 1fr 80px 80px 80px;
        gap: 8px;
    }

    .package-title {
        font-size: 16px;
    }

    .package-price {
        font-size: 14px;
    }

    .btn-package {
        padding: 6px 8px;
        font-size: 11px;
    }

    .feature-name {
        font-size: 14px;
    }

    .popular-badge {
        font-size: 11px;
    }
    .three-steps-buy-car-number-title h4 label {
        display: none;
    }
    .three-steps-buy-car-number-title
        + .three-steps-buy-car-number-title::before {
        float: left;
        padding-right: 0.5rem;
        color: rgb(0, 75, 141);
        content: "→";
        font-size: 25px;
        position: absolute;
        top: -12px;
        left: -30px;
    }
    .modal-dialog {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }
    .modal-content {
        height: auto !important;
        min-height: 100% !important;
        border-radius: 0 !important;
        border: 0;
    }
    .calendar-container.mobile {
        overflow: visible;
        max-height: none;
        padding-bottom: 130px;
    }
    .calendar-container .date-section {
        display: block;
    }
    .calendar-container .calendar-wrapper {
        display: contents;
    }
    /* Fluid calendar cells — prevent horizontal overflow on small/old devices */
    .calendar-container .flatpickr-months {
        padding: 12px 10px 10px 10px !important;
    }
    .calendar-container .flatpickr-days {
        padding: 0 10px 10px 10px !important;
    }
    .calendar-container .flatpickr-day,
    .calendar-container.mobile .flatpickr-day {
        width: auto !important;
        min-width: 0 !important;
        min-height: 40px !important;
        font-size: 12px !important;
    }
    .calendar-container .dayContainer {
        gap: 1px !important;
    }
    .calendar-container .flatpickr-weekday {
        font-size: 11px !important;
    }
    .mobile-checkbox .form-check .form-check-label {
        padding-left: 10px;
        cursor: pointer;
        color: #3a393b;
        font-size: 14px;
        line-height: 20px;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }
    .package-list li {
        font-size: 12px;
    }
    .placeholder-text {
        padding: 0px 8px;
    }
    .offcanvas-body .service-sidebar {
        height: auto;
        padding-bottom: 150px;
    }
    .calendar-container.mobile .flatpickr-prev-month,
    .calendar-container .flatpickr-next-month {
        top: 50% !important;
    }
    .exp-card {
        padding: 28px 20px;
    }

    /* Home search bar — compact for mobile so search button is visible without scrolling */
    .home-search-cars {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    .home-search-cars .home-title {
        font-size: 1.25rem;
        margin-bottom: 0.5rem !important;
    }
    /* Modern filter chips for vehicle type */
    .home-search-cars .car_types_div .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
        margin-bottom: 0.25rem !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 50px !important;
        background: #f8f9fa;
        color: #555;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    .home-search-cars .car_types_div .btn-check:checked + .btn {
        background: #1b43a0 !important;
        color: #fff !important;
        border-color: #1b43a0 !important;
        font-weight: 600;
    }
    .home-search-cars .row.g-2 {
        --bs-gutter-y: 0.35rem;
    }
    .home-search-cars .dropdown-header {
        padding: 8px 16px;
    }
    .home-search-cars .dropdown-label {
        font-size: 11px;
        margin-bottom: 1px;
    }
    .home-search-cars .dropdown-value {
        font-size: 13px;
    }
    .home-search-cars .col-xl-2.mt-5 {
        margin-top: 1rem !important;
    }
    .home-search-cars .col-xl-2 .d-flex {
        flex-direction: row;
    }
    .home-search-cars .col-xl-2 .d-flex .btn {
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
        font-size: 0.85rem !important;
    }
}

@media screen and (max-width: 415px) {
    .car-title h1 {
        font-size: 13px;
    }
    .package-list li {
        font-size: 11px;
    }
}

@media screen and (max-width: 315px) {
}
