/* ========================================================
   Custom Styles - Mojosongo Rental Mobil
   Brand Accent: WhatsApp Green (#25D366)
   Full Responsive: Mobile → Tablet → Desktop
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --wa-color: #25D366;
    --wa-hover: #20ba59;
    --wa-dark: #128C7E;
    --wa-deep: #075E54;
    --wa-light: #dcf8c6;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.08);
    --shadow-card-hover: 0 20px 40px rgba(15, 23, 42, 0.14);
}

/* Custom breakpoint xs (< 480px → ≥ 400px) */
@media (min-width: 400px) {
    .xs\:block { display: block !important; }
    .xs\:hidden { display: none !important; }
    .xs\:inline { display: inline !important; }
}

/* ========================
   BASE / RESET
   ======================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================
   GLASSMORPHISM CLASSES
   ======================== */
.glass-nav {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ========================
   FLOATING WHATSAPP BUTTON
   ======================== */
.wa-float-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    width: 58px;
    height: 58px;
    background-color: var(--wa-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.wa-float-btn:hover {
    transform: scale(1.12) translateY(-4px);
    background-color: var(--wa-hover);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.6);
}

/* Pulse animation behind floating button */
.wa-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--wa-color);
    border-radius: 50%;
    opacity: 0.7;
    animation: wa-pulse-ring 2.2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
    z-index: -1;
}

@keyframes wa-pulse-ring {
    0%   { transform: scale(0.9); opacity: 0.8; }
    60%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ========================
   CARD HOVER LIFT
   ======================== */
.card-hover-lift {
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.32s ease;
    box-shadow: var(--shadow-card);
}

.card-hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

/* ========================
   HERO BADGE
   ======================== */
.hero-badge {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15) 0%, rgba(18, 140, 126, 0.12) 100%);
    border: 1px solid rgba(37, 211, 102, 0.3);
}

/* ========================
   CUSTOM SCROLLBAR
   ======================== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ========================
   CAR IMAGE CONTAINER
   ======================== */
.car-img-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f5e9 100%);
}

.car-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.car-img-container:hover img {
    transform: scale(1.06);
}

/* ========================
   RESPONSIVE: MOBILE FIRST
   ======================== */

/* --- xs: < 480px --- */
@media (max-width: 479px) {
    /* Hero */
    #home { padding-top: 3rem; padding-bottom: 3rem; }
    #home h1 { font-size: 1.65rem !important; line-height: 1.25; }
    #home p  { font-size: 0.9rem !important; }

    /* Feature highlights grid: stack on very small */
    #home .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    #home .grid-cols-3 > div { padding: 0.5rem 0.25rem; }

    /* Form card */
    #form-generator-card { padding: 1.25rem !important; border-radius: 1.25rem !important; }

    /* Armada grid: 1 column on xs */
    #armada .grid { grid-template-columns: 1fr !important; gap: 1.25rem !important; }

    /* Keunggulan grid: 1 col */
    #keunggulan .grid { grid-template-columns: 1fr !important; gap: 1rem !important; }

    /* Syarat grid: 1 col */
    #syarat .grid { grid-template-columns: 1fr !important; gap: 1rem !important; }

    /* Lokasi grid: 1 col */
    #lokasi .grid { grid-template-columns: 1fr !important; gap: 1rem !important; }

    /* Floating WA button: smaller on xs */
    .wa-float-btn { width: 50px; height: 50px; bottom: 16px; right: 16px; }
    .wa-float-btn i { font-size: 1.4rem; }

    /* Footer grid */
    footer .grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
}

/* --- sm: 480px - 767px --- */
@media (min-width: 480px) and (max-width: 767px) {
    #home h1 { font-size: 1.9rem !important; }

    /* Armada: 1 column */
    #armada .grid { grid-template-columns: 1fr !important; max-width: 480px; margin-left: auto; margin-right: auto; }

    /* Keunggulan: 2 columns */
    #keunggulan .grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Footer */
    footer .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 2rem !important; }
}

