/* =================================================================
   MOBILE RESPONSIVENESS — Drive365 Premium Car Rental
   Complete mobile experience with premium slide-in menu
   ================================================================= */

/* ============================================================
   MOBILE MENU — Premium Slide Panel
   ============================================================ */

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Panel */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #0d1220 0%, #080c16 100%);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    padding: 70px 0 24px;
    border-left: 1px solid rgba(212, 175, 55, 0.12);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Close button */
.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.mobile-menu-close:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Nav links */
.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.25s ease;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.mobile-menu-link i {
    width: 20px;
    text-align: center;
    color: var(--gold-500);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: rgba(212, 175, 55, 0.08);
    color: #fff;
}

.mobile-menu-link.active {
    border-left: 3px solid var(--gold-500);
    padding-left: 15px;
}

.mobile-menu-link.active i {
    color: var(--gold-400);
}

/* Dividers */
.mobile-menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.15), transparent);
    margin: 8px 20px;
}

/* Cart badge */
.mobile-menu-cart {
    position: relative;
}

.mobile-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background: var(--gold-gradient);
    color: #0B0F19;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 10px;
    margin-left: auto;
    padding: 0 6px;
}

/* User section */
.mobile-menu-user {
    padding: 0 16px;
}

.mobile-menu-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(212, 175, 55, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 14px;
    margin-bottom: 8px;
}

.mobile-menu-avatar {
    width: 40px;
    height: 40px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B0F19;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mobile-menu-username {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.mobile-menu-email {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
}

.mobile-menu-nav-secondary {
    padding: 0;
}

.mobile-menu-nav-secondary .mobile-menu-link {
    padding: 11px 18px;
    font-size: 0.88rem;
}

/* Logout */
.mobile-menu-logout {
    color: rgba(239, 68, 68, 0.8) !important;
}

.mobile-menu-logout:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
}

.mobile-menu-logout i {
    color: rgba(239, 68, 68, 0.6) !important;
}

/* Login button */
.mobile-menu-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 32px);
    margin: 8px 16px;
    padding: 14px 20px;
    background: var(--gold-gradient);
    color: #0B0F19;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.mobile-menu-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

/* Contact info */
.mobile-menu-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    margin-top: auto;
}

.mobile-menu-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-menu-contact-item i {
    color: var(--gold-500);
    font-size: 0.75rem;
    width: 16px;
    text-align: center;
}

.mobile-menu-contact-item:hover {
    color: var(--gold-400);
    background: rgba(212, 175, 55, 0.05);
}

/* Social icons */
.mobile-menu-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    flex-wrap: wrap;
}

.mobile-menu-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-menu-social a:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--gold-400);
    transform: translateY(-2px);
}

/* Hamburger animation */
.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Body scroll lock */
body.mobile-menu-open {
    overflow: hidden;
}

