/* 
   CINEMATIC COMPONENTS
   Glassmorphism, Floating elements, Offcanvas, Modals
*/

/* --- Glass Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    gap: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: all;
    filter: grayscale(0.5);
    transform: none !important;
    box-shadow: none !important;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}
.btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(90deg, #00e5ff, #00c6dd);
    color: var(--clr-dark);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}
.btn-primary:hover {
    background: linear-gradient(90deg, #0de0d0, #00a4b8);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.7);
    transform: translateY(-2px);
}

.btn-icon::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1em;
}

/* --- Floating Glass Header --- */
.site-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1400px;
    z-index: 1000;
    background: rgba(10, 31, 24, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1rem 0;
    transition: all var(--transition-normal);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.site-header.scrolled {
    background: rgba(4, 21, 39, 0.9);
    padding: 0.75rem 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
}
.nav-links a {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
    position: relative;
    padding: 0.5rem 0; /* Add padding to make the line snap to the bottom of the container better */
}
.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: var(--clr-accent);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1.1rem; /* Adjusted for the new header padding */
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--clr-accent);
    box-shadow: 0 0 15px var(--clr-accent);
    border-radius: 3px;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}
.mobile-toggle span {
    width: 24px; height: 2px; background: white; transition: 0.3s;
}

@media (max-width: 992px) {
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
}

/* --- Top Bar Hidden for Cinematic Feel --- */
.top-bar { display: none; }

/* --- Glass Panels & Cards --- */
.glass-panel {
    background: var(--clr-dark-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--clr-white-glass);
    border-radius: var(--border-radius-xl);
    padding: 4rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    transition: transform var(--transition-slow), background var(--transition-normal);
}
.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-10px);
}

/* Feature Big Number */
.big-num {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
}

/* Typography Badge */
.cinematic-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 2rem;
    display: inline-block;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

/* Form Controls (Glassy) */
.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--clr-accent);
    background: rgba(255, 255, 255, 0.1);
}
.form-control option {
    background: var(--clr-dark);
    color: white;
}

/* --- Offcanvas Form --- */
.offcanvas-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.offcanvas-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.offcanvas-content {
    position: absolute;
    top: 0;
    right: -500px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: var(--clr-dark);
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 3rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}
.offcanvas-overlay.active .offcanvas-content {
    right: 0;
}
.close-canvas {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Floating Actions --- */
.floating-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.float-whatsapp, .float-totop {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}
.float-whatsapp {
    background: #25D366;
}
.float-whatsapp:hover {
    background: #1eb956;
    transform: translateY(-5px);
}
.float-totop {
    background: var(--clr-accent);
}
.float-totop:hover {
    background: #00b3cc;
    transform: translateY(-5px);
}

/* --- Cinematic Video Modal --- */
.video-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
.video-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.video-container {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: var(--clr-dark);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.video-modal-overlay.active .video-container {
    transform: scale(1);
}
.close-video {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* --- Multi-step Dealer Form --- */
.step-container {
    display: none;
    animation: fadeIn 0.4s ease;
}
.step-container.active {
    display: block;
}
.step-indicator {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
}
.step-dot {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    transition: 0.3s;
}
.step-dot.active {
    background: var(--clr-accent);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer (Dark & Minimal) */
.site-footer {
    background: var(--clr-navy);
    padding: 8rem 0 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: #64748b; font-size: 0.875rem; }
.footer-links a:hover { color: white; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
    color: #475569;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* --- Before/After Slider --- */
.before-after-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    margin: 0 auto;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    background: var(--clr-dark);
}

.before-after-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
}

.before-image {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.after-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* JS will update this */
    height: 100%;
    z-index: 2;
    overflow: hidden;
}

.after-image-wrapper img {
    /* To keep the image fixed while the wrapper resizes */
    width: 1200px; /* Same max-width as container */
    max-width: none;
}
@media (max-width: 1200px) {
    .after-image-wrapper img {
        width: 100vw;
    }
}

.slider-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
}
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 1000px;
    background: transparent;
    cursor: ew-resize;
}
.slider-input::-moz-range-thumb {
    width: 100px;
    height: 1000px;
    background: transparent;
    cursor: ew-resize;
    border: none;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: white;
    z-index: 5;
    pointer-events: none;
    transform: translateX(-50%);
}

.slider-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.slider-label {
    position: absolute;
    top: 20px;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: 50px;
    z-index: 3;
    pointer-events: none;
}
.label-before { right: 20px; }
.label-after { left: 20px; }

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 900px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    z-index: 2000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

/* --- Specific Section Overrides --- */

/* --- Comprehensive Mobile Overrides --- */
@media (max-width: 768px) {
    /* Layout & Panels */
    .glass-panel { padding: 2rem 1.5rem !important; }
    .glass-card { padding: 1.5rem !important; }
    
    /* Header */
    .site-header { width: calc(100% - 20px); top: 10px; padding: 0.75rem 1rem !important; border-radius: 16px; }
    .site-header.scrolled { padding: 0.5rem 1rem !important; }
    .site-header img { max-width: 110px !important; height: auto !important; }
    
    .header-actions { gap: 0.5rem; }
    .header-actions .btn { padding: 0.5rem 0.75rem; font-size: 0.75rem; border-radius: 8px; }
    .header-actions .btn::after { display: none; } /* hide the icon to save space */
    
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; justify-content: center; text-align: center; }
    
    .spotlight-img { height: auto !important; aspect-ratio: 4/3; }
    
    .mobile-toggle { margin-left: 0 !important; }
    .mobile-toggle span { width: 20px; }
    
    /* Modals & Canvas */
    .offcanvas-content { max-width: 100%; padding: 2rem 1.5rem; }
    .video-container { width: 95%; max-width: 100%; }
    .lightbox-container img { max-width: 95vw; }
    
    /* Floating Buttons */
    .whatsapp-float { width: 50px; height: 50px; font-size: 1.5rem; bottom: 20px; right: 20px; }
    .back-to-top { width: 45px; height: 45px; bottom: 85px; right: 20px; }
    
    /* Cookie Banner */
    .cookie-banner { bottom: 0; left: 0; right: 0; transform: none; border-radius: 20px 20px 0 0; width: 100%; max-width: none; flex-direction: column; text-align: center; padding: 1.5rem; }
    .cookie-banner .cookie-actions { width: 100%; flex-direction: column; }
    .cookie-banner button { width: 100%; justify-content: center; }
    
    /* Slider specific */
    .before-after-container { border-radius: 16px; }
    .slider-handle-button { width: 36px; height: 36px; }
    .slider-label { font-size: 0.65rem !important; padding: 0.3rem 0.6rem !important; top: 10px !important; }
}
