:root {
    --bg-color: #050505;
    --surface-color: #111111;
    --primary-color: #ff0033;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    /* Evitamos overflow-x en el body que puede dar problemas en iOS */
}

/* Contenedor principal para evitar desbordamiento horizontal global de forma segura */
.main-wrapper {
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4 {
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.red-accent { color: var(--primary-color); }

/* HERO COMPACTO Y MODERNO */
.modern-hero {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 70vh; /* Taller hero */
    min-height: 450px;
    max-height: 600px;
    overflow: hidden;
}

.hero-image-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.parallax-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05); /* Slight zoom for modern feel */
}

.hero-gradient-overlay {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, var(--bg-color) 0%, rgba(5,5,5,0.8) 40%, transparent 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    margin-top: auto;
    padding: 2rem 1.5rem 3rem 1.5rem;
    text-align: center;
}

.glass-panel {
    background: transparent;
    border-bottom: none;
}

.tags {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.badge {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.neon-badge {
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.5);
}

.badge.outline {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 3.5rem;
    line-height: 0.9;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.hero-specs {
    font-size: 0.95rem;
    color: #ddd;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.pulse-btn {
    margin: 0.5rem auto 0 auto;
    padding: 1rem 1.8rem;
    border-radius: 30px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-weight: 800;
    font-family: var(--font-main);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(255, 0, 51, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;
    display: block;
}
.pulse-btn:active {
    transform: scale(0.96);
}

/* SECTIONS */
section {
    padding: 2.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* GALLERY SCROLL NATIVO */
.swipe-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.swipe-gallery::-webkit-scrollbar { display: none; }

.swipe-gallery img {
    scroll-snap-align: center;
    width: 85vw;
    height: 60vw;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* CARDS GLASSMORPHISM */
.grid-cards {
    display: grid;
    grid-template-columns: 1fr; /* 1 columna en móvil para que sean más grandes */
    gap: 1.2rem;
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
    display: inline-block;
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

.glass-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.glass-card p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
}

/* TIMELINE */
.timeline {
    position: relative;
    margin-left: 10px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), #333);
}
.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
    text-align: left;
}
.timeline-item:last-child {
    padding-bottom: 0;
}
.dot {
    position: absolute;
    left: -6px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin: 0;
}
.dot.green { background: #00ff88; box-shadow: 0 0 10px rgba(0,255,136,0.3); }
.dot.yellow { background: #ffaa00; box-shadow: 0 0 10px rgba(255,170,0,0.3); }

.timeline-item h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.timeline-item p { font-size: 0.85rem; color: var(--text-secondary); max-width: 100%; }

/* FUN SECTION SCROLL (FIX CUTOFF) */
.scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem; 
}
.scroll-container::-webkit-scrollbar { display: none; }

.snap-card {
    scroll-snap-align: center;
    flex: 0 0 85vw;
    background: linear-gradient(to bottom right, #1a1a1a, #0a0a0a);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.spacer {
    flex: 0 0 0.5rem; /* El gap es de 1rem, sumado a 0.5rem da un espaciado visual de 1.5rem */
}

.snap-card.hack { border-top: 4px solid #00ffcc; }
.snap-card.truco { border-top: 4px solid #ff00ff; }
.snap-card.cuidado { border-top: 4px solid #ffaa00; }
.snap-card.curiosidad { border-top: 4px solid var(--primary-color); }
.snap-card.feature { border-top: 4px solid #0088ff; }

.card-badge {
    position: static;
    display: inline-block;
    align-self: center;
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.hack .card-badge { background: #00ffcc; color: #000; }
.truco .card-badge { background: #ff00ff; color: #fff; }
.cuidado .card-badge { background: #ffaa00; color: #000; }
.curiosidad .card-badge { background: var(--primary-color); color: #fff; }
.feature .card-badge { background: #0088ff; color: #fff; }

.snap-card h3 { font-size: 1.3rem; margin: 1.5rem 0 0.8rem; }
.snap-card p { font-size: 1rem; color: #ccc; line-height: 1.6; }

/* MODAL TUTORIAL */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    height: 100dvh;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: flex-end; /* Align to bottom for mobile */
}

.modal-content {
    background: #151515;
    width: 100%;
    max-height: 85vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 2rem 1.5rem;
    position: relative;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
    border-top: 2px solid var(--primary-color);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.modal-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #333;
}

.modal-body h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.modal-body ul, .modal-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #ddd;
}

.modal-body li {
    margin-bottom: 0.8rem;
}

/* VISUAL TUTORIAL ESTILOS (REDISEÑADO) */
.visual-tutorial .step-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    border-left: 4px solid var(--primary-color);
    flex-direction: column;
}

@media (min-width: 600px) {
    .visual-tutorial .step-card {
        flex-direction: row;
    }
}

.visual-tutorial .step-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.visual-tutorial .step-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: #fff;
}

.visual-tutorial .step-desc {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    line-height: 1.5;
}

.visual-tutorial .highlight-text {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.visual-tutorial .green-step {
    border-left-color: #00ff88;
}

.warning-box {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.3);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    color: #ffcc00;
    margin-top: 1rem;
}

/* CLEAN LIST (NO MORE WRAPPING BUGS) */
.clean-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.li-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    line-height: 1.2;
}

.li-text {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.5;
}

/* ENLACES Y BOTONES */
.links-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.link-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.08);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.link-btn:hover {
    background: rgba(255,255,255,0.15);
}

.link-btn.primary-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.outline-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 1rem 1.8rem;
    border-radius: 30px;
    color: white;
    font-weight: 800;
    font-family: var(--font-main);
    text-transform: uppercase;
    font-size: 0.9rem;
    text-decoration: none;
    display: block;
    margin-top: 0.5rem;
    transition: border-color 0.2s;
}

.outline-btn:hover {
    border-color: white;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s;
}
.card-link:hover { background: rgba(255,255,255,0.2); }

/* ANIMACIONES SCROLL */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-up.visible, .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggering delays para tarjetas continuas */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* MEDIA QUERIES (TABLET/DESKTOP) */
@media (min-width: 768px) {
    .grid-cards { grid-template-columns: repeat(2, 1fr); }
    section { padding: 4rem; }
    .hero-image-wrapper { height: 50vh; }
    .hero-title { font-size: 4rem; }
    .swipe-gallery img { width: 40vw; height: 30vw; }
    .snap-card { flex: 0 0 40vw; }
    
    .modal-overlay { align-items: center; }
    .modal-content {
        width: 600px;
        border-radius: 20px;
        max-height: 80vh;
        border: 1px solid #333;
    }
}
