:root {
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    /* Light mode (default) */
    --bs-body-bg: #f4f4f4;
    --bs-body-color: #333333;
    --bs-link-color: #007bff;

    --primary-dark: #00132E;
    --primary-blue: #17527e;

    /* Ui blocker */
    --blocker-bg: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(245,245,245,0.85));
    --blocker-blur: 6px;
    --blocker-text-color: #198754; /* Bootstrap success green */

    /* modern shadows */

    --shadow-s:
            0 1px 2px rgba(0, 0, 0, 0.08),
            0 2px 4px rgba(0, 0, 0, 0.06);

    --shadow-m:
            0 2px 6px rgba(0, 0, 0, 0.10),
            0 6px 12px rgba(0, 0, 0, 0.08);

    --shadow-l:
            0 6px 16px rgba(0, 0, 0, 0.12),
            0 12px 28px rgba(0, 0, 0, 0.10);


    /* =====================================================
   LAYOUT / CONTAINER
   ===================================================== */

    --container-max: 980px;
    --container-pad-desktop: 16px;
    --container-pad-mobile: 12px;

    /* Font sizes */
    --fs-xxs: 0.75rem;     /* 12px */
    --fs-xs:  0.8125rem;   /* 13px */
    --fs-sm:  0.875rem;    /* 14px */
    --fs-md:  0.9375rem;   /* 15px */
    --fs-lg:  1.125rem;    /* 18px */
    --fs-xl:  1.25rem;     /* 20px */

    /* Line heights */
    --lh-tight: 1.2;
    --lh-normal: 1.35;
    --lh-loose: 1.5;

    /* Font weights */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;


    /* =====================================================
       CARD SYSTEM (NO PILLOW UI)
       ===================================================== */
    --card-padding: 12px;
    --card-gap: 8px;
    --card-radius: 12px;
    --card-shadow: 0 2px 10px rgba(0,0,0,.06);


    /* =====================================================
       BUTTONS (COMPACT)
       ===================================================== */

    --btn-fs: var(--fs-sm);
    --btn-pad-y: 6px;
    --btn-pad-x: 12px;
    --btn-radius: 8px;

    --rows-gap: 1.5rem;
    --section-padding: 6rem 0 6rem 0;

}
.modal-backdrop {
  --bs-backdrop-zindex: 1050;
  --bs-backdrop-bg: #000;
  --bs-backdrop-opacity: 0.5;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--bs-backdrop-zindex);
  width: 100vw;
  height: 100vh;
  background-color: var(--bs-backdrop-bg);
}
.modal-backdrop.fade {
  opacity: 0;
}
.modal-backdrop.show {
  opacity: var(--bs-backdrop-opacity);
}
body,html{
     overscroll-behavior: contain;
     font-family: var(--font-family);
}
/* =====================================================
   MOBILE DENSITY OVERRIDES
   ===================================================== */

@media (max-width: 576px){
    :root{
        --card-padding: 10px;
        --card-gap: 6px;

        --card-title-fs: var(--fs-sm);
        --card-meta-fs: var(--fs-xxs);
        --card-price-fs: 1.0625rem; /* 17px */

        --icon-size: 14px;

        --listing-img-ratio: 16 / 10;

        --grid-gap: 12px;
    }
}

[data-bs-theme="dark"] {
    --bs-dark: #121212;
    --bs-dark-rgb: 18, 18, 18;
    --bs-body-bg: #212121;
    --bs-body-color: #deddde;
    --bs-link-color: #ff6f61;
    --text-color: white;
    --bs-first-color: #121212; /* Main background color */
    --bg-secondary: #1c1c1c; /* Secondary background color */
}

