/* =====================================================
   RESPONSIVE.CSS — Mobile & Tablet Fixes
   CN Transport — Rent Car Portfolio
   Breakpoints: sm ≥576  md ≥768  lg ≥992  xl ≥1200
   ===================================================== */

/* ─── GLOBAL ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}
img {
    max-width: 100%;
    height: auto;
}

/* ─── NAVBAR / NAVIGASI ──────────────────────────── */
@media (max-width: 991.98px) {
    #ftco-navbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    /* When mobile nav is open, tint the menu bg */
    #ftco-nav {
        background: rgba(10, 10, 10, 0.97) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        padding: 12px 0 16px !important;
        border-radius: 0 0 16px 16px !important;
    }

    #ftco-navbar .navbar-nav {
        padding: 0 8px !important;
        gap: 2px !important;
    }

    #ftco-navbar .nav-item {
        width: 100%;
    }

    #ftco-navbar .nav-link {
        padding: 10px 16px !important;
        border-radius: 10px !important;
        border-bottom: none !important;
        font-size: 0.95rem !important;
    }

    #ftco-navbar .nav-link:active,
    #ftco-navbar .nav-item.active > .nav-link {
        background: rgba(249, 109, 0, 0.12) !important;
        color: #f96d00 !important;
    }

    #ftco-navbar .btn-register {
        margin: 6px 16px !important;
        text-align: center !important;
        display: block !important;
        border-radius: 10px !important;
    }

    /* Push hero content below fixed navbar */
    .hero-section {
        padding-top: 72px !important;
    }
    .page-hero {
        padding-top: 96px !important;
    }
    .detail-hero {
        padding-top: 96px !important;
    }
}

/* ─── HERO SECTION ───────────────────────────────── */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto !important;
        padding-bottom: 56px !important;
    }

    .hero-section .container {
        padding-top: 80px !important;
        padding-bottom: 40px !important;
    }

    /* Right-side car image stacked above on tablet */
    .hero-car-image {
        margin-top: 40px;
    }
    .hero-car-image img {
        max-width: 380px !important;
    }
}

@media (max-width: 575.98px) {
    .hero-section .container {
        padding-top: 72px !important;
        padding-bottom: 32px !important;
    }

    .hero-title {
        font-size: 1.85rem !important;
        line-height: 1.2 !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 24px !important;
    }

    /* Hero CTA buttons: stack on very small */
    .hero-section .d-flex.flex-wrap {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }
    .hero-section .btn-hero-primary,
    .hero-section .btn-hero-outline {
        width: 100% !important;
        text-align: center !important;
    }

    .hero-stats {
        gap: 20px !important;
        margin-top: 28px !important;
    }
    .hero-stat-item .number {
        font-size: 1.5rem !important;
    }
    .hero-stat-item .label {
        font-size: 0.72rem !important;
    }

    .hero-car-image {
        margin-top: 28px !important;
    }
    .hero-car-image img {
        max-width: 260px !important;
    }
}

/* ─── FEATURES SECTION ───────────────────────────── */
@media (max-width: 575.98px) {
    .features-section {
        padding: 56px 0 !important;
    }
    .feature-card {
        padding: 28px 20px !important;
    }
}