/* --- md: 768px - 1023px (Tablet) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Armada: 2 columns on tablet */
    #armada .lg\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }

    /* Keunggulan: 2 columns */
    #keunggulan .lg\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }

    /* Hero section: stack vertically */
    #home .lg\:grid-cols-12 { grid-template-columns: 1fr !important; }
    #home .lg\:col-span-6 { grid-column: span 1 !important; }
    #home .lg\:text-left { text-align: center !important; }
    #home .lg\:mx-0 { margin-left: auto !important; margin-right: auto !important; }

    /* Footer grid: 2x2 */
    footer .lg\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }

    /* Map section */
    #lokasi .lg\:col-span-5,
    #lokasi .lg\:col-span-7 { grid-column: span 12 !important; }
}

/* --- Form responsive fix --- */
@media (max-width: 639px) {
    /* Date inputs: stack */
    #waGeneratorForm .sm\:grid-cols-2 { grid-template-columns: 1fr !important; }

    /* Hero feature badges: tighten */
    .hero-badge { font-size: 0.72rem; padding: 0.3rem 0.75rem; }
}

/* ========================
   ARMADA CARD IMAGE HEIGHT
   Fix image height per breakpoint
   ======================== */
.armada-card-img {
    height: 200px;
}

@media (min-width: 640px) {
    .armada-card-img { height: 210px; }
}

@media (min-width: 1024px) {
    .armada-card-img { height: 185px; }
}

@media (min-width: 1280px) {
    .armada-card-img { height: 200px; }
}

/* ========================
   SECTION PADDING RESPONSIVE
   ======================== */
@media (max-width: 767px) {
    .py-20 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
    .mb-14 { margin-bottom: 2.5rem !important; }
    .pt-16 { padding-top: 3rem !important; }
}

/* ========================
   IFRAME MAP RESPONSIVE
   ======================== */
.map-wrapper iframe {
    min-height: 280px;
    width: 100%;
}

@media (min-width: 768px) {
    .map-wrapper iframe { min-height: 380px; }
}

/* ========================
   HEADER NAV OVERFLOW FIX
   ======================== */
header { width: 100%; max-width: 100vw; }

/* ========================
   MOBILE MENU ANIMATION
   ======================== */
#mobile-menu {
    overflow: hidden;
    animation: none;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active nav link highlight */
.nav-link.active {
    color: var(--wa-color);
    background-color: rgba(37, 211, 102, 0.08);
}

.mobile-nav-link.active {
    color: var(--wa-color);
    background-color: rgba(37, 211, 102, 0.08);
}

/* Hamburger icon transition */
#hamburger-icon {
    transition: all 0.2s ease;
}

/* ========================
   FORM CARD FULL WIDTH MOBILE
   ======================== */
@media (max-width: 639px) {
    #form-generator-card {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        border-radius: 1rem !important;
    }
}

/* ========================
   SYARAT & KETENTUAN BOX
   ======================== */
@media (max-width: 767px) {
    #syarat .rounded-3xl { padding: 1.5rem !important; }
}

/* ========================
   FOOTER RESPONSIVE
   ======================== */
@media (max-width: 767px) {
    footer .pt-16  { padding-top: 2.5rem !important; }
    footer .pb-12  { padding-bottom: 2rem !important; }
    footer .pb-12.border-b { padding-bottom: 2rem !important; }
    footer .gap-10 { gap: 2rem !important; }
}

/* ========================
   PREVENT HORIZONTAL SCROLL
   ======================== */
section, footer, header, main {
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================
   LOGO MARQUEE ANIMATION
   ======================== */
.logos-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* fade edges */
    padding: 0.75rem 0;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.logos-marquee {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    width: max-content;
    animation: marquee-scroll 35s linear infinite;
    will-change: transform;
}

.logos-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.logo-item {
    flex-shrink: 0;
}

.logo-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.125rem;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    cursor: default;
}