[data-bs-theme="light"] {
    /* Light mode */
    --bs-body-bg: #F9F9FA;
    --bs-body-color: #333333;
    --bs-link-color: #007bff;
    --text-color: black;
    --bs-first-color: #fbfbfb; /* Main background color */
    --bg-secondary: white; /* Secondary background color */
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
.hidden {
    opacity: 0;
    display: none;
}
.phone-shown {
    opacity: 0;
    display: none;
}
ul {
    margin: 0;
}

.bg-steel {
    background-color: #5f788a;
}
.profile-pic img {
    height: 50px;
    width: 50px;
}
.scrollarea {
    overflow-y: auto;
}
.custom-upload-modal-content {
    background: var(--bg-secondary) !important;
}
/* Hamburger */
.profile-navbar-button {
    background: transparent;
    border: none;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.toggler-icon {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.toggler-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: black;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* PRomotion Button */
.carDetails .promotion-pitch, .promotion-button .promotion-pitch {
    height: 50px;
    display: grid;
    width: 100%;
}
.carDetails .promotion-pitch a, .promotion-button .promotion-pitch a {
    font-size: 20px;
    font-weight: bold;
    height: 100%;
    background-color: #00132e;
    text-align: center;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    transition: 0.5s ease-in;
    font-family: var(--font-family);
    box-shadow: 0 4px 4px rgb(0 0 0 / 35%);
}
.carDetails .promotion-pitch a:hover, .promotion-button .promotion-pitch a:hover {
    background-color: #022049;
}
.carDetails .promotion-pitch i, .promotion-button .promotion-pitch i{
    color: #14ae5c;
    font-size: 30px;
    margin-right: 10px;
    margin-top: 10px;
}
.carDetails .promotion-pitch span, .promotion-button .promotion-pitch span {
    color: green;
    font-style: italic;
    font-weight: bolder;
}
.bi {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    color: var(--text-color);
}
#searchButton {
    color: white;
    background-color: #17527e !important;
}

.theme-switch {
    position: fixed;
    bottom: 150px;
    right: -30px;
    background: var(--bg-secondary);
    width: 30px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 5;
    border: none;
    font-size: 18px;
    transition: 0.5s ease-in;
}
.theme-switch span {
    transform: rotate(270deg);
    font-family: var(--font-family);
    font-weight: bold;
}
.theme-switch i {
    font-size: 20px;
    padding: 5px;
    border-radius: 50%;
    background: var(--bg-secondary);
    position: absolute;
    right: 30px;
    z-index: 6;
    transition: 0.5s ease-in-out;
}
.theme-switch:hover {
    color: var(--bs-link-color);
}
@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
    .navbar-search {
        display: block;
    }
}
/*
 * Navbar
 */
.article-img {
    height: 65px;
    width: 65px;
    margin-right: 16px;
    object-fit: cover;
}
.sectionheader {
    font-weight: bold;
    font-family: var(--font-family);
    text-transform: uppercase;
    font-size: 27px;
    color: #002157;
}

/* Profile Icon - Navbar */
/* =========================
   CLEAN SAAS NAVBAR OVERRIDE
   ========================= */

.navbar {
    background: white;
    height: 64px;
    padding: 0 24px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    z-index: 1050;
    position: sticky !important;
    top: 0;
}

.custom-navbar {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

/* LOGO */
.navlogo img,
.navbar-brand img {
    height: 25px;
    width: auto;
    object-fit: cover;
}

/* CENTER LINKS */
.navbar-nav {
    gap: 28px;
    align-items: center;
}

.navbar-nav .nav-link {
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    color: black !important;
}

.navbar-nav .nav-link.active {
    font-weight: 600;
}

/* RIGHT SIDE (PROFILE / AUTH) */
.phone-icons,
.phone-logins {
    display: flex;
    align-items: center;
    gap: 12px;
    color: black;
    text-decoration: none;
}

/* LOGIN BUTTON */
.login-button {
    border: none;
    background: #f3f4f6;
    color: #111827;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
}

.login-button:hover {
    background: #e5e7eb;
}

/* REGISTER BUTTON */
.register-button {
    border: none;
    background: #0f766e;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.register-button:hover {
    background: #115e59;
}

/* PROFILE ICON */
.nav-profile i {
    font-size: 22px;
    text-decoration: none;
}

/* NOTIFICATION BELL */
.notifications-icon-container button {
    background: transparent;
    border: none;
}

.notifications-icon-container i {
    font-size: 18px;
    color: #111827;
}

/* REMOVE DARK OFFCANVAS LOOK */
.offcanvas {
    background: #ffffff !important;
    color: #111827;
}

/* MOBILE NAVBAR CLEANUP */
@media (max-width: 991px) {
    .navbar {
        height: 56px;
    }

    .navbar-nav {
        gap: 16px;
    }
}

.material-icons {
    line-height: 1.2 !important;
}
#id_chat_notifications_count {
    position: absolute;
    top: 10px;
    display: none;
}

.scrollable-menu {
    height: auto;
    max-height: 90vh;
    width: 400px;
    overflow-x: hidden;
}
.material-icons:hover {
    cursor: pointer;
}

#id_chatroom_loading_spinner {
    position: absolute;
}

