/* ==========================================================================
   GEM-SUITE MICROSITE - MODERN RESPONSIVE & MOBILE STYLES
   ========================================================================== */

/* Privacy Overlay */
#privacy-notice-overlay {
    position: fixed; /* Sit on top of the page content */
    width: 100%; /* Full width (cover the whole page) */
    height: 100%; /* Full height (cover the whole page) */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5); /* Black background with opacity */
    z-index: 5000; /* Specify a stack order in case you're using a different order for other elements */
    cursor: pointer; /* Add a pointer on hover */
}

#privacy-notice-overlay .bottom-banner {
    width: 100%;
    background: #ffffff;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px 0;
}

/* ==========================================================================
   1. GLOBAL MOBILE HYGIENE & BASE IMPROVEMENTS
   ========================================================================== */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body.microsite-menu-open {
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent iOS auto-zoom on form inputs */
@media screen and (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Base button and link touch targets */
.btn {
    touch-action: manipulation;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

/* ==========================================================================
   2. HEADER & TOP BAR MOBILE ENHANCEMENTS
   ========================================================================== */

/* Top bar contact details */
.actif-bg-color2_3 {
    background-color: #1a1a1a;
}

.top_bar_menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.top_bar_menu li {
    display: inline-block;
    margin-right: 15px;
}

.top_bar_menu li a {
    color: #e5e7eb;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
    text-decoration: none;
}

.top_bar_menu li a:hover,
.top_bar_menu li a:focus {
    color: #ffffff;
    text-decoration: none;
}

@media screen and (max-width: 991px) {
    .top_bar_menu {
        justify-content: center;
        padding: 6px 0;
    }
    .top_bar_menu li {
        margin: 3px 8px;
    }
    .top_bar_menu li a {
        font-size: 12px;
        padding: 4px 6px;
    }
    .actif-text_system_2 {
        text-align: center;
        font-size: 12px;
        padding: 4px 0;
    }
}

@media screen and (max-width: 480px) {
    .top_bar_menu li a span.fa {
        font-size: 14px;
    }
}

/* Main Navigation Bar */
.actif-widget-menu {
    position: relative;
}

/* Hamburger toggle button */
.actif-widget-menu-toggle-btn {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    background-color: var(--main-theme-color, #cd0c2a);
    color: #ffffff !important;
    text-align: center;
    line-height: 44px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none !important;
    float: right;
    margin-top: 6px;
    margin-bottom: 6px;
}

.actif-widget-menu-toggle-btn:hover,
.actif-widget-menu-toggle-btn:focus {
    background-color: var(--main-theme-color, #cd0c2a);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.actif-widget-menu-toggle-btn-icon {
    font-size: 20px;
    line-height: 44px;
    display: inline-block;
    color: #ffffff !important;
    transition: transform 0.25s ease;
}

/* Mobile Menu Open State */
.actif-widget-menu.actif-widget-menu-mobile-open .actif-widget-menu-toggle-btn {
    background-color: #1f2937;
}

.actif-widget-menu.actif-widget-menu-mobile-open .actif-widget-menu-toggle-btn-icon {
    transform: rotate(90deg);
}

/* Navigation Menu Responsive Breakpoint (Tablets & Mobile: <= 991px) */
@media screen and (max-width: 991px) {
    .actif-widget-menu-toggle-btn {
        display: inline-block;
    }

    .actif-widget-menu .actif-widget-menu-list {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        width: 100% !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
        padding: 8px 0 !important;
        margin-top: 10px !important;
        z-index: 1050;
        list-style: none;
        box-sizing: border-box;
    }

    .actif-widget-menu.actif-widget-menu-mobile-open .actif-widget-menu-list {
        display: block !important;
        animation: micrositeMenuFadeIn 0.25s ease-out forwards;
    }

    .actif-widget-menu .actif-widget-menu-list > .actif-widget-menu-item,
    .actif-widget-menu-item {
        float: none !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-bottom: 1px solid #f3f4f6;
        text-align: left;
    }

    .actif-widget-menu .actif-widget-menu-list > .actif-widget-menu-item:last-child {
        border-bottom: none;
    }

    .actif-widget-menu-link {
        display: block !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #1f2937 !important;
        text-decoration: none !important;
        letter-spacing: 0.3px;
        border: none !important;
        transition: background-color 0.15s, color 0.15s;
    }

    .actif-widget-menu-link:hover,
    .actif-widget-menu-link:focus,
    .actif-widget-menu-link.actif-widget-menu-link-active {
        background-color: #f9fafb !important;
        color: var(--main-theme-color, #cd0c2a) !important;
    }

    /* Submenu Accordion on Mobile */
    .actif-widget-sub-menu,
    .actif-widget-menu-sublist {
        display: none;
        position: static !important;
        float: none !important;
        width: 100% !important;
        min-width: 0 !important;
        background: #f8fafc !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid var(--main-theme-color, #cd0c2a) !important;
        padding: 4px 0 !important;
        margin: 0 !important;
        list-style: none;
    }

    .actif-widget-sub-menu li,
    .actif-widget-menu-sublist .actif-widget-menu-item {
        float: none !important;
        width: 100% !important;
        border-bottom: 1px solid #edf2f7;
    }

    .actif-widget-sub-menu li:last-child,
    .actif-widget-menu-sublist .actif-widget-menu-item:last-child {
        border-bottom: none;
    }

    .actif-widget-sub-menu li a,
    .actif-widget-menu-sublist .actif-widget-menu-link {
        display: block !important;
        padding: 10px 24px !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #4b5563 !important;
    }

    .actif-widget-sub-menu li a:hover,
    .actif-widget-menu-sublist .actif-widget-menu-link:hover {
        background-color: #e2e8f0 !important;
        color: var(--main-theme-color, #cd0c2a) !important;
    }

    /* Social and action links in mobile drawer */
    .actif-widget-menu-item .actif-widget-social-links-extended__link {
        display: inline-block;
        padding: 10px 14px;
        font-size: 18px;
        color: #4b5563;
    }
}

@keyframes micrositeMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   3. HOMEPAGE HERO & BRAND / MODEL SEARCH (FNI, PLEX, DEFAULT)
   ========================================================================== */

/* Full-width Hero Banner & Background */
.home-hero-search-section,
.index_video_container,
#index_video_container {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 520px;
    height: auto !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 50px 20px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

#indexsearchblock_container {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    max-width: 980px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    z-index: 5 !important;
}

#indexsearchblock {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

.indexsearchform {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 24px 20px !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.indexsearchform .row.dropdown {
    margin-top: 0 !important;
}

.home-search-title {
    color: #ffffff !important;
    text-align: center !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75) !important;
    margin: 20px 0 0 0 !important;
    font-size: clamp(22px, 4vw, 36px) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
}

.srch_itm_title {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: left !important;
    margin: 0 0 6px 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65) !important;
}

.indexsearchform label.select select,
.indexsearchform label.input input {
    height: 44px !important;
    line-height: 44px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #111827 !important;
    padding: 0 12px !important;
    width: 100% !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25) !important;
}

#search-submit-btn {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    line-height: 44px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    margin-top: 23px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
    transition: all 0.2s ease;
}

/* Mobile & Tablet Specifics */
@media screen and (max-width: 991px) {
    .home-hero-search-section,
    .index_video_container,
    #index_video_container {
        min-height: 480px !important;
        padding: 30px 15px !important;
    }

    .indexsearchform {
        padding: 20px 16px !important;
    }

    /* Stack filter columns */
    .indexsearchform section.col,
    .indexsearchform .col.col-3,
    .indexsearchform .col.col-4,
    .indexsearchform .col.col-6,
    .indexsearchform .col.col-12 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #search-submit-btn {
        margin-top: 8px !important;
        height: 48px !important;
        line-height: 48px !important;
        font-size: 16px !important;
    }
}

/* Home About & Content Sections */
@media screen and (max-width: 767px) {
    #home_about_content_container h2 {
        font-size: clamp(22px, 6vw, 32px) !important;
        line-height: 1.25 !important;
        margin-top: 15px;
    }

    #home_about_content_container p {
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    #home_about_content_container .btn-primary {
        width: 100%;
        display: block;
        min-height: 46px;
        line-height: 32px;
        font-size: 15px;
        font-weight: 700;
        text-align: center;
    }
}

