@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    image-rendering: pixelated;
}

html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
}

#main-content-wrapper {
    flex-grow: 1; 
    width: 100%;
}

#footer-anchor {
    width: 100%;
    margin-top: 0; 
    flex-shrink: 0; 
}

#quiz-page {
    flex-grow: 1; 
}

/* Pixel Grid Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* CRT Screen Effect */
body::after {
    content: '';
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.05),
        rgba(0, 0, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9998;
    animation: flicker 0.15s infinite;
}

/* Make images responsive by default */
img, .webapp-screenshot { max-width: 100%; height: auto; display: block;}

/* Starfield Background - More Digital */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0; /* place the starfield behind content so it shows across the whole page */
    background: #FFFFFF;
    background-attachment: fixed;
}

.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #38BDF8;
    box-shadow: 0 0 4px #38BDF8, 0 0 8px #38BDF8;
    animation: pixelTwinkle 2s infinite;
}

.star:nth-child(3n) {
    background: #38BDF8;
    box-shadow: 0 0 4px #38BDF8, 0 0 8px #38BDF8;
}

.star:nth-child(5n) {
    background: #38BDF8;
    box-shadow: 0 0 4px #38BDF8, 0 0 8px #38BDF8;
    width: 4px;
    height: 4px;
}

@keyframes pixelTwinkle {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    25% { opacity: 1; transform: scale(0.5); }
}

/* Pixel Art Text Effects */
.neon-cyan {
    color: #0EA5E9;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    display: block !important;
}

.neon {
    color: #99A1AF;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}

.neon-magenta {
    color: #0EA5E9;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}

.neon-yellow {
    color: #000;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
}

.neon-green {
    color: #0EA5E9;
    font-family: 'Inter', sans-serif;
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 40px auto;
    padding: 0 28px;
    box-sizing: border-box;
}

.container-steps {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 10px 10px;
}

/* Estilos para el header-logo-container */
.header-logo-container {
    width: 100%;
    max-width: none;
    margin: 0; 
    padding: 10px 32px; 
    box-sizing: border-box; 
    position: relative; 
    top: 0;
    left: 0;
    z-index: 1000;
}

.logo-header-image {
    width: 175px; 
    height: auto;
    margin-right: 15px; 
    flex-shrink: 0; 
    cursor: pointer;
    
}

/* Hero Section */
.hero {
    position: relative;
}

/* Estructura de dos columnas para el Hero */
.hero-grid {
    display: flex; 
    gap: 60px; 
    align-items: flex-start;
    margin-top: 10px;
    margin-left: 10px;
}

/* Columna Izquierda: Título y CTA */
.hero-content {
    flex: 3;
    max-width: 50%;
    /* min-width: 0; */
    text-align: left;
}

/* Columna Derecha: Preguntas y Respuestas (FAQ) */

.qna-item {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #E5E7EB;
}

.qna-q {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    margin-bottom: 5px;
    line-height: 1.5;
    color: #000; 
}

.qna-a {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: #99A1AF; 
    line-height: 1.6;
    padding-left: 10px; 
}

.hero h1 {
    font-size: clamp(2rem, 3vw, 2.3rem);
    margin-bottom: 30px;
    margin: 0 0 32px;
    line-height: 1;
    display: flex;
    flex-wrap: wrap;
}

.hero h1 span {
    display: block;
}

.hero h1 .part1 {
    color: #0EA5E9;
    font-size: 3.5rem;
}

.hero h1 .part2 {
    color: #000000;
    font-size: 3.5rem;
    margin: 5px 0;
}

.hero h1 .part3 {
    color: #000000;
    font-size: 3.5rem;
}

h1 .part2 {
    color: #000000;
}

h2 .part1 {
    color: #0EA5E9;
}

h2.part2-dudas {
    color: #000000;
    line-height: 1.7;
    margin-top: 30px;
    margin-bottom: 40px;
}

.part2 {
    color: #000000;
}

/* Estilo para la lista de beneficios (ul) */
.info-block-initial ul {
    font-family: 'Inter', sans-serif;
    list-style: none; 
    padding-left: 0;
    margin: 15px 0 0 0;
}

/* Estilo para cada elemento de la lista (li) */
.info-block-initial ul li {
    position: relative;
    padding-left: 0px;
    margin-bottom: 10px;
    color: #000000; 
    font-size: 1em;
}

.hero .subtitle {
    font-size: clamp(0.7rem, 2vw, 1rem);
    margin-bottom: 20px;
    line-height: 1.8;
    color: #000000;
    font-size: 1.3rem;
    text-align: left;
}

.hero p {
    font-family: 'Inter', sans-serif; 
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 0 40px 0;
    line-height: 1.8;
    color: #000000;
    text-align: left;
}

.hero-footer {
    font-size: clamp(0.7rem, 2vw, 1rem);
    margin-top: 100px;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #000000;
    text-align: center;
    padding: 20px 20px 50px;
}

.hero-footer p {
    font-family: 'Inter', sans-serif; 
    font-size: 0.9rem;
    max-width: 100%;
    margin: 0 0 10px 0;
    line-height: 1.8;
    color: #000000;
    text-align: center;
}

/* Movil */

/* Contenedor de los botones CTA */
.cta-buttons-container {
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap; 
    margin-top: 40px; 
}

/* Estilo del Botón Principal  */
.primary-btn-quiz {
    background: #0EA5E9;
    border-color: #0EA5E9;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.3);
    border-radius: 30px;
    line-height: 1.4; 
}

/* Estilo para el Botón Secundario  */
.secondary-btn-app { 
    display: inline-block;
    padding: 20px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-decoration: none;
    color: #0EA5E9;
    background: #E5E7EB;
    border: 2px solid #0EA5E9;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
}

.secondary-btn-app:hover {
    background: #38BDF8;
    color: #FFFFFF;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
    transform: translate(-2px, -2px); 
}

/* ESTILOS PARA LA SECCIÓN DEL MÓVIL Y WEBAPP */

.webapp-promo-container {
    flex: 2;
    text-align: center;
    position: relative;
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
    z-index: 5;
}

.mobile-frame {
    width: min(250px, 80vw);
    max-width: 100%;
    margin: 0 auto;
    border: 10px solid #050505;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    background-color: #FFFFFF;
    box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.25), 
                0 0 15px rgba(14, 165, 233, 0.1);
    aspect-ratio: 9 / 19;
    box-sizing: border-box;
    transform-origin: center center;
}

.mobile-frame::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background: #050505;
    border-radius: 20px;
    z-index: 10;
}