/* Hide mobile menu elements on desktop */
@media (min-width: 769px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ============================================================
   TABLET — max 992px
   ============================================================ */
@media (max-width: 992px) {

    /* Hero — stack vertically */
    .hero-dw-container {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-dw-left {
        max-width: 100%;
    }

    .hero-dw-title {
        font-size: 2.2rem;
    }

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

    .hero-dw-right {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Deals grid 2 columns */
    .dw-deals-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Steps vertical */
    .dw-steps-row {
        flex-direction: column;
        gap: 24px;
    }

    .dw-step-line {
        display: none;
    }

    /* Testimonials 2 columns */
    .dw-testimonials-row {
        grid-template-columns: 1fr 1fr;
    }

    /* Vehicle detail single column */
    .vehicle-detail-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-specs-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Philosophy */
    .dw-philosophy {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ============================================================
   MOBILE — max 768px
   ============================================================ */
@media (max-width: 768px) {

    /* ---- Navbar position (topbar visible) ---- */
    .navbar {
        top: 34px;
    }

    .navbar.scrolled {
        top: 0;
    }

    /* ---- Hero — side-by-side like desktop ---- */
    .hero-dw {
        min-height: auto;
        padding: 100px 0 0;
    }

    .hero-dw-container {
        flex-direction: row !important;
        text-align: left !important;
        align-items: center;
        gap: 12px;
        padding-top: 10px;
    }

    .hero-dw-left {
        flex: 1 1 58%;
        max-width: 58% !important;
        padding: 10px 0 20px !important;
    }

    .hero-dw-title {
        font-size: 1.15rem;
        line-height: 1.3;
    }

    .hero-dw-desc {
        font-size: 0.72rem;
        margin: 0 0 14px !important;
    }

    .hero-dw-btns {
        flex-direction: column;
        gap: 8px;
        justify-content: flex-start !important;
    }

    .hero-dw-btns .dw-btn {
        width: auto;
        text-align: center;
        padding: 8px 16px;
        font-size: 0.72rem;
    }

    .hero-dw-right {
        flex: 1 1 42%;
        max-width: 42%;
        align-self: flex-end !important;
    }

    .hero-dw-right img,
    .hero-dw-car {
        max-width: 100%;
        max-height: 200px;
        width: 100%;
        object-fit: contain;
    }

    .hero-dw-gold-bg {
        width: 45%;
        height: 100%;
        clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
        opacity: 1;
    }

    /* ---- Brands ---- */
    .dw-brands-row {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    .dw-brand-logo img {
        height: 28px;
    }

    /* ---- Stats ---- */
    .dw-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .dw-stat-num {
        font-size: 1.8rem;
    }

    .dw-stat-label {
        font-size: 0.75rem;
    }

    /* ---- Gallery ---- */
    .dw-gallery-section {
        padding: 60px 0;
    }

    .dw-gallery-featured {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .dw-gallery-featured .dw-gallery-card {
        height: 220px;
    }

    .dw-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .dw-gallery-card {
        height: 180px;
    }

    /* ---- Deals ---- */
    .dw-deals-grid {
        grid-template-columns: 1fr;
    }

    /* ---- Car Slider ---- */
    .dw-slider-track {
        gap: 16px;
    }

    .dw-slider-card {
        min-width: 280px;
    }

    .choose-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* ---- Philosophy ---- */
    .dw-philosophy {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .dw-philosophy-image {
        padding: 24px;
    }

    .dw-philosophy-badge {
        bottom: -10px;
        right: 20px;
        padding: 10px 18px;
    }

    /* ---- How It Works ---- */
    .dw-steps-row {
        flex-direction: column;
        gap: 20px;
    }

    .dw-step-line {
        display: none;
    }

    /* ---- Testimonials ---- */
    .dw-testimonials-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ---- Promise ---- */
    .dw-promise-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    /* ---- Section Titles ---- */
    .dw-section-title {
        font-size: 1.6rem;
    }

    .dw-section-subtitle {
        font-size: 0.85rem;
    }

    /* ---- CTA ---- */
    .dw-cta {
        padding: 40px 24px;
    }

    .dw-cta h2 {
        font-size: 1.5rem;
    }

    /* ---- Vehicle Detail Specs ---- */
    .vehicle-specs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* ---- Pricing ---- */
    .pricing-tiers {
        gap: 8px;
    }

    /* ---- Footer — compact 3-col ---- */
    .footer {
        padding: 30px 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 16px 10px;
        text-align: center;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }

    .footer-brand-text {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }

    .footer-description {
        font-size: 0.75rem;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .footer-social {
        justify-content: center;
        gap: 10px;
    }

    .footer-social a {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .footer-heading {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }

    .footer-links {
        gap: 4px;
    }

    .footer-links li {
        padding: 2px 0;
    }

    .footer-links a,
    .footer-links span {
        font-size: 0.75rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        margin-top: 16px;
        padding-top: 12px;
        font-size: 0.7rem;
    }

    /* ---- Search / Forms ---- */
    .search-box-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .deals-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .cta-banner {
        padding: 40px 24px;
    }

    /* ---- Dashboard ---- */
    .dash-layout {
        grid-template-columns: 1fr;
    }

    .dash-sidebar {
        position: static;
    }

    .dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-form-grid {
        grid-template-columns: 1fr;
    }

    .dash-welcome {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

/* ============================================================
   SMALL MOBILE — max 480px
   ============================================================ */
@media (max-width: 480px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Hero — keep side-by-side, tighter */
    .hero-dw-container {
        gap: 8px;
        padding-top: 8px;
    }

    .hero-dw-title {
        font-size: 1rem;
    }

    .hero-dw-desc {
        font-size: 0.65rem;
        margin-bottom: 10px !important;
    }

    .hero-dw-btns .dw-btn {
        padding: 6px 12px;
        font-size: 0.65rem;
    }

    .hero-dw-right img,
    .hero-dw-car {
        max-height: 160px;
    }

    /* Stats */
    .dw-stat-num {
        font-size: 1.5rem;
    }

    .dw-stat-label {
        font-size: 0.7rem;
    }

    /* Gallery — single column */
    .dw-gallery-featured {
        grid-template-columns: 1fr;
    }

    .dw-gallery-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dw-gallery-card {
        height: 200px;
    }

    .dw-gallery-header .dw-section-title {
        font-size: 24px;
    }

    /* Philosophy */
    .dw-philosophy-desc {
        font-size: 0.95rem;
    }

    .dw-philosophy-feature-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 16px;
    }

    /* Deals */
    .dw-deal-card {
        min-width: auto;
    }

    /* Slider */
    .dw-slider-card {
        min-width: 260px;
    }

    .dw-slider-card-specs {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Steps */
    .dw-step {
        padding: 24px 20px;
    }

    /* Promise — single column */
    .dw-promise-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dw-promise-card {
        padding: 24px 20px;
    }

    /* CTA */
    .dw-cta {
        padding: 32px 20px;
        border-radius: 16px;
    }

    .dw-cta h2 {
        font-size: 1.3rem;
    }

    /* Vehicle detail */
    .vehicle-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .vehicle-specs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .spec-item {
        padding: 14px 10px;
    }

    .spec-item-icon {
        width: 38px;
        height: 38px;
        margin-bottom: 8px;
    }

    .spec-item-icon i,
    .spec-item-icon-img img {
        font-size: 15px;
        width: 18px;
        height: 18px;
    }

    /* Footer */
    .footer-grid {
        gap: 24px;
    }

    /* Auth */
    .auth-card {
        padding: 24px 16px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    /* Dashboard */
    .dash-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   EXTRA SMALL — max 360px
   ============================================================ */
@media (max-width: 360px) {
    .hero-dw-title {
        font-size: 1.3rem;
    }

    .dw-section-title {
        font-size: 1.3rem;
    }

    .dw-stat-num {
        font-size: 1.3rem;
    }

    .dw-stats-row {
        gap: 12px;
    }

    .navbar-brand img {
        height: 32px;
    }
}