/* Responsive Design System */

/* ==========================================================================
   General / Desktop Overrides (Non-Media Query)
   ========================================================================== */

.hero-car {
    position: relative;
    right: 0;
    top: 0;
    transform: none !important;
    width: 100%;
    max-width: 500px;
    margin: 40px auto 0;
    display: block;
}

.floating-icon {
    display: none;
}

.search-wrapper {
    margin-top: -60px;
}

/* ==========================================================================
   Breakpoint: 1400px
   ========================================================================== */
@media (max-width: 1400px) {
    .search-wrapper {
        max-width: 90%;
    }
}

/* ==========================================================================
   Breakpoint: 1200px
   ========================================================================== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-car {
        width: 50%;
        right: 50%;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .price-badge {
        min-width: 80px;
    }

    .newsletter-title {
        font-size: 33px;
    }
  .fund-request-page .fund-request-header .badge-item {
    font-size: 11px;
  }
}

/* ==========================================================================
   Breakpoint: 992px (Tablets and Below)
   ========================================================================== */
@media (max-width: 992px) {
    [dir="ltr"] .range-values .price-badge-item {
        flex-direction: row-reverse;
    }

    .hero-btns {
        justify-content: center;
    }

    .logo-text {
        margin: auto;
        display: block;
        width: max-content;
    }

    .text-sm-center {
        text-align: center;
    }

    /* Header & Navigation */
    .navbar-brand .logo-text img {
        height: 32px;
    }

    .navbar-collapse {
        flex-basis: 100%;
        background: #fff;
        padding: 20px;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 15px;
    }

    nav.navbar-expand-lg .navbar-collapse {
        flex-basis: 100%;
        background: var(--light-bg);
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        margin-top: 0;
    }

    .navbar-collapse .navbar-nav {
        padding-top: 15px;
    }

    .navbar-toggler {
        border: none;
        padding: 2px;
        border-radius: 0;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler:not(.collapsed) .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
        background-size: 15px;
        opacity: 0.6;
    }

    .nav-item {
        margin-bottom: 5px;
    }

    .nav-link {
        text-align: right;
        padding: 10px 20px !important;
        border-radius: 12px;
        margin: 0 !important;
        font-weight: 500;
        transition: 0.3s;
        border-bottom: none !important;
    }

    .nav-item:hover .nav-link,
    .nav-link.active {
        background: rgba(26, 192, 198, 0.08);
        color: var(--primary-color) !important;
    }

    .nav-link:hover:not(.active) {
        background: #f8fafc;
    }

    .lang-switch-btn {
        gap: 5px;
        padding: 6px 6px;
    }

    .lang-switch-btn img {
        border-radius: 6px;
    }

    .custom-switch .form-check-input {
        width: 55px !important;
    }

    /* Hero Section */
    .hero-section {
        height: auto;
        padding: 64px 0 35px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        height: 367px;
        position: relative;
        top: 0;
        width: 100%;
        padding: 0 10px;
        z-index: 5;
    }

    .hero-subtitle-top {
        justify-content: center;
        margin-bottom: 5px;
        text-align: start;
        font-size: 14px;
    }

    .hero-title {
        margin-bottom: 30px;
        font-size: 22px;
        text-align: start;
        width: 240px;
        max-width: 100%;
        line-height: 38px;
    }

    .hero-btns {
        margin-bottom: 20px;
        width: 100%;
        justify-content: center;
    }

    .hero-car {
        position: relative;
        right: 0;
        top: 0;
        transform: none !important;
        width: 100%;
        margin-top: 30px;
    }

    .hero-car:hover {
        transform: scale(1.02);
    }

    .banner-slider .item {
        padding: 30px 0 20px;
        min-height: unset;
        height: 400px;
    }

    .img-item {
        display: none;
        z-index: 2 !important;
        height: 250px;
    }

    [dir="ltr"] .owl-item.active .img-item {
        right: -40px;
    }

    [dir="rtl"] .owl-item.active .img-item {
        left: -40px;
    }

    .owl-carousel .owl-dots {
        bottom: 150px;
        gap: 5px;
    }

    .testimonials-slider .owl-nav {
        margin-top: 20px;
        padding-top: 0;
    }

    .cards-home-page.owl-carousel .owl-dots {
        bottom: 0;
    }

    .hero-section .owl-dots {
        position: absolute;
        bottom: 83px;
        width: 100%;
        display: flex;
        justify-content: center;
        z-index: 10;
        margin: 0;
    }

    /* Search & Filters */
    .search-box {
        padding: 30px 20px;
    }

    .desktop-filters {
        display: none;
    }

    .mobile-filters {
        display: block;
    }

    .mobile-filter-container {
        display: flex;
        border: 1px solid #D1D2D4;
        padding: 15px;
        border-radius: 15px;
        position: relative;
    }

    .mobile-filter-container img {
        position: absolute;
        top: 17px;
        left: 15px;
    }

    .mobile-filter-container span {
        color: #999999;
    }

    .mobile-filter-container span.active {
        color: var(--black-text);
    }

    /* Mobile Filter Sheet */
    .mobile-filter-sheet {
        display: none;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-radius: 20px 20px 0 0;
        z-index: 9999;
        max-height: 85vh;
        flex-direction: column;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    }

    .mobile-filter-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #F0F0F0;
    }

    .mobile-filter-sheet-title {
        font-size: 17px;
        color: var(--black-text);
        margin: 0;
    }

    .mobile-filter-apply-btn,
    .mobile-filter-cancel-btn {
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 15px;
        cursor: pointer;
        padding: 5px 10px;
        transition: color 0.3s ease;
    }

    .mobile-filter-cancel-btn.has-selections {
        color: #E53E3E;
    }

    .mobile-filter-tabs {
        display: flex;
        border-bottom: 1px solid #F0F0F0;
        padding: 0 10px;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-filter-tab {
        flex: 1;
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        padding: 14px 8px;
        font-size: 14px;
        color: #99A1AF;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .mobile-filter-tab.active {
        border-bottom-color: var(--primary-color);
        color: var(--primary-color);
    }

    .mobile-filter-tab-badge {
        background: var(--primary-color);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
    }

    .mobile-filter-tab-content {
        flex: 1;
        overflow-y: auto;
        padding: 0;
    }

    .mobile-filter-tab-pane {
        display: none;
    }

    .mobile-filter-tab-pane .mobile-filter-options-list {
        max-height: 280px;
        overflow: auto;
    }

    .mobile-filter-tab-pane.active {
        display: block;
    }

    .mobile-filter-option {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 7px 20px;
        border-bottom: 1px solid #F5F5F5;
        cursor: pointer;
        transition: background 0.2s ease;
        margin: 0;
    }

    .mobile-filter-option:hover {
        background: #FAFAFA;
    }

    .mobile-filter-option-label {
        font-size: 15px;
        font-weight: 500;
        color: var(--text-gray);
    }

    .mobile-filter-checkmark {
        width: 22px;
        height: 22px;
        border: 2px solid #D1D5DB;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .mobile-filter-option input[type="checkbox"] {
        display: none;
    }

    .mobile-filter-option input[type="checkbox"]:checked~.mobile-filter-checkmark {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }

    .mobile-filter-option input[type="checkbox"]:checked~.mobile-filter-checkmark::after {
        content: '✓';
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
    }

    /* Range & Slider */
    .range-container-car-list .range-values .range-label {
        order: unset;
    }

    .range-container-car-list .noUi-horizontal {
        bottom: -20px;
    }

    .range-container-car-list .range-values {
        margin-top: 10px;
        padding-inline: 0;
        align-items: center;
    }

    .range-container-car-list {
        margin-top: 10px;
    }

    .range-container-car-list>.range-label {
        font-size: 18px;
        text-align: start;
        font-weight: 600;
    }

    .range-values .price-badge-item {
        background: #edf9fa;
        color: #364153;
        padding: 10px 16px;
        border-radius: 25px;
        font-weight: 700;
        font-size: 15px;
        text-align: center;
        margin: 0 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 100px;
    }

    .mobile-price-badges .range-label {
        display: block !important;
    }

    .noUi-horizontal {
        min-width: 25%;
    }

    /* Car Cards & Lists */
    .title-section h1 {
        font-size: 21px;
    }

    .cards-list-page .car-card {
        display: flex;
        margin-bottom: 0;
    }

    .cards-list-page .car-card .car-specs-grid {
        margin-bottom: 8px;
    }

    .cards-list-page .car-card .car-info-body {
        padding: 10px 10px 10px;
        min-width: 220px;
    }

    .cards-list-page .car-card .car-card-footer {
        padding-top: 5px;
        border: none;
    }

    .cards-list-page .car-card .btn-card-more {
        border-radius: 5px;
        padding: 8px 4px;
        font-size: 12px;
        min-width: 70px;
    }

    .cards-list-page .car-card .car-img-wrapper {
        height: auto;
        border-radius: 20px;
        min-width: 90px;
        max-width: 160px;
    }

    .cards-home-page .item {
        width: 100%;
    }

    .cards-home-page .car-card .btn-card-more {
        min-width: 100px;
    }

    .custom-check {
        justify-content: space-between;
        flex-direction: row-reverse;
    }

    /* Car Details Specific */
    .zoom-box {
        height: max-content;
    }

    .full-gallery-slider .item {
        height: calc(100vh - 200px);
    }

    .details-gallery {
        margin-bottom: 15px;
    }

    .price-fund-request {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .btn-primary-teal {
        width: max-content !important;
        min-width: unset;
    }

    .section-padding-top {
        padding-top: 80px;
    }

    .details-title {
        font-size: 24px;
    }

    .gallery-thumbs .thumb-item {
        width: calc(20% - 8px);
        height: 60px;
    }

    .price-value-sidebar {
        font-size: 26px;
    }

    .feature-list.two-cols {
        grid-template-columns: 1fr;
    }

    /* Newsletter & Start Trip */
    .newsletter-title {
        font-size: 22px;
    }

    .newsletter-submit-btn {
        padding: 0 21px;
        height: 50px;
        font-size: 15px;
    }

    .newsletter-illustration {
        flex: 0;
    }

    .start-trip-title {
        font-size: 30px;
    }

    .start-trip-subtitle {
        font-size: 14px;
        margin: 0 0 20px;
    }

    .start-trip-section {
        min-height: 320px;
    }

    .start-trip-btn {
        padding: 12px 25px;
        font-size: 15px;
    }

    /* Landing page */
    .fund-why-card {
        background: url(../img/landing-pag-bg-mobile.svg) no-repeat center center;
        background-size: 100%;
    }

    .fund-cta-btn {
        width: 80% !important;
        height: 60px;
    }

    .landing-fixed-link {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 30px 0;
        z-index: 5;
    }

    .fund-landing-page {
        padding-bottom: 0;
        margin-top: 84px;
    }

    .error-page-body {
        height: auto;
        overflow: visible;
        min-height: unset;
        display: block;
    }

    .error-title {
        font-size: 20px;
    }

    .btn-home {
        padding: 15px 35px;
        font-size: 16px;
    }

    .contact-box {
        padding: 10px 15px;
        margin-bottom: 20px;
    }

    .not-found-cars {
        padding: 10px;
        min-height: unset;
    }

    .not-found-cars img {
        width: 150px;
    }

    .not-found-cars a {
        min-width: 200px;
    }

    /* Fund Request - keep original design, improve mobile usability */
    .fund-request-page .main-content-wrapper {
        padding-bottom: 95px;
    }

    .fund-request-page .wizard-actions {
        box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.08);
    }

    .fund-request-page .wizard-actions .btn {
        min-width: 49%;
    }

    .fund-request-page .progress-indicator-card {
        margin-bottom: 15px;
    }
    .fund-request-page .fund-request-header .header-badges {
      display: none;
    }
    .fund-request-page .fund-request-header {
      padding: 15px 0;
    }
  .fund-request-page .progress-indicator-card {
    border:none;
    box-shadow: none;
    margin: 0;
  }
  .fund-request-page .progress-indicator-card .card-title {
    display: none;
  }
  .fund-request-page .progress-indicator-card .steps-nav  {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 65px;
    }
  .fund-request-page .steps-nav .step-nav-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 20px;
    right: unset;
    left: -120px;
    width: 170px;
    height: 1px;
    background: var(--border-color);
  }
  .total-progress-section {
    border-top: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }
  .fund-request-page .wizard-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   Breakpoint: 768px (Mobile & Handhelds)
   ========================================================================== */
