/* ===== VERSIÓN MEJORADA RESPONSIVE 2025 ===== */

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

:root {
    /* Variables CSS para mejor mantenimiento */
    --primary-blue: #74b9ff;
    --primary-green: #00b894;
    --container-max: 1200px;
    --border-radius: 20px;
    --transition: all 0.3s ease;
    
    /* Typography scale responsive */
    --font-xs: clamp(0.75rem, 1vw, 0.875rem);
    --font-sm: clamp(0.875rem, 1.5vw, 1rem);
    --font-base: clamp(1rem, 2vw, 1.125rem);
    --font-lg: clamp(1.125rem, 2.5vw, 1.25rem);
    --font-xl: clamp(1.25rem, 3vw, 1.5rem);
    --font-2xl: clamp(1.5rem, 4vw, 2rem);
    --font-3xl: clamp(2rem, 5vw, 2.5rem);
    --font-4xl: clamp(2.5rem, 6vw, 4rem);
}

/* ===== BASE STYLES (Mobile First) ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    font-size: var(--font-base);
    line-height: 1.6;
}

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    z-index: -1;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem; /* Mobile: 16px */
}

/* ===== HEADER RESPONSIVE ===== */
header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: var(--font-xl);
    font-weight: 800;
    color: white;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* ===== MENÚ HAMBURGUESA PARA MOBILE ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: var(--font-sm);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 4rem 0;
    color: white;
}

.hero h1 {
    font-size: var(--font-4xl);
    font-weight: 900;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: var(--font-lg);
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--primary-green);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: var(--font-base);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 184, 148, 0.4);
    animation: fadeInUp 1s ease 0.4s both;
    touch-action: manipulation; /* Mejor para móviles */
}

.cta-button:hover {
    transform: translateY(-3px);
    background: #00a085;
    box-shadow: 0 15px 40px rgba(0, 184, 148, 0.6);
}

/* ===== HERO PILLS (RESPONSIVE) ===== */
.hero-pills {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-pill {
    background: rgba(255,255,255,0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-weight: 600;
    font-size: var(--font-sm);
    white-space: nowrap;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: var(--font-3xl);
    font-weight: 800;
    color: white;
    margin-bottom: 3rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* ===== CARDS GRID (MEJORADO) ===== */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 columna */
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: #333;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.card-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg);
    color: white;
    font-weight: 800;
    flex-shrink: 0;
}

.card-title {
    font-size: var(--font-lg);
    font-weight: 700;
    color: #333;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    color: #666;
    font-size: var(--font-sm);
}

/* ===== OFFER LIST ===== */
.offer-list {
    list-style: none;
    margin: 1rem 0;
}

.offer-list li {
    color: #333;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.offer-list li span:first-child {
    flex: 1;
    font-size: var(--font-sm);
}

.offer-discount {
    background: var(--primary-blue);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: var(--font-xs);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== BANK CARDS ===== */
.bank-cards {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 columna */
    gap: 1rem;
    margin-top: 2rem;
}

.bank-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.bank-logo {
    width: 60px;
    height: 40px;
    background: var(--primary-blue);
    border-radius: 8px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: var(--font-sm);
}

.bank-card h3 {
    font-size: var(--font-base);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.bank-card p {
    font-size: var(--font-sm);
    color: #666;
    line-height: 1.5;
}

/* ===== STATS MEJORADAS ===== */
.stats {
    padding: 4rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 columna */
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255,255,255,0.95);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid var(--primary-green);
}

/* ===== FOOTER ===== */
footer {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 3rem 0;
    text-align: center;
    backdrop-filter: blur(10px);
}

footer p {
    font-size: var(--font-sm);
    margin-bottom: 0.5rem;
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.hidden { display: none; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== BREAKPOINTS MODERNOS 2025 ===== */

/* Small phones: 375px+ */
@media (min-width: 23.4375em) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-pills {
        gap: 1.25rem;
    }
}

/* Large phones: 480px+ */
@media (min-width: 30em) {
    .container {
        padding: 0 2rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    
    .bank-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
    }
}

/* Tablets: 768px+ */
@media (min-width: 48em) {
    .hamburger {
        display: none;
    }
    
    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        background: transparent;
        gap: 2rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .card-icon {
        width: 3.75rem;
        height: 3.75rem;
    }
}

/* Small desktop: 1024px+ */
@media (min-width: 64em) {
    .container {
        padding: 0 3rem;
    }
    
    .hero {
        padding: 8rem 0;
    }
    
    .section {
        padding: 6rem 0;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 3rem;
    }
    
    .nav-links {
        gap: 2.5rem;
    }
}

/* Large desktop: 1280px+ */
@media (min-width: 80em) {
    .section {
        padding: 8rem 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Ultra-wide: 1440px+ */
@media (min-width: 90em) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ===== MOBILE NAVIGATION ===== */
@media (max-width: 47.9375em) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 99;
        border-left: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        color: #333;
        font-size: var(--font-lg);
        padding: 1rem 2rem;
        border-radius: 12px;
        width: 80%;
        text-align: center;
    }
    
    .nav-links a:hover {
        background: rgba(116, 185, 255, 0.1);
        color: var(--primary-blue);
        transform: none;
    }
    
    /* Overlay para cerrar menú */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 98;
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ===== ACCESIBILIDAD Y PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #333;
    }
    
    .cta-button {
        border: 2px solid white;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background: rgba(30, 30, 30, 0.95);
        color: #f0f0f0;
    }
    
    .card-title {
        color: #f0f0f0;
    }
    
    .offer-list li {
        color: #e0e0e0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}