.logo-card:hover {
    box-shadow: 0 10px 25px rgba(15,23,42,0.08);
    border-color: rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.logo-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

/* ========================
   TESTIMONIAL CARDS
   ======================== */
.testimonial-card {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
    border-color: rgba(37, 211, 102, 0.35);
}

/* Subtle green top-left glow deco */
.testimonial-bg-deco {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(37,211,102,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Star rating picker */
.star-btn {
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}
.star-btn:hover {
    transform: scale(1.2);
}

/* Photo handover image hover */
.handover-photo-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.handover-photo-box:hover img {
    transform: scale(1.04);
}

/* ========================
   STATS COUNTER SECTION
   ======================== */
#klien .grid > div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#klien .grid > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.15);
}

/* ========================
   RESPONSIVE: MARQUEE & TESTIMONIALS
   ======================== */
@media (max-width: 479px) {
    .logo-card { padding: 0.6rem 0.9rem; gap: 0.625rem; }
    .logo-name  { font-size: 0.75rem; }
    .logo-icon  { width: 2.25rem; height: 2.25rem; }
    .logo-icon i { font-size: 0.875rem !important; }

    #ulasan .grid { grid-template-columns: 1fr !important; }
    #klien .grid  { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (min-width: 480px) and (max-width: 767px) {
    #ulasan .grid { grid-template-columns: 1fr !important; }
}

/* ========================================================
   INTERIOR & FACILITY GALLERY LIGHTBOX MODAL
   ======================================================== */

/* Thumbnail strip */
.interior-thumb {
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    will-change: transform;
    flex-shrink: 0;
}
.interior-thumb:hover {
    transform: translateY(-2px);
    opacity: 1 !important;
}
.interior-thumb.active {
    border-color: #25D366 !important;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.4) !important;
    opacity: 1 !important;
    transform: scale(1.04);
}

/* Main image fade transition */
.gallery-fade {
    animation: galleryFade 0.28s ease-out forwards;
}
@keyframes galleryFade {
    from { opacity: 0.3; transform: scale(0.985); }
    to   { opacity: 1;   transform: scale(1); }
}

/* Modal backdrop (prevents flicker on slow devices) */
#modalDetailInterior {
    will-change: opacity;
}

/* Modal inner card: prevent overflow on small screens */
#modalDetailInterior > div {
    max-height: 92dvh; /* dvh = dynamic viewport height (keyboard-aware) */
    max-height: 92vh;  /* fallback */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Thumbnail horizontal scroll container */
#detail_thumbnails_container {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    padding-bottom: 0.375rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
#detail_thumbnails_container::-webkit-scrollbar { height: 4px; }
#detail_thumbnails_container::-webkit-scrollbar-track { background: transparent; }
#detail_thumbnails_container::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

#detail_thumbnails_container .interior-thumb {
    scroll-snap-align: center;
}

/* Mobile optimizations */
@media (max-width: 639px) {
    #modalDetailInterior > div {
        border-radius: 1.25rem !important;
        max-height: 97dvh;
        max-height: 97vh;
    }
    #modalDetailInterior .p-4 {
        padding: 0.875rem !important;
    }
    #modalDetailInterior .aspect-video,
    #modalDetailInterior .relative.bg-slate-950 {
        max-height: 220px;
    }
    .interior-thumb {
        width: 4.5rem !important;
        height: 3rem !important;
    }
    /* Footer CTA buttons: stack vertically on xs */
    #modalDetailInterior .sm\\:flex-row {
        flex-direction: column !important;
    }
    #modalDetailInterior .sm\\:flex-row > div,
    #modalDetailInterior .sm\\:flex-row > button {
        width: 100% !important;
    }
}

/* Admin interior modal z-index fix */
#modalInterior    { z-index: 50; }
#modalEditInterior { z-index: 60; }

/* Admin items list scrollbar */
#interior_items_list {
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}
#interior_items_list::-webkit-scrollbar { width: 4px; }
#interior_items_list::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