.friends-list-container .active {
    background-color: black;
    color: white;
}

.friends-list-container {
    max-height: 500px;
    overflow-y: auto;
}

/* Icons Footer */
.footer {
    font-family: var(--font-family);
    color: #1f2937;
    padding: 80px 0 30px;
    background-color: var(--bg-secondary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
}

.footer-brand .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand .logo {
    width: 22px;
    height: 22px;
    background: #0f766e;
    border-radius: 6px;
}

.footer-brand .brand-name {
    font-size: 18px;
    font-weight: 600;
    color: #0f766e;
}

.footer-brand .brand-text {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    max-width: 320px;
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    text-decoration: none;
    transition: background 0.2s ease;
}

.social-icons a:hover {
    background: #e5e7eb;
}

.footer-col h4 {
    font-size: 13px;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: #111827;
}

.footer-bottom {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 20px 24px 0;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
}

.bottom-links {
    display: flex;
    gap: 24px;
}

.bottom-links a {
    color: #9ca3af;
    text-decoration: none;
}

.bottom-links a:hover {
    color: #111827;
}

/* Responsive */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        margin-bottom: 70px;
    }
}

@media (max-width: 500px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}


/* Profile */


.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 8px;
}
.section-title i {
    color: #00b4d8;
}
/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.page-link {
    padding: 6px 10px;
    /* Smaller padding for a compact size */
    margin: 0 3px;
    background-color: #f0f0f0;
    /* Light gray background */
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    /* Smaller font size */
    color: black;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.page-link.active {
    background-color: #970747;
    color: white;
    border-color: lightgrey;
}

.page-link:hover {
    background-color: #d1e0ff;
    /* Light blue on hover */
    color: #0056b3;
}

.page-link.disabled {
    cursor: not-allowed;
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #dee2e6;
}

.pagination .page-link.active,
.pagination .page-link.disabled {
    pointer-events: none;
}
/* Promotion - Home */
.promoted-ribbon {
    width: 150px;
    height: 150px;
    overflow: hidden;
    position: absolute;
    left: -30px;
}

.promoted-ribbon span {
    position: absolute;
    display: block;
    width: 235px;
    padding: 8px 0;
    background: #139bf5;
    color: white;
    text-align: center;
    font-weight: bold;
    transform: rotate(-45deg);
    top: 30px;
    left: -45px;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.5);
}

.promoted-ribbon span::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
            120deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,0.4) 50%,
            rgba(255,255,255,0) 100%
    );
    transform: skewX(-20deg);
    animation: promoted-shimmer 3s infinite;
    pointer-events: none;
}

@keyframes promoted-shimmer {
    0%   { left: -75%; }
    50%  { left: 125%; }
    100% { left: 125%; }
}
/* UI Loader */

#uiBlocker{
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--blocker-bg, rgba(255,255,255,.75));
    backdrop-filter: blur(var(--blocker-blur, 3px));
    z-index: 11000; /* above modals */
    opacity: 0;
}

#uiBlocker.active{
    display: flex;
    animation: fadeIn 0.25s ease-in-out forwards;
}

#uiBlocker .spinner-border{
    width: 3rem;
    height: 3rem;
}

#uiBlocker .loading-text{
    margin-top: 1rem;
    color: var(--blocker-text-color, #198754);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    animation: pulseText 1.6s infinite;
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce){
    #uiBlocker.active{ animation: none; opacity: 1; }
    #uiBlocker .loading-text{ animation: none; }
}