.mobile-frame::after {
    content: "";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    z-index: 10;
}

.webapp-screenshot {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; 
    border-radius: 28px;
}

.mobile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0; 
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.mobile-frame:hover .mobile-overlay {
    opacity: 1; 
}

.overlay-text {
    color: #000000;
    font-size: 1rem;
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.3);
    text-align: center !important;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

.overlay-btn {
    background: #000;
    border-color: #000;
    box-shadow: 0 0 10px rgba(254, 154, 0, 0.3);
    padding: 5px 15px;
    font-size: 0.6rem;
}

.overlay-btn:hover {
    background: #000;
    box-shadow: 0 0 20px rgba(254, 154, 0, 0.3);
}

.download-text {
    position: absolute;
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #FE9A00;
    text-shadow: 2px 2px 0px #fff;
    transform: rotate(-10deg); 
    bottom: -30px; 
    right: -20px; 
    z-index: 20;
    pointer-events: none;
}

/* Terminal-Style Buttons with Pixel Art */
.btn {
    display: inline-block;
    padding: 20px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    text-decoration: none;
    color: #FFFFFF;
    background: #0EA5E9;
    border: 1px solid #FFFFFF;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
    text-align: center;
}

.btn-footer  {
    display: inline-block;
    padding: 20px 40px;
    font-family: 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
    color: #FFFFFF;
    background: #38BDF8;
    border: 1px solid #FFFFFF;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.1s;
    position: relative;
    text-transform: uppercase;
    text-align: center;
}

.btn:hover {
    background: #38BDF8;
    color: #FFFFFF;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    transform: translate(-2px, -2px);
}

.btn:active {
    transform: translate(4px, 4px);
}

/* Terminal Window Cards */
.section-title-cards {
    text-align: center;
    font-size: clamp(1.5rem, 1.3vw, 2rem);
    margin: 60px 0 40px;
    padding: 20px;
    width: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1.6;
    overflow: visible;
    text-overflow: clip;
}

.section-title-cards::before,
.section-title-cards::after {
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #99A1AF; 
}

.section-title-cards::before {
    left: 12px;
}

.section-title-cards::after {
    right: 12px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 0 0;
}

