/* ===========================================
   CSS SECTIONS ORGANIZATION
   ===========================================

   1. CSS Variables
   2. Global Styles
   3. Buttons
   4. Navigation
   5. Hero Section
   6. Features Section
   7. Preview Section (Gallery)
   8. Download Section
   9. Footer
   10. Responsive Design
   11. Carousel Animations

   =========================================== */

/* ===========================================
   1. CSS VARIABLES
   =========================================== */
:root {
    --bg-dark: #090B17;          /* Fondo muy oscuro de la app */
    --appbar-dark: #1E1F24;       /* Un tono oscuro para el appbar */
    --card-dark: #2D2D35;        /* Un tono más claro para tarjetas */
    --accent-lime: #D5FF5F;      /* El verde neón de tus botones */
    --text-main: #FFFFFF;        /* Texto blanco principal */
    --text-muted: #9CA3AF;       /* Texto gris suave (como en los inputs) */
    --navbar-bg: rgba(5, 9, 18, 0.9); /* Navbar semitransparente */
    --shadow-lime: 0 4px 14px rgba(216, 255, 67, 0.3);
}

/* ===========================================
   2. GLOBAL STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

span { color: var(--accent-lime); }

a { text-decoration: none; transition: 0.3s; }

ul { list-style: none; }

/* ===========================================
   3. BUTTONS
   =========================================== */
.btn-primary {
    padding: 12px 24px;
    background-color: var(--accent-lime);
    color: #000000;
    font-weight: 700;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lime);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(216, 255, 67, 0.5);
}

/* Contenedor de botones */
.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* Estilo base y animación */
.hero-btns .btn-secondary {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: floatingButtons 4s ease-in-out infinite;
}

/* Variamos el retraso para que no suban y bajen todos a la vez */
.hero-btns a:nth-child(1) { animation-delay: 0s; }
.hero-btns a:nth-child(2) { animation-delay: 0.5s; }
.hero-btns a:nth-child(3) { animation-delay: 1s; }

/* Efecto al pasar el mouse (hover) */
.hero-btns .btn-secondary:hover {
    transform: translateY(-5px) scale(1.15); /* Se agranda un poco al tocarlo */
    animation-play-state: paused; /* Se detiene la animación para que el usuario haga clic fácil */
    filter: brightness(1.1);
}

/* La animación de levitación */
@keyframes floatingButtons {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px); /* Sube 10 pixeles */
    }
    100% {
        transform: translateY(0px);
    }
}

.btn-large { padding: 15px 35px; font-size: 1.1rem; }

/* ===========================================
   4. NAVIGATION
   =========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    height: 35px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn-download-nav) {
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-lime);
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: sans-serif;
    font-weight: bold;
}

/* The switch container */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

/* Hide the default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider track */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--card-dark);
    transition: .4s;
    border-radius: 24px;
}

/* The white circle/knob */
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: var(--accent-lime);
    transition: .4s;
    border-radius: 50%;
}

