/* css/style.css */
:root {
    --text-primary: #ffffff;
    --neon-green-start: #d3ffaa;
    --neon-green-end: #88ffed;
    --font-impact: 'Anton', sans-serif;
    --font-base: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    background-color: #0b0220; /* fallback */
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Wrapper for full layout */
.main-wrapper {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    background: url('../images/bg_space.png') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 4%;
    position: relative; /* Changed to relative so it pushes the banner down */
    width: 100%;
    z-index: 100;
    background: rgba(26, 0, 51, 0.6); /* Semi-transparent dark purple */
    backdrop-filter: blur(12px); /* Glassmorphism effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border */
}

/* Logo Design */
.logo-container {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    box-shadow: none;
    transform: none;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}


.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--neon-green-end);
}

/* Login Button */
.btn-login {
    background: linear-gradient(90deg, var(--neon-green-start), var(--neon-green-end));
    color: #1a0033;
    padding: 0.6rem 1.8rem;
    border-radius: 9999px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 0 15px var(--neon-green-end);
    transition: transform 0.2s;
}
.btn-login:hover {
    transform: scale(1.05);
}

/* Hero Carousel */
.carousel-container {
    flex-grow: 1;
    position: relative;
    width: 100%;
    height: 100vh; /* Changed to 100vh to fill screen */
    overflow: hidden;
    z-index: 10;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Aligns the image closer to the top so faces don't get cut off by the menu */
    object-position: center 15%; 
}

/* Banner Overlay Text */
.banner-content {
    position: absolute;
    top: 50%;
    left: 8%;
    transform: translateY(-50%);
    max-width: 600px;
    z-index: 5;
    text-align: left;
}