@keyframes fadeIn{
    from{ opacity: 0; }
    to{ opacity: 1; }
}

@keyframes pulseText{
    0%,100%{ opacity: 1; }
    50%{ opacity: .6; }
}

/* Disable interactions only while blocked */
.ui-blocked, .ui-blocked *{
    pointer-events: none !important;
}
/* Modal background */
#terms-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    padding: 20px 30px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    animation: fadeIn 0.4s ease-out;
}

#terms-overlay.show {
    display: block;
}

#terms-overlay p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

#terms-overlay a {
    color: #007bff;
    text-decoration: none;
}

#terms-overlay a:hover {
    text-decoration: underline;
}

#terms-overlay button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #007bff;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#terms-overlay button:hover {
    background-color: #0056b3;
}
.fadeIn {
    animation: fadeIn 1s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.slideInRight {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease-out;
}
.fadeUp {
    animation: fadeUp 0.6s ease-out forwards;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-bottom: 8px;
    border: 2px solid transparent;
    transition: border 0.2s ease;
}
/* Empty state */
.empty-state-posts {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    max-width: 600px;
}

.empty-state-posts h4 {
    font-weight: bold;
    color: black;
    text-align: center;
}

.empty-state-posts img {
    max-height: 400px;
    max-width: 400px;
}

.empty-state-posts button {
    border: none;
    outline: none;
    border-radius: 5px;
    width: 250px;
    text-align: center;
    text-decoration: none;
    color: black;
    padding: 5px 5px;
    background-color: #2FD0C8;
}

.empty-state-posts a {
    border: none;
    outline: none;
    border-radius: 5px;
    width: 250px;
    text-align: center;
    text-decoration: none;
    color: black;
    padding: 5px 5px;
    background-color: #20B2AA;
}

.empty-state-posts a:hover {
    background-color: #2FD0C8;

}
/* Dashboard collaps */
.dashcollapseedit ul li {
    background: none;
    padding: 0;
    margin-left: 0;
    border: none;
    width: 100%;
}

.dashcollapseedit ul li a {
    color: #3d3a3a;
    padding: 5px;
    text-decoration: none;
    position: relative;
    left: 40px;
    font-size: .815rem;
    font-weight: normal;
}

.dashcollapseedit ul {
    position: relative;
    max-width: 100%;
}

.dashcollapseedit .list-group a:hover {
    width: 150px;
    transition: .5s;
    background: rgba(49, 55, 74, 0.2);
}

.notifications-icon-container i,.nav-profile i {
    /*color: white;*/
}
/* Chat Notification */
.custom-dropdown {
    border-radius: 10px;
    padding-top: 0;
    top: 30px !important;
    right: 8% !important;
}
.custom-dropdown .dropdown-header {
    text-align: center;
    color: var(--bs-dark);
    background-color: var(--bs-body-color);
}
/* Notifications */
.custom-dropdown {
    background: #1f1f1f;
    color: #f5f5f5;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 10px;
    max-width: 320px;
    animation: fadeIn 0.3s ease-in-out;
}

.dropdown-header h6 {
    font-size: 16px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 8px;
}

/* Chat Card */
.chat-card {
    display: flex;
    align-items: flex-start;
    position: relative;
    background: #2a2a2a;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: transform 0.2s, background 0.2s;
}

.chat-card:hover {
    transform: translateY(-2px);
    background: #333;
    cursor: pointer;
}

.notification-thumbnail-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #444;
}

/* Sender Name */
.chat-sender {
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    position: absolute;
    top: 10px;
    left: 60px;
}

.notification-chatroom-msg {
    font-size: 12px;
    color: #d3d3d3;
    position: absolute;
    top: 30px;
    left: 65px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Adjust this value as needed */
}

