:root {
    --bg: #f4f6f8;
    --fg: #0f172a;
    --muted: #64748b;
    --accent: #6366f1;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
    width: 100%;
}

.font-display {
    font-family: 'Space Grotesk', sans-serif;
}

/* 1. Update the main class to handle the animation */
.jumbo-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28em;
    padding: 8rem 1.5rem 4rem 1.5rem;
    
    /* Background Setup */
    background-image: url('/assets/img/bg.jpg');
    background-repeat: repeat-y;
    background-size: 100% auto; 
    background-position: center bottom;
    
    text-align: center;
    overflow: hidden;
    animation: heroScroll 60s linear infinite;
}

/* 2. Define the infinite movement animation */
@keyframes heroScroll {
    0% {
        /* Start from the bottom (or specific focus point) */
        background-position: center 100%;
    }
    100% {
        /* Move to the top */
        background-position: center 0%;
    }
}

.jumbo-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #000000ba 0%, rgb(15 23 42 / 76%) 40%, rgba(15, 23, 42, 0.9) 100%);
    z-index: 1; /* Ensure overlays are above the moving background */
}

.jumbo-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 1) 0%, transparent 30%, transparent 70%, rgba(15, 23, 42, 0.3) 100%);
    pointer-events: none;
    z-index: 1; /* Ensure overlays are above the moving background */
}

/* Ensure content stays on top of the animation */
.jumbo-hero > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .jumbo-hero {
        min-height: 22em;
        padding: 6rem 1.5rem 3rem 1.5rem;
        animation-duration: 20s; 
    }

    .jumbo-hero::before {
        background: radial-gradient(circle at center, #000000ba 0%, rgb(15 23 42 / 76%) 40%, rgba(15 23 42, 0.9) 100%);
    }
}

/* Modern Carousel */
.carousel-wrapper {
    position: relative;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 0 1.5rem 0;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex-shrink: 0;
    scroll-snap-align: start;
    width: 130px;
}

@media (min-width: 480px) {
    .carousel-item {
        width: 150px;
    }
}

@media (min-width: 768px) {
    .carousel-item {
        width: 170px;
    }
}

@media (min-width: 1024px) {
    .carousel-item {
        width: 185px;
    }
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.carousel-wrapper:hover .carousel-btn,
.carousel-wrapper:focus-within .carousel-btn {
    opacity: 1;
    pointer-events: auto;
}

.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    left: 0.5rem;
}

.carousel-btn.next {
    right: 0.5rem;
}

@media (max-width: 768px) {
    .carousel-btn {
        display: none;
    }
}

/* Card Styles */
.media-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.media-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
}

.media-card:hover .card-overlay {
    opacity: 1;
}

.card-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.score-badge {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.6));
    backdrop-filter: blur(4px);
}

/* Focus Ring */
.focus-ring:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .animate-in {
        animation: none;
        opacity: 1;
    }

    .media-card:hover {
        transform: none;
    }
}

/* Modal */
.modal-overlay {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
}

/* login  */


/* --- Mobile Menu Button --- */
.mobile-menu-btn {
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: #64748b; /* Slate 500 */
    transition: all 0.2s;
}
.mobile-menu-btn:hover { color: #0f172a; background: rgba(0,0,0,0.05); }

/* --- Mobile Menu Drawer (Light) --- */
.mobile-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    z-index: 40;
    padding: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    box-shadow: 5px 0 15px rgba(0,0,0,0.05);
}
.mobile-nav.is-open { transform: translateX(0); }

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4); /* Softer dark overlay for light mode */
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

/* --- Modal Panel (Light Mode) --- */
.account-modal {
    width: 100%;
    max-height: 90vh;
    background: #ffffff;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    z-index: 101;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}

/* Open State Animation */
.account-modal.is-open { transform: translateY(0); opacity: 1; }

/* WEB SPECIFIC: Centered Box */
@media (min-width: 640px) {
    .account-modal {
        max-width: 480px;
        width: 100%;
        border-radius: 1.5rem; /* Rounded all corners */
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
        transform: translateY(20px) scale(0.95);
    }
    .account-modal.is-open {
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.jw-modal-new__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9; /* Slate 100 */
}
.jw-modal-new-toolbar { display: flex; align-items: center; justify-content: space-between; }
.jw-modal-new-title { font-size: 1.125rem; font-weight: 700; color: #0f172a; /* Slate 900 */ }
.new-design-modal__close {
    padding: 0.5rem;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    transition: background 0.2s;
}
.new-design-modal__close:hover { background: #f1f5f9; color: #0f172a; }

/* Modal Body */
.jw-modal-new__body { padding: 1.5rem; overflow-y: auto; }

/* --- Modal Buttons (Light Mode) --- */
.account-modal-button {
    width: 100%;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0; /* Slate 200 */
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    text-align: left;
    transition: all 0.2s;
    color: #1e293b;
}
.account-modal-button:hover { 
    background: #f8fafc; 
    border-color: #cbd5e1; 
}

.account-modal-button .button-left {
    width: 40px;
    display: flex;
    justify-content: center;
    color: #fba200; /* Brand Color Icon */
}
.account-modal-button .text-wrapper { flex: 1; padding: 0 0.75rem; }
.account-modal-button .text-light { color: #64748b; font-size: 0.875rem; }
.account-modal-button .button-right { color: #94a3b8; }

/* CTA Button (Create Account) - Brand Color #fba200 */
.account-modal-button.cta-button {
    background: #fba200;
    border: none;
    color: #ffffff;
}
/* Fix text colors inside CTA for readability */
.cta-button .button-left, 
.cta-button .button-right { color: #ffffff; }
.cta-button .text-light { color: rgba(255,255,255,0.9); }
.cta-button .list li svg { color: #ffffff; }

.cta-button:hover {
    background: #e59100; /* Slightly darker on hover */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 162, 0, 0.25);
}

/* Secondary Buttons */
.account-modal-button.secondary { 
    background: #f8fafc; /* Slate 50 */
    border: 1px solid #e2e8f0; 
}
.account-modal-button.secondary:hover { background: #f1f5f9; }
div#account-modal {
    border-radius: 12px;
}