.banner-title {
    font-family: var(--font-impact);
    font-size: 5rem;
    line-height: 1;
    color: white;
    text-shadow: 2px 4px 10px rgba(0,0,0,0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.text-highlight {
    color: var(--neon-green-start);
    text-shadow: 0 0 15px var(--neon-green-end), 2px 4px 10px rgba(0,0,0,0.8);
}

.banner-text {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 1px 2px 5px rgba(0,0,0,0.8);
    font-weight: 700;
}

.btn-banner {
    display: inline-block;
    background: linear-gradient(90deg, var(--neon-green-start), var(--neon-green-end));
    color: #1a0033;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 1.2rem;
    text-decoration: none;
    box-shadow: 0 0 20px var(--neon-green-end);
    transition: transform 0.2s;
}
.btn-banner:hover {
    transform: scale(1.05);
}

/* Carousel Controls */
.carousel-controls {
    position: absolute;
    bottom: 30px;
    right: 5%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 40;
}

.dots {
    display: flex;
    gap: 8px;
}
.dot {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}
.dot.active {
    width: 30px;
    background: white;
    border-radius: 6px;
}

.arrows {
    display: flex;
    gap: 10px;
}
.arrow-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    border: none;
    font-weight: bold;
    font-size: 1.2rem;
    color: #3b074d;
    cursor: pointer;
    transition: background 0.3s;
}
.arrow-btn:hover {
    background: white;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 200;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--neon-green-start);
    border-radius: 3px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--neon-green-end);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
        margin-left: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Hidden */
        width: 250px;
        height: 100vh;
        background: rgba(11, 2, 32, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 150;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    }

    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 3%;
    }
    .logo-img {
        height: 50px; /* Smaller logo on mobile */
    }
    .btn-login {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .carousel-container {
        height: 100vh; /* Keep full screen */
    }
    .carousel-slide img {
        /* Mantiene el diseño de PC cubriendo toda la pantalla, enfocado en el rostro */
        object-fit: cover !important; 
        object-position: center 15% !important;
    }
    
    .banner-content {
        top: 50% !important;
        bottom: auto !important;
        left: 5% !important;
        right: 5% !important;
        transform: translateY(-50%) !important;
        text-align: center !important;
        max-width: 100% !important;
    }
    .banner-title {
        font-size: 3rem;
    }
    .banner-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .btn-banner {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .carousel-controls {
        right: 50%;
        transform: translateX(50%); /* Center controls on mobile */
        bottom: 20px;
        gap: 1rem;
        width: 100%;
        justify-content: center;
    }
    .arrow-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* =========================================
   LOGIN PAGE STYLES
   ========================================= */

.login-body {
    background: url('../images/bg_space.png') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-wrapper {
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.login-card {
    background: rgba(26, 0, 51, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.05);
    text-align: center;
}

.login-logo-link {
    display: block;
    margin-bottom: 2rem;
}

.login-logo {
    height: 80px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.login-title {
    font-family: var(--font-impact);
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.alert-error {
    background: rgba(255, 50, 50, 0.2);
    border: 1px solid rgba(255, 50, 50, 0.5);
    color: #ffb3b3;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Checkout Success Modal */
.success-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(26, 0, 51, 0.95);
    border: 2px solid var(--neon-green-start);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(136, 255, 237, 0.3);
}

.modal-content h2 {
    font-family: var(--font-impact);
    color: var(--neon-green-start);
    font-size: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.modal-content p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.modal-close-btn {
    background: linear-gradient(90deg, var(--neon-green-start), var(--neon-green-end));
    color: #1a0033;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 9999px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(136, 255, 237, 0.3);
    transition: transform 0.2s;
}

.modal-close-btn:hover {
    transform: scale(1.05);
}

/* Home Sections */
.home-section {
    padding: 4rem 5%;
    text-align: center;
    position: relative;
    z-index: 10;
}
.section-title {
    font-family: var(--font-impact);
    font-size: 3rem;
    color: var(--neon-green-start);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Sorteos Grid */
.home-sorteos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.home-sorteo-card {
    background: rgba(26, 0, 51, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}
.home-sorteo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(136, 255, 237, 0.2);
    border-color: var(--neon-green-start);
}
.home-sorteo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.home-sorteo-info {
    padding: 1.5rem;
}
.home-sorteo-info h3 {
    font-size: 1.5rem;
    font-family: var(--font-impact);
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}
.home-sorteo-info p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Ganadores Grid */
.ganadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}
.ganador-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(136, 255, 237, 0.2);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.ganador-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--neon-green-start);
    object-fit: cover;
    margin: 0 auto 1rem;
    box-shadow: 0 0 15px rgba(136, 255, 237, 0.5);
}
.ganador-card h3 {
    font-family: var(--font-impact);
    font-size: 1.5rem;
    color: var(--neon-green-start);
    margin-bottom: 0.5rem;
}
.ganador-card p {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Sponsors Section (White Background) */
.sponsors-section {
    background: #ffffff;
    padding: 4rem 5%;
    position: relative;
    z-index: 10;
    margin-top: 2rem;
}
.sponsors-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}
.sponsors-info {
    flex: 1;
    min-width: 300px;
    text-align: left;
}
.sponsors-title {
    font-family: var(--font-impact);
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.sponsors-text {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
}
.sponsors-text strong {
    color: #333;
    font-weight: 800;
}
.sponsors-logos {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-width: 300px;
}
.sponsors-logos img {
    height: 140px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    transition: transform 0.3s;
}
.sponsors-logos img:hover {
    transform: scale(1.05);
}

/* Mobile responsive for sponsors */
@media (max-width: 768px) {
    .sponsors-info { text-align: center; }
    .sponsors-logos { justify-content: center; }
}

/* Footer */
.site-footer {
    background: rgba(11, 2, 32, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 5%;
    text-align: center;
    position: relative;
    z-index: 10;
}
.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-credits {
    width: 100%;
}
.footer-credits p {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 700;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.input-neon {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    border-radius: 8px;
    color: white;
    font-family: var(--font-base);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-neon:focus {
    outline: none;
    border-color: var(--neon-green-start);
    box-shadow: 0 0 10px rgba(211, 255, 170, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.btn-login-submit {
    background: linear-gradient(90deg, var(--neon-green-start), var(--neon-green-end));
    color: #1a0033;
    padding: 1rem;
    border-radius: 9999px;
    font-weight: 900;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 0 15px var(--neon-green-end);
    transition: transform 0.2s;
    margin-top: 1rem;
}

.btn-login-submit:hover {
    transform: scale(1.02);
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

.login-footer a {
    color: var(--neon-green-start);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: white;
}

/* =========================================
   SORTEOS PAGE STYLES
   ========================================= */
   
.sorteos-container {
    padding: 2rem 5%;
    flex-grow: 1;
    z-index: 10;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    font-family: var(--font-impact);
    font-size: 4rem;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 2px;
}

.sorteos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.sorteo-card {
    background: rgba(26, 0, 51, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.sorteo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(136, 255, 237, 0.2);
    border-color: rgba(136, 255, 237, 0.3);
}

.sorteo-image {
    position: relative;
    height: 200px;
    width: 100%;
}

.sorteo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
}

.sorteo-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--neon-green-end);
    color: #1a0033;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.sorteo-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sorteo-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 900;
    color: white;
}

.sorteo-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.sorteo-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-green-start), var(--neon-green-end));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--neon-green-start);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--neon-green-start);
    font-weight: 700;
}

.sorteo-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.sorteo-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}