/* Colors when toggled (ES)*/
input:checked + .slider {
    background-color: var(--card-dark) /* You can change this to your brand color */
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.language-switcher select {
    font-size: 0.85rem;
    color: var(--accent-lime);
    border: none;
    background: var(--bg-dark);
    outline: none;
    cursor: pointer;
}

option {
    font-size: 0.65rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

.btn-download-nav {
    padding: 8px 18px;
    background-color: transparent;
    color: var(--accent-lime) !important;
    border: 1px solid var(--accent-lime);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-download-nav:hover {
    background-color: var(--accent-lime);
    color: #000 !important;
}

.menu-toggle { 
    display: none; 
    cursor: pointer;
    flex-direction: column;
}

.menu-toggle .bar {
    width: 35px;
    height: 3px;
    background-color: var(--text-main);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
    display: block;
}

/* Mobile Navigation Menu */
.nav-menu {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--navbar-bg);
    text-align: center;
    list-style: none;
    padding: 20px 0;
    gap: 0;
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-menu li {
    padding: 0;
}

/* ===========================================
   5. HERO SECTION
   =========================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* offset navbar */
    background: radial-gradient(circle at 80% 20%, rgba(216, 255, 67, 0.08), transparent 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.mockup-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.app-screen-main {
    width: 280px;
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(216, 255, 67, 0.1);
    border: 5px solid #111;
}

/* Animación Flotante */
.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ===========================================
   6. FEATURES SECTION
   =========================================== */
.features { padding: 100px 0; background-color: #080C16; }
.icon-box { margin: 0 auto 20px auto; }
.section-title { text-align: center; font-size: 2.8rem; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 60px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.feature-card {
    background-color: var(--card-dark);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid transparent;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    justify-content: center; 
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(216, 255, 67, 0.2);
    background-color: #141C2C;
}

.feature-card .icon-box {
    font-size: 2rem;
    color: var(--accent-lime);
    margin-bottom: 20px;
    background: rgba(216, 255, 67, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.feature-card h3 { font-size: 1.5rem; margin-bottom: 10px; font-weight: 700; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===========================================
   7. PREVIEW SECTION (GALLERY)
   =========================================== */
.preview { padding: 100px 0; text-align: center; }
.section-subtitle { color: var(--text-muted); margin-top: -50px; margin-bottom: 60px; font-size: 1.1rem; }

.screenshot-carousel {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

/* Ocultar barra de scroll en modernos */
.screenshot-carousel::-webkit-scrollbar { display: none; }

.screen-item {
    flex: 0 0 auto;
    width: 200px; /* Un poco más pequeños para mostrar más */
    scroll-snap-align: start;
}

.screen-item img {
    width: 100%;
    border-radius: 15px;
    border: 3px solid #111;
    transition: 0.3s;
}

.screen-item img:hover {
    transform: scale(1.05);
    border-color: var(--accent-lime);
}

/* ===========================================
   8. DOWNLOAD SECTION
   =========================================== */
.download { padding: 100px 0; }
.download-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra los textos y el logo */
    text-align: center;
    background: linear-gradient(135deg, #111827 0%, #050912 100%);
    padding: 60px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Centramos específicamente los botones de descarga */
.download-container .hero-btns {
    justify-content: center; /* Esto alinea los 3 logos al centro */
    width: 100%;
    margin-top: 20px;
}

.download-logo { height: 120px; margin-bottom: 30px; }
.download h2 { font-size: 2.5rem; margin-bottom: 15px; font-weight: 800; }
.download p { color: var(--text-muted); margin-bottom: 40px; font-size: 1.1rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ===========================================
   9. FOOTER
   =========================================== */
footer { padding: 50px 0; background-color: #03060C; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.05); }
footer p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.social-media { color: var(--text-muted); font-size: 1.2rem; transition: 0.3s; padding-left: 15px; padding-right: 15px; }
.social-links { display: flex; justify-content: center; gap: 20px; }
.social-links a { color: var(--text-muted); font-size: 1.2rem; }
.social-links a:hover { color: var(--accent-lime); }

/* ===========================================
   10. RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; padding-top:80px; }
    .hero-content h1 { font-size: 2.3rem; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; padding-bottom: 0px;}
    .hero-image { display: none; }
    .nav-links { display: none; } /* Ocultar para menú móvil */
    .mockup-container { padding-top: 100px; }
    .menu-toggle { display: flex; }
    .app-screen-main { justify-content: center; display: flex; align-items: center; height: 200px; width: 200px; }
    .section-title { margin-top:50px; margin-bottom: 0px; font-size: 1.6rem; } 
    .section-subtitle { margin-top: 0px; } 
    .preview { padding-top: 0px; }
    .download { padding-top: 0px; }
    .features { padding: 0px; }
    .icon-box { margin: 0 auto 20px auto; }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    /* Cuando el menú está abierto */
    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        display: block;
        color: var(--text-muted);
        padding: 15px 20px;
        font-weight: 500;
        transition: 0.3s;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu a:hover {
        color: var(--accent-lime);
        background-color: rgba(216, 255, 67, 0.1);
    }
}

@media (max-width: 768px) {
    .section-title { 
        font-size: 1.6rem; 
    }
    .feature-card { 
        padding: 30px; 
        justify-content: center; 
        text-align: center; 
        position: relative;
    }
    .download-container { 
        padding: 40px 20px; }
    .download h2 { 
        font-size: 1.5rem; 
    }
}

/* ===========================================
   11. CAROUSEL ANIMATIONS
   =========================================== */
/* Contenedor principal */
.screenshot-carousel {
    width: 100%;
    overflow: hidden; /* Esconde lo que sale de los bordes */
    padding: 40px 0;
    position: relative;
    display: flex;
}

/* El carril que se mueve */
.carousel-track {
    display: flex;
    width: calc(250px * 16); /* Ancho de imagen * total de items (8 originales + 8 copias) */
    animation: scroll 30s linear infinite; /* Ajusta los 30s para más o menos velocidad */
}

/* Estilo de cada imagen */
.screen-item {
    width: 250px; /* Ajusta el ancho según prefieras */
    margin: 0 15px;
    flex-shrink: 0;
}

.screen-item img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

/* Pausar al pasar el mouse (opcional, muy útil para el usuario) */
.screenshot-carousel:hover .carousel-track {
    animation-play-state: paused;
}

/* La animación */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Se mueve exactamente la mitad del ancho total del track */
        transform: translateX(calc(-250px * 8 - 30px * 8));
    }
}