/* Vehicle Carousels on Mobile (Horizontal Touch Swipe) */
@media screen and (max-width: 991px) {
    #featured_carousel,
    #latest_carousel {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        gap: 16px !important;
        padding: 10px 4px 20px !important;
        max-height: none !important;
    }

    #featured_carousel::-webkit-scrollbar,
    #latest_carousel::-webkit-scrollbar {
        height: 6px;
    }

    #featured_carousel::-webkit-scrollbar-thumb,
    #latest_carousel::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
    }

    #featured_carousel > div,
    #latest_carousel > div {
        flex: 0 0 280px !important;
        max-width: 280px !important;
        scroll-snap-align: start !important;
        margin-bottom: 0 !important;
    }

    #featured_left,
    #featured_right,
    #latest_left,
    #latest_right {
        display: none !important;
    }
}

/* ==========================================================================
   4. INVENTORY & RESULTS PAGES MOBILE OPTIMIZATION
   ========================================================================== */

/* Filter Toggle Bar on Mobile */
@media screen and (max-width: 1182px) {
    #results_filter_toggle_row {
        display: block !important;
        margin-bottom: 15px !important;
    }

    #results_filter_toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        background: #ffffff !important;
        border: 2px solid var(--main-theme-color, #cd0c2a) !important;
        color: #111827 !important;
        border-radius: 10px !important;
        padding: 12px 18px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
        transition: all 0.2s ease;
    }

    #results_filter_toggle:hover {
        background: #fdf2f4 !important;
    }

    #results_filter_toggle i.fa {
        font-size: 18px;
        color: var(--main-theme-color, #cd0c2a);
    }

    #result-filter-container {
        padding: 0 !important;
    }

    #result-filter {
        display: none;
        background: #ffffff !important;
        border-radius: 12px !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
        padding: 20px 16px !important;
        margin: 0 0 25px 0 !important;
        width: 100% !important;
        min-height: auto !important;
    }

    #result-filter .col.col-6 {
        width: 50% !important;
        float: left !important;
        padding: 0 5px !important;
    }

    #result-filter .col.col-12 {
        width: 100% !important;
        float: none !important;
        padding: 0 !important;
    }

    #result-filter .label {
        font-size: 13px !important;
        font-weight: 600 !important;
        color: #374151 !important;
        margin-bottom: 5px !important;
    }

    #result-filter label.select select,
    #result-filter label.input input {
        height: 42px !important;
        border-radius: 6px !important;
        font-size: 14px !important;
    }

    #reset-form-btn,
    #filter_btn {
        min-height: 44px !important;
        line-height: 30px !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
}