.card {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    border: 6px solid #0EA5E9;
    padding: 30px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

/* Terminal Header Bar */
.card::before {
    content: 'SYSTEM.EXE';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background: #0EA5E9;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.card::after {
    content: '■ ■ ■';
    position: absolute;
    top: -30px;
    right: 10px;
    color: #FFFFFF;
    font-size: 0.8rem;
    line-height: 30px;
}

.card:hover {
    border-color: #38BDF8;
    transform: translate(-4px, -4px);
}

.card:hover::before {
    background: #38BDF8;
}

.card:nth-child(2) {
    border-color: #38BDF8;
    margin-top: 30px;
}

.card:nth-child(2)::before {
    background: #38BDF8;
}

.card:nth-child(2):hover {
    border-color: #0EA5E9;
}

.card:nth-child(2):hover::before {
    background: #0EA5E9;
}

.card:nth-child(3) {
    border-color: #000;
    margin-top: 30px;
}

.card:nth-child(3)::before {
    background: #000;
}

.card:nth-child(3):hover {
    border-color: #0EA5E9;
}

.card:nth-child(3):hover::before {
    background: #0EA5E9;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px currentColor);
}

.card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #000000;
}

/* Section Titles with Pixel Border */
.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 1.3vw, 2rem);
    margin: 60px 0 40px;
    padding: 20px;
    width: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1.6;
    overflow: visible;
    text-overflow: clip;
}

.section-title::before,
.section-title::after {
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #99A1AF; 
}

.section-title::before {
    left: 12px;
}

.section-title::after {
    right: 12px;
}

.section-title-footer {
    text-align: center;
    font-size: clamp(1.5rem, 1.3vw, 2rem);
    margin: 60px 0 10px;
    padding: 20px;
    width: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1.6;
    overflow: visible;
    text-overflow: clip;
}

/* Steps - Game Level Style */
.steps {
    max-width: 900px;
    margin: 0 auto;
}

.step {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    border: 6px solid #0EA5E9;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    transition: all 0.2s;
}

.step::before {
    content: 'LEVEL';
    position: absolute;
    top: -18px;
    left: 20px;
    background: #0EA5E9;
    color: #FFFFFF;
    padding: 2px 10px;
    font-family: 'Inter', sans-serif;
    font-size: 0.5rem;
}

.step:hover {
    transform: translate(-3px, -3px);
}

.step-number {
    font-family: 'Inter', sans-serif;
    font-size: 3rem;
    min-width: 100px;
    text-align: center;
}

.step-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.step-content p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #000000;
    line-height: 1.8;
}

.step-check {
    margin-left: auto;
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px currentColor);
}

/* Stats - Arcade Score Display */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    border: 6px solid #0EA5E9;
    padding: 30px;
    text-align: center;
    position: relative;
}

.stat::before {
    content: 'SCORE';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: #0EA5E9;
    color: #FFFFFF;
    padding: 2px 15px;
    font-family: 'Inter', sans-serif;
    font-size: 0.5rem;
}

.stat:hover {
    transform: translate(-2px, -2px);
}

.stat:nth-child(2) {
    border-color: #38BDF8;
}

.stat:nth-child(2)::before {
    background: #38BDF8;
}

.stat:nth-child(3) {
    border-color: #000;
}

.stat:nth-child(3)::before {
    background: #000;
}

.stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #000000;
    text-transform: uppercase;
}

/* Dark Section - Deep Space */
.dark-section {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 50%, #FFFFFF 100%);
    padding: 36px 18px;
    margin: 180px 40px;
    border-top: 4px solid #0EA5E9;
    border-bottom: 4px solid #0EA5E9;
    font-size: 1rem;
}

.qna-a {
    margin-bottom: 20px;
    font-size: 1rem;
}

.qna-q {
    font-size: 1rem;
}

/* Footer - Terminal Style */
footer {
    width: 100%;
    text-align: left;
    padding: 30px 0px;
    border-top: 6px solid #000;
    background: #F9FAFB;
    position: relative;
}

footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #000;
}