@media (max-width: 768px) {

    /* Hero & Global */
    .img-banner {
        width: 108% !important;
        left: -4%;
    }

    .hero-section .item:before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
        opacity: 0.3;
        z-index: 2;
    }

    .hero-btns {
        gap: 10px;
    }

    .hero-btns .btn-main {
        min-width: 150px;
        padding: 6px 14px;
        font-size: 13px;
        gap: 5px;
        width: max-content;
    }

    .btn-main {
        width: 100%;
        justify-content: center;
    }

    /* Search & Sections */
    .search-box {
        padding: 30px 20px;
        border-radius: 25px;
    }

    .title-section h2 {
        font-weight: 700;
        font-size: 20px;
    }

    .title-section span {
        font-size: 14px;
    }

    .brand-slider {
        padding: 30px 0;
    }

    .brands-section {
        padding: 0 15px;
    }

    .brands-section .container {
        max-width: 100%;
        padding: 0;
    }

    .range-container {
        border: 0;
        justify-content: space-between;
        padding: 25px 0 60px;
    }

    .range-label {
        order: 2;
    }

    .range-values:first-of-type {
        order: 1;
    }

    .range-values:last-of-type {
        order: 3;
    }

    price-range {
        display: none;
    }

    .noUi-horizontal {
        position: absolute;
        bottom: 15px;
        width: 95%;
        left: 2.5%;
    }

    /* Car Details */
    .gallery-thumbs .thumb-item {
        width: calc(25% - 8px);
    }

    .details-header {
        text-align: center;
    }

    .price-sidebar-card {
        padding: 15px;
    }

    .price-sidebar-card .price-header {
        margin-bottom: 0px;
        line-height: 0px;
    }

    .details-quick-tags {
        justify-content: center;
        gap: 4px;
    }

    .price-label-sidebar {
        margin-bottom: 5px;
    }

    .tag-item {
        padding: 6px 10px;
        font-size: 11px;
        font-weight: 700;
        gap: 4px;
    }

    .tag-item img {
        width: 15px;
        height: 15px;
    }

    .tech-specs-section .specs-grid-wrapper .col-md-6 {
        width: 50%;
    }

    /* Testimonials & Partners */
    .testimonials-section {
        padding: 50px 0 40px;
    }

    .testimonial-card {
        padding: 22px 18px;
    }

    .partners-section {
        padding: 50px 0 60px;
    }

    .partners-filter-btns {
        gap: 10px;
    }

    .partners-btn {
        font-size: 13px;
        padding: 9px 16px;
    }

    /* Newsletter & Start Trip */
    .newsletter-section {
        padding: 90px 0 50px;
    }

    .newsletter-inner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .newsletter-illustration {
        flex: unset;
        width: 100%;
    }

    .newsletter-illustration>img {
        max-width: 140px;
        margin-right: 0;
    }

    .newsletter-float-icons {
        min-height: 100px;
    }

    .newsletter-content {
        width: 100%;
        order: 2;
    }

    .newsletter-title {
        font-size: 1.25rem;
        margin: 0;
        font-weight: 400;
        text-align: center;
    }

    .newsletter-title br {
        display: none;
    }

    .newsletter-input-group {
        max-width: 100%;
    }

    .nl-icon-pct {
        width: 35px;
        top: -6%;
        left: 35%;
    }

    .nl-icon-sale {
        width: 60px;
        top: 10%;
        right: 33%;
    }

    .nl-icon-pct2 {
        width: 55px;
        top: -20%;
        right: 39%;
    }

    .start-trip-section {
        min-height: 265px;
        background-position: 70% center;
    }

    .start-trip-btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    /* Landing page */
    .fund-feature-item {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 150px 10px 16px;
    }

    .fund-feature-info {
        text-align: right;
    }

    .fund-feature-info p {
        margin: 0;
    }

    .fund-why-card {
        padding: 36px 20px 100px;
    }

    .fund-why-title {
        font-size: 22px;
    }

    .fund-section-title {
        font-size: 21px;
    }

    .animation-car img {
        animation: car-drive 6s linear infinite;
    }

    @keyframes car-drive {
        0% {
            transform: translateX(-120vw);
            opacity: 1;
        }

        40% {
            transform: translateX(120vw);
            opacity: 1;
        }

        40.01% {
            transform: translateX(-120vw);
            opacity: 0;
        }

        99.99% {
            transform: translateX(-120vw);
            opacity: 0;
        }

        100% {
            transform: translateX(-120vw);
            opacity: 1;
        }
    }

    /* Fund Request - compact spacing only */
    .fund-request-page .fund-request-header .header-title {
        font-size: 30px;
        line-height: 1.35;
    }

    .fund-request-page .fund-request-header .header-badges {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .fund-request-page .wizard-content-card,
    .fund-request-page .progress-indicator-card {
        padding: 18px;
    }
    .offers-list {
      gap: 20px;
    }
    .compare-table .select-offer-btn {
      min-width: 100%;
      font-size: 13px;
    }
  .complete-main-card {
    padding: 15px;
  }
  .confirmation-step-header {
    margin-bottom: 25px;
  }
  #backToOffersBtn {
    width: 65%;
  }
}