/* Vehicle Cards (Grid & List) Responsive Styling */
.vehicle-card-container,
.catalogue-vehicle-card-container {
    border-radius: 10px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    overflow: hidden !important;
    background: #ffffff !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.vehicle-card-container:hover,
.catalogue-vehicle-card-container:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12) !important;
}

.vehicle-details-card-photo {
    border-radius: 10px 10px 0 0 !important;
}

.vehicle-card-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}

.vehicle-card-price {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: var(--main-theme-color, #cd0c2a) !important;
}

@media screen and (max-width: 767px) {
    .vehicle-card-column {
        width: 100% !important;
        float: none !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-bottom: 20px !important;
    }

    .vehicle-details-card-row {
        height: auto !important;
        min-height: 200px;
    }

    .vehicle-row-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }

    .vehicle-row-price {
        font-size: 18px !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
    }

    /* Inventory Toolbar on Mobile */
    #results_sort {
        max-width: 140px !important;
        font-size: 13px !important;
        height: 36px !important;
    }

    .btnChangeViewType {
        padding: 6px 12px !important;
        font-size: 14px !important;
    }

    .resultspagination .pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .resultspagination .pagination > li > a {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 6px;
        min-width: 38px;
        text-align: center;
    }
}

/* ==========================================================================
   5. VEHICLE & UNIT DETAIL PAGES MOBILE OPTIMIZATION
   ========================================================================== */