.footer-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    gap: 40px;
}
.footer-right a {
    color: #000;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}
.footer-right span {
    color: #000;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-check {
        margin-left: 0;
    }
    
    .btn::before,
    .btn::after {
        display: none;
    }
    
    .card {
        margin-top: 40px !important;
    }
    
    .step-number {
        font-size: 2rem;
    }

    .cta-buttons-container {
        justify-content: center; 
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%; 
        margin-bottom: 0;
    }

    .btn-footer {
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-frame {
        max-width: 200px; 
    }

    .download-text {
        position: static;
        transform: none;
        margin-top: 20px;
    }

    .header-logo-container {
        padding: 15px 20px;
    }
    
    .nav-container {
        flex-direction: column; 
        align-items: flex-start; 
    }

    .logo-header-image {
        width: 50px; 
        margin-right: 0;
        margin-bottom: 5px; 
    }

    .header-title {
        font-size: 1.2rem; 
        white-space: normal;
    }
}

/* ========= Mobile / Small devices improvements (mobile-first enhancements) ========= */
@media (max-width: 1024px) {
    .container { margin: 40px auto; padding: 0 28px; max-width: 1180px; }
    .header-logo-container { padding: 10px 20px; }
    .logo-header-image { width: 160px; }
    .header-title { font-size: 1.05rem; left: 5%; }
}

@media (max-width: 768px) {
    .container { margin: 24px auto; padding: 0 16px; box-sizing: border-box; }
    .logo-header-image { width: 130px; }
    .header-title { margin: 18px 0 12px; left: 0; font-size: 0.95rem; }

    /* Hero becomes stacked on mobile */
    .hero-grid { flex-direction: column; align-items: flex-start; gap: 18px; margin-left: 0; width: 100%; }
    .hero-content { text-align: left; width: 100%; padding: 0; box-sizing: border-box; }
    
    /* H1 breaks into 3 specific lines */
    .hero h1 { 
        font-size: clamp(1.5rem, 5vw, 3rem); 
        width: 100%;
        display: block;
        white-space: normal;
        margin: 0 0 16px 0;
    }
    .hero h1 span { 
        display: block; 
        width: 100%;
        max-width: 100%;
    }
    .hero h1 .part1, .hero h1 .part2, .hero h1 .part3 { font-size: clamp(1.5rem, 4vw, 1.4rem); }

    /* Subtitle and ul occupy full width */
    .hero .subtitle { 
        text-align: left; 
        margin-left: 0; 
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .info-block-initial ul {
        width: 100%;
        max-width: 100%;
    }
    
    .info-block-initial ul li {
        width: 100%;
        max-width: 100%;
    }

    /* CTA buttons expand full width */
    .cta-buttons-container { flex-direction: column; gap: 12px; align-items: center; }
    .cta-buttons-container .btn, .cta-buttons-container .secondary-btn-app .primary-btn-quiz{ width: 100%; max-width: 420px; }

    /* Reduce starfield intensity on smaller screens (performance) */
    .star { width: 2px; height: 2px; box-shadow: none; }
    .star:nth-child(5n) { width: 3px; height: 3px; }
}

/* FAQ / Dudas fixes */
.container-dudas {
    box-sizing: border-box;
}

.qna-item {
    max-width: 100%;
    box-sizing: border-box;
}

.qna-a {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.dark-section {
    overflow: visible; 
}

@media (max-width: 480px) {
    .container { margin: 18px 12px; }
    .logo-header-image { width: 130px; }
    .header-title { margin: 10px 0; font-size: 0.9rem; }

    /* Botones  */
    .btn, .btn-footer, .final-btn, .overlay-btn { padding: 20px 24px; font-size: 1.2rem; text-align: center; }
    
    .text-input, .text-input-select { padding: 10px 12px; font-size: 0.95rem; }
    body::after, body::before { display: none; }
    .starfield { opacity: 0.85; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 1rem; }
    .hero h1 .part1, .hero h1 .part2, .hero h1 .part3 { font-size: 1rem; }
    .hero-content { max-width: 100%; padding: 0; }
}

@media (max-width: 480px) {
    .container { margin: 18px auto; padding: 0 24px; box-sizing: border-box; }
    .hero-grid { flex-direction: column; align-items: flex-start; gap: 18px; margin-left: 0; width: 100%; }
    .hero-content { text-align: left; width: 100%; padding: 0; box-sizing: border-box; }
    
    .hero h1 { 
        font-size: 1rem; 
        width: 100%;
        display: block;
        white-space: normal;
        margin: 0 0 14px 0;
    }
    .hero h1 span { 
        display: block; 
        width: 100%;
        max-width: 100%;
    }
    .hero h1 .part1, .hero h1 .part2, .hero h1 .part3 { font-size: 1rem; }

    /* Subtitle and ul occupy full width */
    .hero .subtitle { 
        font-size: 0.9rem; 
        text-align: left; 
        margin-left: 0; 
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .info-block-initial ul {
        width: 100%;
        max-width: 100%;
    }
    
    .info-block-initial ul li {
        width: 100%;
        max-width: 100%;
    }

    /*  Evitar que el texto de descarga girado se superponga al contenido */
    .download-text { display: none; }

    /*  CTA y botones fáciles de pulsar */
    .cta-buttons-container { gap: 12px; flex-direction: column; align-items: center; }
    .cta-buttons-container .btn, .cta-buttons-container .secondary-btn-app { width: auto; max-width: calc(100% - 40px); padding-left: 24px; padding-right: 24px; text-align: center; }

    /*  Reducir ligeramente el ancho del borde de la tarjeta en pantallas pequeñas */
    .card, .step, .stat { border-width: 4px; padding: 18px; }

    /* reducir los márgenes y el padding de la sección oscura */
    .dark-section {
        margin: 158px 0px;
        padding: 18px 12px;
    }
    .container-steps .section-title { text-align: center; font-size: 1rem; margin: 42px 0 10px 0;}
    .section-title-cards { text-align: center; font-size: 1.3rem; margin: 152px 0 10px 0;}
    .section-title { text-align: center; font-size: 1.3rem; margin: 152px 0px 0px 0px; padding: 0;}
    .hero-footer .section-title { text-align: center; font-size: 1rem; margin: 152px 0 10px 0;}
    .hero-footer p { text-align: center; margin: 0; }
}

@media (max-width: 480px) {
    .star { width: 1px; height: 1px; box-shadow: none; }
    .star:nth-child(5n) { width: 2px; height: 2px; }
}

/* Ajustar el hero-footer y otras secciones con mucho padding en pantallas más pequeñas */
@media (max-width: 1024px) { .hero-footer { padding: 20px 60px; } }

@media (max-width: 768px) {.hero-footer { padding: 18px 30px 36px; }}

@media (max-width: 480px) {.hero-footer { padding: 12px 18px 24px; }}

/* Optimizaciones específicas para iPhone (375px-480px: SE, 11, 12, 13, 14, 14 Pro Max) */
@media (min-width: 375px) and (max-width: 480px) {
    .container { margin: 16px auto; padding: 0 20px; box-sizing: border-box; }
    
    .hero-grid { flex-direction: column; align-items: flex-start; gap: 16px; margin-left: 0; width: 100%; }
    .hero-content { text-align: left; width: 100%; padding: 0; box-sizing: border-box; }
    
    /*  Tamaño del titulo para iPhones */
    .hero h1 { 
        font-size: 2rem; 
        width: 100%;
        display: block;
        white-space: normal;
        margin: 0 0 14px 0;
    }
    .hero h1 span { 
        display: block; 
        width: 100%;
        max-width: 100%;
    }
    .hero h1 .part1, .hero h1 .part2, .hero h1 .part3 { font-size: 2rem; }
    
    .hero .subtitle { 
        font-size: 1.2rem;
        text-align: left;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
        margin-bottom: 16px;
    }
    .hero p { font-size: 1rem; margin: 0 0 24px 0; }
    
    /*  Botones compactos en iPhones */
    .cta-buttons-container { gap: 10px; margin-top: 24px; flex-direction: column; align-items: center; padding: 10px;}
    .cta-buttons-container  .btn .secondary-btn-app { max-width: 100px; width: auto; padding-left: 20px; padding-right: 20px; text-align: center; }   

    .mobile-frame { max-width: 180px; } 
    .webapp-promo-container { margin-top: 40px; }
    
    /*  Bloques de información y listas */
    .info-block-initial ul li { margin-bottom: 8px; font-size: 0.95rem; }
    
    /*  Tamaño reducido de tarjetas */
    .card { padding: 20px; margin-top: 20px !important; }
    .card-icon { font-size: 3rem; margin-bottom: 12px; }
    .card h3 { font-size: 0.85rem; margin-bottom: 12px; }
    
    /*  Pasos y estadísticas */
    .step { padding: 18px; gap: 16px; }
    .step-number { font-size: 2.2rem; min-width: 70px; }
    .stat { padding: 20px; }
    
    /*  Espaciado de sección */
    .section-title { font-size: 1.2rem; margin: 32px 0 24px;}
    .section-title::before, .section-title::after { font-size: 0.8rem; left: -20px; right: -20px; }
    
    /*  Sección oscura FAQ  */
    .dark-section { margin: 32px 14px; padding: 20px 12px; box-sizing: border-box; overflow-x: hidden; width: 100%; }
    .container-dudas { margin: 0; width: 100%; box-sizing: border-box; }
    .part2-dudas { font-size: 0.8rem; line-height: 1.5; margin-top: 16px; margin-bottom: 10px; word-break: break-word; overflow-wrap: break-word; }
    .qna-item { margin: 0; width: 100%; box-sizing: border-box; overflow: hidden; }
    .qna-q { font-size: 0.7rem; margin-bottom: 10px; margin-top: 10px; word-break: break-word; overflow-wrap: break-word; }
    .qna-a { font-size: 0.6rem; padding: 0; margin: 0; word-break: break-word; overflow-wrap: break-word; white-space: normal; }
    
    /*  Footer   */
    footer { padding: 28px 16px; text-align: left;}
    .footer-content-wrapper { padding: 0 12px; text-align: left;}
    footer p, .footer-right a, .footer-right span { font-size: 0.8rem; text-align: left;}
}

/* Pantallas muy pequeñas  */
@media (max-width: 360px) {
    .container { margin: 12px auto; padding: 0 16px; box-sizing: border-box; }

    .hero-grid { flex-direction: column; align-items: flex-start; gap: 16px; margin-left: 0; width: 100%; }
    .hero-content { text-align: left; width: 100%; padding: 0; box-sizing: border-box; }
    
    .hero h1 { 
        font-size: 1rem; 
        width: 100%;
        display: block;
        white-space: normal;
        margin: 0 0 12px 0;
    }
    .hero h1 span { 
        display: block; 
        width: 100%;
        max-width: 100%;
    }
    .hero h1 .part1, .hero h1 .part2, .hero h1 .part3 { font-size: 1rem; }
    
    .hero .subtitle { 
        text-align: left;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }

    .webapp-promo-container { margin-top: 50px; }
    
    /* reducir los márgenes y el padding de la sección oscura para evitar que el contenido se escape */
    .dark-section {
        margin: 158px 0px;
        padding: 18px 12px;
    }
    .container-steps .section-title { text-align: center; font-size: 0.8rem; margin: 42px 0 10px 0;}
    .section-title-cards { text-align: center; font-size: 0.9rem; margin: 152px 0 10px 0;}
    .section-title { text-align: center; font-size: 0.6rem; margin: 152px 0px 0px 0px; padding: 0;}
    .hero-footer .section-title { text-align: center; font-size: 0.9rem; margin: 152px 0 10px 0;}
    .hero-footer p { text-align: center; margin: 0; }

    .info-block-initial ul {
        width: 100%;
        max-width: 100%;
    }
    
    .info-block-initial ul li {
        width: 100%;
        max-width: 100%;
    }

    /* Encabezado de FAQ - evitar grandes márgenes superior/inferior */
    /* .container-dudas { padding: 0 12px 6px; } */
    .part2-dudas { font-size: 0.6rem; text-align: left; display: block; }

    /* Asegurar que los elementos qna se envuelvan y no desborden */
    .qna-item { display: block; width: 100%; box-sizing: border-box; }
    .qna-q { font-size: 0.6rem; margin-bottom: 10px; }
    .qna-a { font-size: 0.6rem; padding-left: 0; padding-right: 0; overflow-wrap: break-word; word-break: break-word; }

    /* Reducir grandes paddings fijos de las áreas CTA */
    .cta-buttons-container { margin-top: 18px; gap: 10px; flex-direction: column; align-items: center; }
    .btn, .btn-footer { padding: 12px 16px; font-size: 0.72rem; text-align: center; }
    .cta-buttons-container .btn { max-width: calc(100% - 32px); width: auto; padding-left: 16px; padding-right: 16px; text-align: center; }
}

@media (max-width: 768px) {
    .cta-buttons-container .primary-btn-quiz,
    .cta-buttons-container .secondary-btn-app 
     {
        width: 100%;
        max-width: 280px;
        height: 52px;
        font-size: 1rem;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 0;
        box-sizing: border-box;
    }
    
    footer {
        padding: 28px 16px;
        
    }

    .footer-content-wrapper {
        display: flex;
        flex-direction: column; 
        align-items: center;
        gap: 16px;
        text-align: center;
    }

    .footer-left,
    .footer-center,
    .footer-right 
    .footer-right span {
        width: 100%;
        display: flex;
        justify-content: center;
        text-align: center;
    }
}