/* ==========================================================================
   Breakpoint: 576px (Small Mobile)
   ========================================================================== */
@media (max-width: 576px) {
    .navbar-brand .logo-text {
        font-size: 1.2rem;
    }

    .range-slider {
        width: 100%;
    }

    .tech-specs-section .specs-grid-wrapper .col-md-6 {
        width: 100%;
    }

    .gallery-thumbs .thumb-item {
        width: calc(33.33% - 8px);
    }

    .mobile-filter-container {
        font-size: 3vw;
    }

    .mobile-filter-container img {
        top: 14px;
    }

    .search-title {
        font-size: 4vw;
    }

    .search-title img {
        width: 20px;
    }

    .reset-link {
        font-size: 3vw;
    }

    .newsletter-illustration>img {
        max-width: 30vw;
    }

    .nl-icon-pct {
        width: 8vw;
        top: 0vw;
        left: 29vw;
    }

    .nl-icon-sale {
        width: 13vw;
        top: 3vw;
        right: 27vw;
    }

    .nl-icon-pct2 {
        width: 12vw;
        top: -6vw;
        right: 36vw;
    }

    /* Landing page */

    .fund-cta-btn {
        width: 50% !important;
    }

    .fund-feature-item {
        padding: 10px 45px 10px 16px;
    }

    .owl-carousel .owl-item .btn-main img,
    .btn-main img {
        width: 14px;
    }

    .img-banner {
        animation: unset;
    }

    /* Fund Request - small mobile spacing */
    .fund-request-page {
      margin-top: 70px;
    }
    .fund-request-page .fund-request-header {
        padding: 20px 0;
      border-radius: 0;
    }

    .fund-request-page .fund-request-header .header-title {
        font-size: 24px;
      justify-content: start;
    }

    .fund-request-page .fund-request-header .header-icon {
        width: 46px;
        height: 46px;
    }

   .fund-request-page .progress-indicator-card {
    padding: 0px;
  }
    .fund-request-page .steps-nav .step-nav-item .step-name {
      font-size: 3vw;
    }
    .fund-request-page .wizard-actions {
        padding: 10px;
    }
  .fund-request-page .progress-indicator-card .steps-nav {
    margin-bottom: 0;
  }
  .progress-label {
    font-size: 14px;
  }
  .complete-main-card {
    gap: 10px !important;
  }
  .confirmation-step-header .step-title {
    font-size: 20px;
  }
  .confirmation-step-header .step-subtitle {
    font-size: 14px;
    text-align: right;
  }
  .request-complete-page {
    padding-top: 75px;
  }
  .confirmation-step-header {
    margin-bottom: 0px;
  }
  .complete-card-top {
    margin-bottom: 10px;
  }
}

@media (max-width: 370px) {
    .img-item {
        height: 220px;
    }

    .banner-slider .item {
        height: 395px;
    }

    .hero-content {
        height: 355px;
    }
}