.details-hero-banner {
    background-size: cover !important;
    background-position: center center !important;
}

#profile_image_container {
    border-radius: 10px !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

@media screen and (max-width: 767px) {
    .details-hero-banner {
        height: 160px !important;
    }

    .profile-top .content-container {
        margin-top: -140px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .profile-img-top {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
    }

    .user_name_container {
        font-size: clamp(22px, 6vw, 32px) !important;
        line-height: 1.25 !important;
        margin-left: 0 !important;
        padding: 10px 0 5px 0 !important;
        font-weight: 800 !important;
        color: #111827 !important;
    }

    .vehicle_price_container,
    #vehicle-price-container {
        font-size: clamp(22px, 6vw, 32px) !important;
        font-weight: 800 !important;
        color: var(--main-theme-color, #cd0c2a) !important;
        margin-left: 0 !important;
        padding: 5px 0 !important;
    }

    .vehicle-actions-top {
        margin-top: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .vehicle-actions-top .btn {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .section-title {
        margin-right: 0 !important;
        border-radius: 10px 10px 0 0 !important;
        padding: 10px 14px !important;
        font-weight: 700 !important;
    }

    .details-container {
        margin-right: 0 !important;
        border-radius: 0 0 10px 10px !important;
        padding: 16px 14px !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    }
}

/* ==========================================================================
   6. FINANCING WIZARD MOBILE OPTIMIZATION
   ========================================================================== */
@media screen and (max-width: 767px) {
    .financing-wizard {
        padding: 18px 14px !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06) !important;
    }

    .financing-page__intro h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    .financing-wizard .col,
    .financing-wizard .col.col-3,
    .financing-wizard .col.col-4,
    .financing-wizard .col.col-5,
    .financing-wizard .col.col-6,
    .financing-wizard .col.col-12 {
        width: 100% !important;
        float: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 12px !important;
    }

    .financing-wizard .form-control,
    .financing-wizard input[type="text"],
    .financing-wizard select {
        height: 44px !important;
        font-size: 15px !important;
        border-radius: 6px !important;
    }

    .financing-wizard__actions {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        margin-top: 20px;
    }

    .financing-wizard__actions .btn {
        flex: 1;
        min-height: 46px !important;
        font-size: 14px !important;
    }
}

/* ==========================================================================
   7. CONTACT PAGE MOBILE OPTIMIZATION
   ========================================================================== */
@media screen and (max-width: 767px) {
    .contact-details-container {
        padding: 0 !important;
    }

    .contact_company_name {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }

    .contact_details .list-group-item {
        padding: 12px 14px !important;
        font-size: 14px !important;
        border-radius: 6px !important;
        margin-bottom: 6px !important;
    }

    .contact_social_icons_container {
        margin: 15px 0 !important;
    }

    .contact_social_icon {
        width: 40px !important;
        height: 40px !important;
        line-height: 40px !important;
        font-size: 18px !important;
        border-radius: 50% !important;
        display: inline-block !important;
        text-align: center !important;
        margin-right: 8px !important;
    }

    #contact-us-form fieldset {
        padding: 16px 12px !important;
        border-radius: 10px !important;
    }

    #contact-us-form .col.col-12 {
        padding: 0 !important;
        margin-bottom: 10px !important;
    }

    #contact-us-form input,
    #contact-us-form textarea {
        font-size: 15px !important;
        border-radius: 6px !important;
    }

    #contact-us-form button[type="submit"] {
        width: 100% !important;
        min-height: 46px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
    }

    #map-container {
        height: 250px !important;
        border-radius: 10px !important;
        overflow: hidden !important;
    }
}

/* ==========================================================================
   8. FOOTER MOBILE OPTIMIZATION
   ========================================================================== */
@media screen and (max-width: 767px) {
    .actif-widget-block.actif-bg-color2_3 {
        padding: 30px 15px !important;
    }

    .actif-widget-spacer-block {
        height: 20px !important;
    }

    .actif-widget-image-picture {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    .actif-text_system_13 {
        font-size: 16px !important;
        font-weight: 700 !important;
        text-align: center;
        margin-top: 20px;
    }
}