.timestamp-text {
    font-size: 10px;
    color: #808080;
    margin-left: auto;
}
/* 404 Error */
.error-page-404 {
    height: 100vh;
    background-color: var(--bg-secondary);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-container h1 {
    font-size: 8rem;
    font-weight: bold;
    color: var(--text-color);
    animation: bounce 1.5s infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.error-container p {
    font-size: 1.5rem;
}

.error-btn {
    background: #ff4757;
    color: white;
    padding: 12px 24px;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background 0.3s ease;
}

.error-btn:hover {
    background: #e84118;
}

.login-now-password{
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    font-style: italic;
    color: green;
}
.container-center {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] {
    .footer-col a:hover , .footer .bottom-links a:hover {
        color: #e1e1e1;
    }
    .pv-owners input[type="radio"]:checked+label
    ,.carHS input[type="radio"]:checked+label
    ,.carDMG input[type="radio"]:checked+label
    ,.carSM input[type="radio"]:checked+label{
        background-color: white;
        color: black;
    }
    .brand-card {
        background: var(--bs-body-bg);
    }
    .brand-name {
        color: lightgrey;
    }
    .section-title {
        color: white;
    }
    .navbar-toggler span{
        background-color: black;
    }
    .custom-dropdown .dropdown-header {
        text-align: center;
        color: var(--bs-dark-rgb);
        background-color: var(--bs-dark);
    }
    .friends-list-container .active {
        background-color: var(--bs-dark) !important;
    }

    .profile-pic h5 {
        color: var(--bs-body-color);
    }
    .btn-outline-dark {
        color: var(--bs-body-color);
        border-color: var(--bs-body-color);
    }
    .carDetails h5,
    .carDetails h3,
    .car-detail-sections,
    .car-detail-sections .section-answer {
        color: var(--bs-body-color) !important;
    }

    .carDetails a:hover {
        transition: 0.3s;
        background-color: var(--bs-dark);
    }

    .carDetails .brand {
        background-color: transparent;
        color: var(--bs-body-color);
    }

    .carDetails {
        background-color: transparent;
        color: var(--bs-body-color);
        border-radius: 20px;
    }

    #sort,
    .smFilterBTN {
        background-color: var(--bs-dark);
        color: var(--bs-body-color);
        border-color: var(--bs-body-bg);
    }
    .sectionheader {
        color: #deddde;
    }
    .empty-state-posts h4,
    .dashcollapseedit ul li a {
        color: var(--bs-body-color);
    }

    .dashcollapseedit .list-group a:hover {
        transition: .5s;
        color: black;
        background-color: white;
    }
}

/* Between 768px and 1000px */
@media (768px <= width <= 1023px) {
    #car-list-container .col-lg-12{
        width: 50%;
    }
    .car-listing-card {
        display: block;
    }
    .car-info{
        display: block;
    }
    .car-specs{
        grid-template-columns: 1fr 1fr;
    }
}
/* Small devices (landscape phones, 576px and up)*/
@media only screen and (max-width: 991.98px) {
    /* Footer start */
    .offcanvas-header{
        margin-top: 55px !important;
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
    /* Footer End */
    .car-listing-card {
        display: block;
    }
    .car-info{
        display: block;
    }
    .car-specs{
        grid-template-columns: 1fr 1fr;
    }
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) translateZ(0); /* GPU acceleration */
        width: 100%;
        height: 70px;
        background: var(--bg-secondary);
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 0 8px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 5px 0;
        transition: background 0.3s ease;
        will-change: transform, opacity; /* hint for GPU */
    }

    .mobile-nav a {
        color: var(--text-color);
        font-size: 12px;
        font-weight: 500;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        transition: transform 0.2s ease, color 0.2s ease;
        padding: 5px 0;
    }

    .mobile-nav a i {
        font-size: 20px;
        margin-bottom: 3px;
        transition: transform 0.2s ease;
    }

    .mobile-nav a.active {
        color: var(--bs-link-color);
        transform: scale(1.05);
    }

    .mobile-nav a.active i {
        transform: translateY(-2px);
    }

    .mobile-nav a:active {
        transform: scale(0.95);
    }

    .nav-add {
        position: absolute;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%) translateZ(0);
        background: var(--bs-link-color);
        color: #fff;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        font-size: 22px;
        border: none;
        cursor: pointer;
        transition: transform 0.3s ease;
        z-index: 1001;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-add:hover {
        transform: translateX(-50%) scale(1.08);
    }

    .nav-add:active {
        transform: translateX(-50%) scale(0.94);
    }

    .nav-add i {
        transition: transform 0.3s ease;
    }

    .nav-add.active i {
        transform: rotate(135deg);
    }
    .extra-menu {
        position: absolute;
        bottom: 100px;
        left: 50%;
        transform: translateX(-50%) scale(0.95) translateZ(0);
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: var(--bs-first-color);
        padding: 10px;
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
        z-index: 1000;
        transform-origin: bottom center;
        will-change: transform, opacity;
        min-width: 140px;
        border: 1px solid rgba(0,0,0,0.05);
    }

    .extra-menu a {
        color: var(--text-color);
        background: var(--bg-secondary);
        padding: 5px;
        border-radius: 10px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .extra-menu a:hover {
        background: rgba(29, 161, 242, 0.08);
    }

    /* Show menu */
    .extra-menu.show {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) scale(1);
    }

    .custom-file-input{
        max-width: 250px;
    }
    .phone-logins .register-button {
        padding: 4px;
    }
    .phone-logins i {
        display: none;
    }
    .mobile-friendly {
        padding-bottom: 100px;
    }
    .question-section {
        display: grid;
        grid-template-columns: repeat(1, 2fr);
    }
    #terms-overlay button {
        margin-top: 10px;
        padding: 8px 16px;
        background-color: #007bff;
        border: none;
        color: white;
        border-radius: 5px;
        cursor: pointer;
        font-size: 14px;
    }
    .pagination {
        display: flex;
        justify-content: center !important;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .navbar::after {
        clip-path: none;
        z-index: -1;
    }
    .lightbox-nav {
        font-size: 30px;
    }
    .phone-shown {
        opacity: 1;
        display: unset;
    }
    .section-text {
        grid-column: span 2; /* Ensure it takes full width */
        text-align: center;
        margin-bottom: 10px;
    }


    .section-types h6{
        text-align: center;
    }
    .section-types p {
        font-weight: bold;
    }
    .custom-navbar .phone-links {
        align-items: center;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        flex-direction: column;
    }
    .custom-navbar .phone-links li {
        margin-top: 15px;
    }
    .custom-navbar .phone-links  .phone-icons{
        visibility: hidden;
        display: none;
    }
    .custom-navbar .phone-links a {
        margin-left: 15px;
        margin-right: 15px;
    }
    /*  Notification */
    .custom-dropdown {
        left: -10% !important;
        top: 100% !important;
    }
    .scrollable-menu {
        width: 300px;
    }
    .msg-p p {
        max-width: 230px;
        width: 100%;
    }

    .chat .allchats {
        right: 0;
    }
    #sort {width: 100%;}

    @media (max-width: 350px) {
        .mobile-nav a span {
            display: none;
        }
        .mobile-nav a i {
            margin-bottom: 0;
            font-size: 22px;
        }
        .mobile-nav {
            height: 60px;
        }
    }
}

/* Medium devices (tablets, 768px and up)*/
@media only screen and (max-width: 768px) {
    .carSM{
        margin-top: 1rem;
    }
    .carDMG {
        margin-top: 1rem;
    }
    .custom-dropdown {
        position: absolute;
        border-radius: 10px;
        padding-top: 0;
        top: 40px !important;
        left: 5% !important;
    }
}

/* Large devices (desktops, 992px and up)*/
@media (min-width: 992px) {

}

/* X-Large devices (large desktops, 1200px and up)*/
@media (min-width: 1200px) {

}

/* XX-Large devices (larger desktops, 1400px and up)*/
@media (min-width: 1441px) {
    .navbar-brand img {
        height: 30px;
    }
    /* Navbar */
    .navbar{
        max-width: 2580px !important;
    }
}

@media only screen and (max-width: 376px) {
    .phone-logins i {
        display: none;
    }
    .phone-logins .register-button {
        padding: 5px;
    }
    .custom-dropdown {
        left: -20px !important;
    }
}