/* ─── CARS / ARMADA SECTION ──────────────────────── */
@media (max-width: 575.98px) {
    .cars-section {
        padding: 56px 0 !important;
    }

    .car-card-img {
        height: 180px !important;
    }

    .car-card-body {
        padding: 16px 18px !important;
    }

    /* Stack sewa buttons on small phones */
    .car-card-body .d-flex {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .btn-sewa,
    .btn-detail-car {
        flex: unset !important;
        width: 100% !important;
        text-align: center !important;
    }
}

/* ─── HOW IT WORKS ───────────────────────────────── */
@media (max-width: 767.98px) {
    .hiw-section {
        padding: 56px 0 !important;
    }

    /* Hide connector lines between steps on mobile */
    .step-connector {
        display: none !important;
    }
}

/* ─── CTA SECTION ────────────────────────────────── */
@media (max-width: 767.98px) {
    .cta-section {
        padding: 56px 0 !important;
    }

    .cta-section .d-flex {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .cta-section .btn {
        width: 100% !important;
        max-width: 320px !important;
        text-align: center !important;
    }

    .cta-section h2 {
        font-size: 1.6rem !important;
        text-align: center !important;
    }
    .cta-section p {
        text-align: center !important;
    }
}

/* ─── FOOTER ─────────────────────────────────────── */
@media (max-width: 767.98px) {
    .ftco-footer .ftco-footer-widget {
        margin-bottom: 28px !important;
    }

    .ftco-footer .ftco-footer-social {
        justify-content: flex-start !important;
    }
}

@media (max-width: 575.98px) {
    .ftco-footer {
        padding: 48px 0 !important;
    }
}

/* ─── PAGE HERO (Pesanan / Profil / Sewa) ─────────── */
@media (max-width: 767.98px) {
    .page-hero {
        padding: 96px 0 40px !important;
    }
    .page-hero h1 {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 575.98px) {
    .page-hero {
        padding: 88px 0 32px !important;
    }
}

/* ─── SEWA FORM ──────────────────────────────────── */
@media (max-width: 767.98px) {
    /* Make all col-6 inside the form stack to full width */
    .ftco-section .col-6,
    .ftco-section form .col-6 {
        -webkit-box-flex: 0 !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .ftco-section .contact-form {
        padding: 24px 16px !important;
    }

    /* KTP / KK document preview images */
    .ftco-section .border img.w-75 {
        width: 100% !important;
    }
}

/* ─── PESANAN TABLE ──────────────────────────────── */
@media (max-width: 767.98px) {
    /* Allow horizontal scroll inside table card */
    .table-card {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Remove overflow:hidden that blocks scroll */
    .table-card {
        overflow: initial !important;
        overflow-x: auto !important;
    }

    .table-card table {
        min-width: 680px !important;
    }

    .pesanan-section {
        padding: 40px 0 60px !important;
    }
}

@media (max-width: 575.98px) {
    .info-banner {
        flex-direction: column !important;
        gap: 8px !important;
    }
}

/* ─── PROFIL PAGE ────────────────────────────────── */
@media (max-width: 991.98px) {
    /* Avatar card: un-stick on tablet/mobile */
    .avatar-card {
        position: static !important;
        margin-bottom: 28px !important;
    }
}

@media (max-width: 575.98px) {
    .profil-section {
        padding: 36px 0 56px !important;
    }

    .info-card {
        padding: 20px 16px !important;
    }

    .info-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .info-left {
        width: 100% !important;
    }

    .btn-edit {
        align-self: flex-end !important;
    }

    /* Document cards side by side → single column */
    .doc-card {
        min-height: 180px !important;
    }
}

/* ─── DETAIL MOBIL ───────────────────────────────── */
@media (max-width: 991.98px) {
    .detail-img-wrap img {
        height: 300px !important;
    }
    .detail-info-panel {
        margin-top: 28px !important;
        padding: 28px 24px !important;
    }
}

@media (max-width: 575.98px) {
    .detail-section {
        padding: 40px 0 56px !important;
    }
    .detail-img-wrap img {
        height: 220px !important;
    }
    .detail-info-panel {
        padding: 20px 16px !important;
    }

    .detail-spec-row {
        gap: 8px !important;
    }
    .detail-spec-badge {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
    }

    /* Price block: stack vertically on small phones */
    .detail-price-block {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 18px 16px !important;
    }
    .detail-price-block .price-right {
        text-align: left !important;
    }

    /* CTA buttons on detail page */
    .detail-info-panel .d-flex {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .detail-info-panel .d-flex .btn,
    .btn-detail-sewa,
    .btn-detail-wa {
        width: 100% !important;
        text-align: center !important;
        flex: unset !important;
    }

    /* Stat cards */
    .detail-cards-row .row > [class*="col-"] {
        margin-bottom: 12px !important;
    }
    .detail-stat-card {
        padding: 20px 18px !important;
    }

    /* Description card */
    .desc-card {
        padding: 24px 16px !important;
    }
}

/* ─── DETAIL PAGE CTA ─────────────────────────────── */
@media (max-width: 767.98px) {
    .detail-cta {
        padding: 48px 0 !important;
    }
    .detail-cta h3 {
        font-size: 1.5rem !important;
    }
    .detail-cta .d-flex {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .detail-cta .d-flex .btn,
    .detail-cta .btn-detail-sewa,
    .detail-cta .btn-detail-wa {
        width: 100% !important;
        max-width: 320px !important;
        text-align: center !important;
    }
}

/* ─── SECTION HEADINGS ───────────────────────────── */
@media (max-width: 575.98px) {
    .section-title {
        font-size: 1.5rem !important;
    }
}

/* ─── WHATSAPP FLOAT ─────────────────────────────── */
@media (max-width: 575.98px) {
    .whatsapp-float {
        bottom: 18px !important;
        right: 18px !important;
        width: 48px !important;
        height: 48px !important;
        font-size: 1.3rem !important;
    }
}
