/* ==========================================================================
   DISEÑO SYSTEM: MATERIAL YOU (MATERIAL DESIGN 3) - VARIABLES & TOKENS
   ========================================================================== */

:root {
    /* Fuentes */
    --font-brand: 'Outfit', sans-serif;
    --font-plain: 'Inter', sans-serif;
    
    /* Curvas de animación oficiales de Material 3 (M3) */
    --easing-standard: cubic-bezier(0.2, 0, 0, 1);
    --easing-emphasized: cubic-bezier(0.2, 0.8, 0.2, 1);
    --easing-decelerate: cubic-bezier(0, 0, 0, 1);
    --transition-speed: 0.4s;

    /* Sombreado de Elevación Premium */
    --elevation-1: 0px 1px 3px 1px rgba(0, 0, 0, 0.08), 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
    --elevation-2: 0px 2px 6px 2px rgba(0, 0, 0, 0.08), 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
    --elevation-3: 0px 4px 12px 3px rgba(0, 0, 0, 0.08), 0px 1px 3px 0px rgba(0, 0, 0, 0.15);
    --elevation-4: 0px 8px 24px 6px rgba(0, 0, 0, 0.08), 0px 2px 6px 0px rgba(0, 0, 0, 0.15);
    
    /* Bordes Redondeados Estilo M3 */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-xxl: 28px;
    --radius-full: 100px;
}

/* PALETA DE COLORES: TEMA CLARO (Material You - Semilla Verde Finanzas #006e3d) */
.light-theme {
    /* Tonos Primarios: Acento principal para botones y branding */
    --md-sys-color-primary: #006e3d;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #b3f6c8;
    --md-sys-color-on-primary-container: #00210e;
    
    /* Tonos Secundarios: Menor contraste, para elementos complementarios */
    --md-sys-color-secondary: #4f6354;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #d2e8d5;
    --md-sys-color-on-secondary-container: #0c1f13;
    
    /* Tonos Terciarios: Para contrastar y resaltar palabras clave / alertas */
    --md-sys-color-tertiary: #3a656e;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-tertiary-container: #beeaf2;
    --md-sys-color-on-tertiary-container: #001f24;
    
    /* Tonos de Error: Avisos y eliminaciones */
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-on-error: #ffffff;
    --md-sys-color-error-container: #ffdad6;
    --md-sys-color-on-error-container: #410002;
    
    /* Superficies: Sin usar blanco puro (#ffffff). Matices pastel hueso-oliva */
    --md-sys-color-background: #f6fbf4;
    --md-sys-color-on-background: #191c19;
    --md-sys-color-surface: #f6fbf4;
    --md-sys-color-on-surface: #191c19;
    --md-sys-color-surface-variant: #e0e5dd;
    --md-sys-color-on-surface-variant: #434943;
    
    --md-sys-color-outline: #737973;
    --md-sys-color-outline-variant: #c3c8c1;
    
    --md-sys-color-inverse-surface: #2e312e;
    --md-sys-color-inverse-on-surface: #eff1eb;
    
    --theme-shadow-opacity: 0.04;
    --gradient-hero: radial-gradient(circle at 80% 20%, #e8f7ec 0%, #f6fbf4 100%);
    --glass-bg: rgba(246, 251, 244, 0.75);
    --glass-border: rgba(0, 110, 61, 0.05);
}

/* PALETA DE COLORES: TEMA OSCURO (Material You - Noche Verde Esmeralda) */
.dark-theme {
    /* Tonos Primarios */
    --md-sys-color-primary: #95d8ab;
    --md-sys-color-on-primary: #00391c;
    --md-sys-color-primary-container: #00532c;
    --md-sys-color-on-primary-container: #b3f6c8;
    
    /* Tonos Secundarios */
    --md-sys-color-secondary: #b6ccba;
    --md-sys-color-on-secondary: #223527;
    --md-sys-color-secondary-container: #384b3d;
    --md-sys-color-on-secondary-container: #d2e8d5;
    
    /* Tonos Terciarios */
    --md-sys-color-tertiary: #a2ced6;
    --md-sys-color-on-tertiary: #00363d;
    --md-sys-color-tertiary-container: #1f4d54;
    --md-sys-color-on-tertiary-container: #beeaf2;
    
    /* Tonos de Error */
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-on-error-container: #ffdad6;
    
    /* Superficies: Sin usar negro puro (#000000). Matices oliva de baja luminancia */
    --md-sys-color-background: #0f1511;
    --md-sys-color-on-background: #e1e3de;
    --md-sys-color-surface: #0f1511;
    --md-sys-color-on-surface: #e1e3de;
    --md-sys-color-surface-variant: #434943;
    --md-sys-color-on-surface-variant: #c3c8c1;
    
    --md-sys-color-outline: #8d938c;
    --md-sys-color-outline-variant: #434943;
    
    --md-sys-color-inverse-surface: #e1e3de;
    --md-sys-color-inverse-on-surface: #191c19;
    
    --theme-shadow-opacity: 0.15;
    --gradient-hero: radial-gradient(circle at 80% 20%, #15241b 0%, #0f1511 100%);
    --glass-bg: rgba(15, 21, 17, 0.75);
    --glass-border: rgba(149, 216, 171, 0.06);
}

/* ==========================================================================
   RESET & ESTILOS BASE
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-plain);
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    transition: background-color var(--transition-speed) var(--easing-standard), 
                color var(--transition-speed) var(--easing-standard);
    overflow-x: hidden;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-brand);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--md-sys-color-on-background);
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.section-header .section-subtitle,
.section-header p,
.text-center {
    text-align: center;
}

/* Clases de Resaltado Visual Inteligente (Para Guiar el Ojo del Usuario) */
.highlight-text {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

.highlight-tertiary {
    color: var(--md-sys-color-tertiary);
    font-weight: 700;
}

.badge-highlight {
    background-color: var(--md-sys-color-tertiary-container);
    color: var(--md-sys-color-on-tertiary-container);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* ==========================================================================
   ROBUSTEZ Y SOLUCIÓN DE RENDIMIENTO DE ICONOS (SVG INTEGRADOS)
   ========================================================================== */

.icon-svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform 0.2s var(--easing-standard);
}

.icon-logo .icon-svg {
    width: 32px;
    height: 32px;
}

/* Control visual para el botón de tema (Sol/Luna) sin JS de inyección */
.theme-icon-light {
    display: none;
}

.dark-theme .theme-icon-dark {
    display: none;
}

.dark-theme .theme-icon-light {
    display: inline-block;
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded', sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    transition: transform 0.2s var(--easing-standard);
}

/* ==========================================================================
   INTERACTIVIDAD RIPPLE EFFECT (ONDA EXPANSIVA AL CLICKEAR)
   ========================================================================== */

.btn-filled, .btn-tonal, .btn-error, .feature-card, .gallery-item, .tab-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background-color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    animation: ripple-animation 0.6s var(--easing-standard);
}

.btn-tonal .ripple, .tab-btn .ripple {
    background-color: rgba(0, 110, 61, 0.15);
}

.dark-theme .btn-tonal .ripple, .dark-theme .tab-btn .ripple {
    background-color: rgba(122, 219, 156, 0.2);
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ==========================================================================
   COMPONENTES DE BOTÓN (M3 DESIGN CON ELEVACIÓN)
   ========================================================================== */

.btn-filled, .btn-tonal, .btn-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 28px;
    border-radius: var(--radius-full);
    font-family: var(--font-brand);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--elevation-1);
    transition: box-shadow 0.25s var(--easing-emphasized), 
                transform 0.25s var(--easing-emphasized), 
                background-color 0.25s var(--easing-emphasized);
}

.btn-filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.btn-filled:hover {
    box-shadow: var(--elevation-3);
    transform: translateY(-2px);
    background-color: #008249;
}

.dark-theme .btn-filled:hover {
    background-color: #92f2b2;
}

.btn-tonal {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.btn-tonal:hover {
    box-shadow: var(--elevation-2);
    transform: translateY(-1.5px);
    background-color: #c0dbc0;
}

.dark-theme .btn-tonal:hover {
    background-color: #495c4d;
}

.btn-error {
    background-color: var(--md-sys-color-error);
    color: var(--md-sys-color-on-error);
}

.btn-error:hover {
    box-shadow: var(--elevation-3);
    transform: translateY(-2px);
    background-color: #dc2626;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN GLASSMORPHISM
   ========================================================================== */

.app-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: background-color var(--transition-speed) var(--easing-standard),
                border-color var(--transition-speed) var(--easing-standard);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-primary);
    font-size: 1.45rem;
    font-family: var(--font-brand);
    font-weight: 800;
}

.icon-logo {
    font-size: 32px;
    font-variation-settings: 'FILL' 1;
}

.nav-menu {
    display: flex;
    gap: 6px;
}

.nav-link {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    transition: background-color 0.25s var(--easing-standard), 
                color 0.25s var(--easing-standard),
                transform 0.2s var(--easing-standard);
}

.nav-link:hover {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.nav-link.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-header {
    height: 42px;
    padding: 0 20px;
    font-size: 0.88rem;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    transition: background-color 0.25s var(--easing-standard),
                color 0.25s var(--easing-standard),
                transform 0.2s var(--easing-standard);
}

.icon-btn:hover {
    background-color: rgba(122, 122, 122, 0.12);
    color: var(--md-sys-color-on-surface);
    transform: scale(1.05);
}

.icon-btn:active {
    transform: scale(0.95);
}

.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   SECCIÓN HERO PREMIUM Y ADAPTATIVA
   ========================================================================== */

.hero-section {
    padding: 140px 24px 80px 24px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
    min-height: 95vh;
    display: flex;
    align-items: center;
    transition: background var(--transition-speed) var(--easing-standard);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    font-family: var(--font-brand);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 28px;
    box-shadow: var(--elevation-1);
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s var(--easing-emphasized) forwards;
}

.hero-title {
    font-size: 3.8rem;
    line-height: 1.1;
    color: var(--md-sys-color-on-background);
    margin-bottom: 24px;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.8s var(--easing-emphasized) 0.1s forwards;
}

.hero-title .highlight {
    color: var(--md-sys-color-primary);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--md-sys-color-primary-container);
    z-index: -1;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.18rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 40px;
    max-width: 580px;
    line-height: 1.6;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.8s var(--easing-emphasized) 0.2s forwards;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 56px;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.8s var(--easing-emphasized) 0.3s forwards;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    padding-top: 28px;
    width: 100%;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUp 0.8s var(--easing-emphasized) 0.4s forwards;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-brand);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--md-sys-color-primary);
}

.stat-lbl {
    font-size: 0.82rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
    font-weight: 500;
}

/* ==========================================================================
   SMARTPHONE MOCKUP 3D INTERACTIVO
   ========================================================================== */

.hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px; /* Habilita efectos 3D */
    transform: translateX(40px);
    opacity: 0;
    animation: fadeInRight 1s var(--easing-emphasized) 0.1s forwards;
}

.phone-mockup-wrapper {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.phone-mockup {
    width: 295px;
    height: 600px;
    background-color: #000000;
    border-radius: 44px;
    border: 10px solid var(--md-sys-color-outline-variant);
    box-shadow: 0px 30px 60px -15px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
    outline: 2px solid var(--md-sys-color-outline);
    transition: border-color var(--transition-speed) var(--easing-standard),
                outline-color var(--transition-speed) var(--easing-standard);
}

.phone-speaker {
    width: 50px;
    height: 4px;
    background-color: #1a1a1a;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-camera {
    width: 12px;
    height: 12px;
    background-color: #0d0d0d;
    border-radius: 50%;
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    border: 2px solid #1a1a1a;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background-color: #0a0d0a;
    border-radius: 34px;
    overflow: hidden;
    position: relative;
}

.simulator-container {
    position: relative;
    width: 100%;
    height: 100%;
    font-family: var(--font-plain);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #0c1510;
}

.sim-screen-yape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #740b5c 0%, #4a063b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    padding-top: 48px;
}

.yape-header {
    width: 100%;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
}

.yape-logo {
    font-family: var(--font-brand);
    font-weight: 800;
    font-size: 1.8rem;
    color: #22e399;
    letter-spacing: -1px;
}

.yape-receipt {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 85%;
    background: rgba(255, 255, 255, 0.08);
    padding: 24px 16px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.yape-circle-check {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #22e399;
    color: #740b5c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 12px;
}

.yape-text-success {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.yape-amount {
    font-size: 1.85rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.yape-recipient {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
}

.yape-date {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
}

.sim-android-notification {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    background-color: rgba(28, 27, 31, 0.95);
    color: #e6e1e5;
    border-radius: 20px;
    padding: 12px 16px;
    box-shadow: var(--elevation-3);
    z-index: 100;
    transform: translateY(-150px);
    animation: simNotificationAnim 12s var(--easing-emphasized) infinite;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.notif-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.notif-app-icon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    background-color: #740b5c;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
}

.notif-time {
    margin-left: auto;
}

.notif-body {
    font-size: 0.78rem;
    font-weight: 500;
    color: #ffffff;
}

.sim-app-bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface-variant);
    border-radius: 28px 28px 0 0;
    padding: 12px 18px 20px 18px;
    z-index: 90;
    transform: translateY(100%);
    animation: simBottomSheetAnim 12s var(--easing-emphasized) infinite;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: 0px -4px 16px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sheet-drag-handle {
    width: 36px;
    height: 4px;
    background-color: var(--md-sys-color-outline);
    border-radius: var(--radius-full);
    margin: 0 auto 12px auto;
    opacity: 0.3;
}

.sheet-title-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.sheet-title-text {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--md-sys-color-primary);
}

.sheet-amount-card {
    background-color: rgba(0, 110, 61, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(0, 110, 61, 0.12);
    padding: 10px 14px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.dark-theme .sheet-amount-card {
    background-color: rgba(149, 216, 171, 0.08);
    border-color: rgba(149, 216, 171, 0.15);
}

.amount-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.amount-symbol {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--md-sys-color-primary);
    opacity: 0.6;
}

.amount-val {
    font-size: 1.95rem;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
    letter-spacing: -0.5px;
}

.sheet-accordion-card {
    background-color: rgba(122, 122, 122, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(122, 122, 122, 0.12);
    padding: 8px 12px 10px 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    width: 100%;
}

.accordion-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface-variant);
}

.btn-icon-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--md-sys-color-on-surface-variant);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0.55;
    transition: opacity 0.2s;
}

.btn-icon-close:hover {
    opacity: 0.9;
}

.btn-icon-close .icon-svg {
    width: 12px;
    height: 12px;
}

.wallet-scroll-row {
    display: flex;
    gap: 6px;
    width: 100%;
    overflow-x: hidden;
    padding: 2px 0;
}

.wallet-tab-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 12px;
    background-color: rgba(122, 122, 122, 0.08);
    cursor: pointer;
    flex-shrink: 0;
}

.wallet-tab-item.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.wallet-icon-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    font-weight: 800;
    color: #ffffff;
}

.wallet-tab-item.active .wallet-icon-dot {
    color: var(--md-sys-color-primary-container);
    background-color: var(--md-sys-color-on-primary-container);
}

.wallet-tab-text {
    font-size: 0.68rem;
    font-weight: 600;
}

.yape-dot-icon { background-color: #740b5c; }
.gpay-dot-icon { background-color: #4285F4; }
.plin-dot-icon { background-color: #00b4a4; }
.bcp-dot-icon { background-color: #ff8c00; }

.sheet-action-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 4px;
    margin-bottom: 16px;
}

.sheet-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    cursor: pointer;
    text-align: center;
}

.action-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s;
}

.bg-subtle {
    background-color: rgba(122, 122, 122, 0.06);
    color: var(--md-sys-color-on-surface-variant);
}

.sheet-action-btn.active .action-icon-circle {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.bg-category-food {
    background-color: rgba(229, 115, 115, 0.12);
    color: #e57373;
}

.bg-wallet-yape {
    background-color: rgba(116, 11, 92, 0.12);
    color: #740b5c;
    font-size: 0.72rem;
    font-weight: 800;
}

.action-btn-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.sheet-action-btn.active .action-btn-label {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

.sheet-action-btn:hover .action-icon-circle {
    transform: scale(1.05);
}

.sheet-save-btn {
    width: 100%;
    height: 44px;
    border-radius: 24px;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    cursor: pointer;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--elevation-1);
    animation: simButtonSubmitAnim 12s var(--easing-emphasized) infinite;
}

.sim-toast-success {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    background-color: var(--md-sys-color-inverse-surface);
    color: var(--md-sys-color-inverse-on-surface);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--elevation-2);
    z-index: 110;
    min-width: 85%;
    justify-content: center;
    pointer-events: none;
    animation: simToastAnim 12s var(--easing-emphasized) infinite;
}

@keyframes simNotificationAnim {
    0%, 15% { transform: translateY(-120px); opacity: 0; }
    18%, 38% { transform: translateY(0); opacity: 1; }
    41%, 100% { transform: translateY(-120px); opacity: 0; }
}

@keyframes simBottomSheetAnim {
    0%, 41% { transform: translateY(100%); }
    45%, 73% { transform: translateY(0); }
    76%, 100% { transform: translateY(100%); }
}

@keyframes simButtonSubmitAnim {
    0%, 65% { transform: scale(1); filter: brightness(1); }
    67% { transform: scale(0.95); filter: brightness(0.85); }
    69%, 100% { transform: scale(1); filter: brightness(1); }
}

@keyframes simToastAnim {
    0%, 75% { transform: translate(-50%, 20px); opacity: 0; }
    78%, 95% { transform: translate(-50%, 0); opacity: 1; }
    98%, 100% { transform: translate(-50%, -20px); opacity: 0; }
}

.phone-power-btn {
    width: 3px;
    height: 45px;
    background-color: var(--md-sys-color-outline);
    position: absolute;
    right: -13px;
    top: 120px;
    border-radius: 2px 0 0 2px;
}

.phone-volume-btn {
    width: 3px;
    height: 80px;
    background-color: var(--md-sys-color-outline);
    position: absolute;
    right: -13px;
    top: 180px;
    border-radius: 2px 0 0 2px;
}

.mockup-caption {
    margin-top: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
    display: flex;
    align-items: center;
    gap: 6px;
}

.mockup-caption span {
    font-size: 16px;
}

/* ==========================================================================
   ANIMACIONES DE SCROLL (INTERSECTION OBSERVER)
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.75s var(--easing-emphasized),
                transform 0.75s var(--easing-emphasized);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   SECCIÓN DE CARACTERÍSTICAS (FEATURES)
   ========================================================================== */

.features-section, .gallery-section, .beta-section, .support-section {
    padding: 100px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px auto;
}

.section-tag {
    font-family: var(--font-brand);
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--md-sys-color-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 14px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--md-sys-color-on-background);
    margin-bottom: 18px;
    line-height: 1.15;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--md-sys-color-on-surface-variant);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

/* Tarjetas M3 Outlined Cards */
.feature-card {
    background-color: var(--md-sys-color-surface-variant);
    padding: 36px 32px;
    border-radius: var(--radius-xl);
    border: 1px solid transparent;
    transition: background-color 0.3s var(--easing-standard),
                transform 0.3s var(--easing-emphasized),
                box-shadow 0.3s var(--easing-emphasized),
                border-color 0.3s var(--easing-standard);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    background-color: var(--md-sys-color-surface);
    transform: translateY(-8px);
    box-shadow: var(--elevation-3);
    border-color: var(--md-sys-color-outline-variant);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.04);
}

.feature-icon-wrapper span {
    font-size: 30px;
}

/* Colores de Contenedores Material 3 */
.container-primary { background-color: #d4e8d4; }
.icon-color-primary { color: #00532c; }

.container-secondary { background-color: #bdeaf3; }
.icon-color-secondary { color: #004f58; }

.container-tertiary { background-color: #ffdad6; }
.icon-color-tertiary { color: #ba1a1a; }

.container-error { background-color: #e2e2f5; }
.icon-color-error { color: #3f51b5; }

.feature-card-title {
    font-size: 1.35rem;
    color: var(--md-sys-color-on-background);
    margin-bottom: 14px;
}

.feature-card-desc {
    font-size: 0.94rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.6;
}

/* ==========================================================================
   SECCIÓN GALERÍA DE CAPTURAS: VITRINA DE SMARTPHONES 3D
   ========================================================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    width: 100%;
    padding-top: 24px; /* Espacio extra para que el celular no se recorte al elevarse en la animación */
    overflow: visible;
}

.gallery-item {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px; /* Habilita el espacio 3D para el celular individual */
    overflow: visible; /* Asegura que la transformación 3D no se recorte */
}

/* Mockup de celular reducido para la galería (Redondeado suave para evitar recortes) */
.phone-mockup-gallery {
    width: 220px;
    height: 450px;
    background-color: #000000;
    border-radius: 20px; /* Bordes menos curvos para chasis */
    border: 8px solid var(--md-sys-color-outline-variant);
    outline: 1.5px solid var(--md-sys-color-outline);
    position: relative;
    overflow: hidden;
    box-shadow: 0px 10px 25px -10px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s var(--easing-emphasized), 
                border-color 0.4s var(--easing-standard),
                outline-color 0.4s var(--easing-standard),
                box-shadow 0.4s var(--easing-emphasized);
    transform-style: preserve-3d;
}

/* Efecto Hover: Elevar celular en 3D sutilmente manteniendo legibilidad */
.gallery-item:hover .phone-mockup-gallery {
    transform: translateY(-12px) rotateY(-6deg) rotateX(4deg);
    box-shadow: 0px 20px 40px -12px rgba(0, 0, 0, 0.4);
    border-color: var(--md-sys-color-primary);
    outline-color: var(--md-sys-color-primary-container);
}

.phone-mockup-gallery .phone-screen {
    width: 100%;
    height: 100%;
    background-color: #0a0d0a;
    border-radius: 12px; /* Redondeado pequeño para no comerse la barra de estado de Android */
    overflow: hidden;
    position: relative;
}

.phone-mockup-gallery .phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* Muestra la captura completa en la pantalla */
    transition: transform 0.4s var(--easing-standard);
}

.phone-mockup-gallery .phone-power-btn {
    width: 2.5px;
    height: 35px;
    background-color: var(--md-sys-color-outline);
    position: absolute;
    right: -10.5px;
    top: 90px;
    border-radius: 1.5px 0 0 1.5px;
}

.phone-mockup-gallery .phone-volume-btn {
    width: 2.5px;
    height: 60px;
    background-color: var(--md-sys-color-outline);
    position: absolute;
    right: -10.5px;
    top: 140px;
    border-radius: 1.5px 0 0 1.5px;
}

.gallery-caption-info {
    text-align: center;
    margin-top: 16px;
    width: 100%;
}

.gallery-caption-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--md-sys-color-on-background);
    margin-bottom: 6px;
    transition: color 0.3s var(--easing-standard);
}

.gallery-item:hover .gallery-caption-info h4 {
    color: var(--md-sys-color-primary);
}

.gallery-caption-info p {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.4;
    max-width: 200px;
    margin: 0 auto;
}

/* ==========================================================================
   SECCIÓN BETA (PLAY CONSOLE REQUIREMENTS)
   ========================================================================== */

.beta-section {
    background-color: var(--md-sys-color-secondary-container);
    border-radius: 40px;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 80px 60px;
    transition: background-color var(--transition-speed) var(--easing-standard);
}

.dark-theme .beta-section {
    background-color: rgba(90, 105, 92, 0.15);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.beta-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

.beta-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.step-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background-color: rgba(255, 255, 255, 0.55);
    padding: 24px;
    border-radius: var(--radius-xl);
    transition: background-color var(--transition-speed) var(--easing-standard),
                transform 0.25s var(--easing-standard);
}

.step-card:hover {
    transform: translateX(6px);
    background-color: rgba(255, 255, 255, 0.8);
}

.dark-theme .step-card {
    background-color: rgba(0, 0, 0, 0.2);
}

.dark-theme .step-card:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-brand);
    font-weight: 800;
    flex-shrink: 0;
}

.step-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-card p {
    font-size: 0.88rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* Tarjetas M3 Form Card */
.m3-card {
    background-color: var(--md-sys-color-surface);
    border-radius: 32px;
    padding: 44px;
    box-shadow: var(--elevation-2);
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: background-color var(--transition-speed) var(--easing-standard);
}

.form-title {
    font-size: 1.7rem;
    margin-bottom: 10px;
    color: var(--md-sys-color-on-surface);
}

.form-title-small {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: var(--md-sys-color-on-surface);
}

.form-desc {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 32px;
}

/* Inputs al estilo Material You (Outlined Field M3) */
.input-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.input-field label {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--md-sys-color-on-surface-variant);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: var(--md-sys-color-on-surface-variant);
    pointer-events: none;
    font-size: 22px;
}

.input-field input, .input-field textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--md-sys-color-outline);
    background-color: transparent;
    color: var(--md-sys-color-on-surface);
    font-family: var(--font-plain);
    font-size: 0.95rem;
    transition: border-color 0.2s var(--easing-standard), 
                box-shadow 0.2s var(--easing-standard),
                background-color 0.2s var(--easing-standard);
}

.input-field input {
    height: 52px;
    padding: 0 18px 0 52px;
}

.input-field textarea {
    padding: 16px 18px;
    resize: none;
}

.input-field input:focus, .input-field textarea:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
    box-shadow: 0 0 0 4px rgba(0, 110, 61, 0.15);
    background-color: rgba(0, 110, 61, 0.01);
}

.error-msg {
    font-size: 0.8rem;
    color: var(--md-sys-color-error);
    margin-top: 6px;
    display: none;
}

.input-field.error input, .input-field.error textarea {
    border-color: var(--md-sys-color-error);
}

.input-field.error .error-msg {
    display: block;
}

/* Consentimiento / Checkbox Personalizado */
.form-consent {
    margin-bottom: 28px;
}

.checkbox-container {
    display: flex;
    position: relative;
    padding-left: 34px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--md-sys-color-on-surface-variant);
    user-select: none;
    align-items: flex-start;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0; width: 0;
}

.checkmark {
    position: absolute;
    top: 3px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: transparent;
    border: 2px solid var(--md-sys-color-outline);
    border-radius: 5px;
    transition: background-color 0.2s var(--easing-standard),
                border-color 0.2s var(--easing-standard);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--md-sys-color-primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkmark.red-check:after {
    border-color: var(--md-sys-color-on-error);
}

.checkbox-container input:checked ~ .checkmark.red-check {
    background-color: var(--md-sys-color-error);
    border-color: var(--md-sys-color-error);
}

.btn-submit {
    width: 100%;
}

/* Pantalla de Éxito */
.success-message {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 0;
}

.success-icon {
    font-size: 72px;
    color: var(--md-sys-color-primary);
    margin-bottom: 20px;
    font-variation-settings: 'FILL' 1;
}

.success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.success-message p {
    font-size: 0.92rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-bottom: 28px;
    line-height: 1.6;
}

.btn-reset-form {
    height: 42px;
    padding: 0 24px;
    font-size: 0.88rem;
}

/* ==========================================================================
   SECCIÓN DE SOPORTE Y BORRADO DE DATOS
   ========================================================================== */

.support-section {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
    align-items: start;
}

.support-channels {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.channel-item {
    display: flex;
    gap: 20px;
    align-items: center;
}

.channel-item span {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.channel-item h5 {
    font-size: 1.05rem;
    font-weight: 700;
}

.channel-item p {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* Barra de pestañas al estilo M3 */
.tab-bar {
    display: flex;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    margin-bottom: 32px;
}

.tab-btn {
    flex: 1;
    height: 52px;
    background: transparent;
    border: none;
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface-variant);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: color 0.25s var(--easing-standard);
}

.tab-btn span {
    font-size: 22px;
}

.tab-btn:hover {
    color: var(--md-sys-color-on-surface);
}

.tab-btn.active {
    color: var(--md-sys-color-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15%;
    right: 15%;
    height: 3px;
    background-color: var(--md-sys-color-primary);
    border-radius: 3px 3px 0 0;
}

.hidden-form {
    display: none;
}

.active-form {
    display: block;
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */

.app-footer {
    background-color: var(--md-sys-color-surface-variant);
    padding: 80px 24px 32px 24px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    transition: background-color var(--transition-speed) var(--easing-standard);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.footer-tagline {
    font-size: 0.94rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 18px;
    max-width: 340px;
}

.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 14px;
    background-color: rgba(0, 0, 0, 0.06);
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 28px;
    font-size: 0.82rem;
    font-weight: 600;
}

.dark-theme .store-badge {
    background-color: rgba(255, 255, 255, 0.06);
}

.store-badge span {
    font-size: 22px;
}

.footer-links-group {
    display: flex;
    justify-content: flex-end;
    gap: 80px;
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links-col h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-links-col a, .footer-link-btn {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant);
    transition: color 0.2s var(--easing-standard);
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.footer-links-col a:hover, .footer-link-btn:hover {
    color: var(--md-sys-color-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0 auto;
    text-align: center;
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* ==========================================================================
   MODALES DEL SISTEMA (M3 DIALOGS)
   ========================================================================== */

.m3-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--easing-standard);
}

.m3-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.m3-modal {
    background-color: var(--md-sys-color-surface);
    width: 100%;
    max-width: 580px;
    border-radius: 32px;
    box-shadow: var(--elevation-4);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    transform: translateY(40px) scale(0.94);
    transition: transform 0.35s var(--easing-emphasized),
                background-color var(--transition-speed) var(--easing-standard);
}

.m3-modal-overlay.active .m3-modal {
    transform: translateY(0) scale(1);
}

.m3-modal-header {
    padding: 28px 28px 18px 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    position: relative;
}

.modal-icon {
    font-size: 30px;
}

.m3-modal-header h3 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    flex-grow: 1;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
}

.m3-modal-body {
    padding: 28px;
    overflow-y: auto;
    font-size: 0.92rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.65;
}

.last-update {
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 18px;
}

.m3-modal-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 22px 0 10px 0;
    color: var(--md-sys-color-on-surface);
}

.m3-modal-body ul {
    margin-left: 20px;
    margin-bottom: 18px;
}

.m3-modal-body li {
    margin-bottom: 8px;
}

.m3-modal-body a {
    color: var(--md-sys-color-primary);
    font-weight: 700;
}

.m3-modal-body a:hover {
    text-decoration: underline;
}

.m3-modal-footer {
    padding: 18px 28px 28px 28px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.btn-text {
    background: transparent;
    border: none;
    height: 42px;
    padding: 0 18px;
    border-radius: var(--radius-full);
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--md-sys-color-primary);
    cursor: pointer;
    transition: background-color 0.2s var(--easing-standard);
}

.btn-text:hover {
    background-color: rgba(0, 110, 61, 0.08);
}

.btn-modal-close {
    min-width: 90px;
}

/* ==========================================================================
   LIGHTBOX (VISTA DE CAPTURAS DE ALTO RANGO)
   ========================================================================== */

.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s var(--easing-standard);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-img {
    max-height: 82vh;
    max-width: 82vw;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    transform: scale(0.94);
    transition: transform 0.35s var(--easing-emphasized);
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.lightbox-nav span {
    font-size: 36px;
}

.lightbox-nav.prev { left: 40px; }
.lightbox-nav.next { right: 40px; }

.lightbox-caption {
    position: absolute;
    bottom: 32px;
    color: #ffffff;
    font-family: var(--font-brand);
    font-size: 1.15rem;
    text-align: center;
}

/* ==========================================================================
   ANIMACIONES FLUIDAS (KEYFRAMES)
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* ==========================================================================
   DISEÑO RESPONSIVO AVANZADO
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-container {
        gap: 40px;
    }
    .footer-links-group {
        gap: 40px;
    }
}

@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
        padding-top: 40px;
    }
    .hero-content {
        align-items: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .beta-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }
    .hero-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .support-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-links-group {
        justify-content: flex-start;
    }
    .hero-visual {
        transform: translateX(0); /* Quitar desplazamiento */
    }
    
    /* Reducción de espaciados de secciones en tablets (20px de margen) */
    .features-section, .gallery-section, .support-section {
        padding: 56px 20px;
    }
    
    /* Evitar que la sección Beta (que es una tarjeta con fondo) toque los bordes del dispositivo */
    .beta-section {
        margin-left: 20px;
        margin-right: 20px;
        border-radius: 28px;
        padding: 48px 36px;
    }
    
    /* Carrusel de captura horizontal deslizable en móviles dentro de los márgenes */
    .gallery-container {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 24px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        display: flex;
        justify-content: flex-start;
        scrollbar-width: none; /* Firefox */
        margin: 0 auto;
    }
    .gallery-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .gallery-grid {
        display: flex;
        flex-wrap: nowrap;
        grid-template-columns: none;
        gap: 24px;
        width: max-content;
        padding-left: 0;
        padding-right: 0;
    }
    .gallery-item {
        scroll-snap-align: center;
        flex-shrink: 0;
        width: 260px;
    }
    .gallery-item:hover .phone-mockup-gallery {
        transform: translateY(-8px); /* Elevación más suave en móvil */
        box-shadow: 0px 15px 30px -10px rgba(0, 0, 0, 0.35);
    }

    /* Colapso del menú de navegación móvil a partir de tablet (768px) */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-menu-btn .close-icon-svg {
        display: none !important;
    }
    .mobile-menu-btn.active .menu-icon-svg {
        display: none !important;
    }
    .mobile-menu-btn.active .close-icon-svg {
        display: inline-block !important;
    }
    .btn-header {
        display: none;
    }
    
    /* Menú móvil flotante con desenfoque de cristal (Glassmorphic Card) */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 20px;
        right: 20px;
        background-color: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        gap: 8px;
        border-radius: 20px;
        box-shadow: var(--elevation-3);
        border: 1px solid var(--md-sys-color-outline-variant);
        transform: translateY(-160%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.4s var(--easing-emphasized),
                    opacity 0.4s var(--easing-emphasized);
    }
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link {
        padding: 12px 20px;
        width: 100%;
        text-align: center;
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    /* Unificación de márgenes a 24px en móviles para dar espacio visual amplio y evitar pegado a bordes */
    .header-container {
        padding: 0 24px;
    }
    .app-bar {
        height: 64px;
    }
    .nav-menu {
        top: 72px; /* Ajustar posición para barra superior colapsada con margen de 8px */
        left: 24px;
        right: 24px;
    }
    .hero-section {
        padding: 96px 24px 40px 24px;
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Espaciado unificado de secciones en móviles a 24px */
    .features-section, .gallery-section, .support-section {
        padding: 40px 24px;
    }
    .gallery-grid {
        padding-left: 0;
        padding-right: 0;
        gap: 16px;
    }
    
    /* Ajuste de márgenes de tarjetas de ventajas para evitar apretamiento de texto */
    .feature-card {
        padding: 24px 20px;
        border-radius: 20px;
    }
    
    /* Títulos de sección más proporcionales en móvil para evitar saltos amontonados */
    .section-title {
        font-size: 1.85rem;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* Stacking vertical de llamadas a la acción en móvil para usabilidad en una mano */
    .hero-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions .btn-filled, .hero-actions .btn-tonal {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
        padding-top: 20px;
    }
    .stat-item {
        align-items: center;
    }
    .stat-num {
        font-size: 1.45rem;
    }
    
    /* Flotar la tarjeta Beta en móviles con márgenes de pantalla idénticos al grid */
    .beta-section {
        margin-left: 24px;
        margin-right: 24px;
        border-radius: 24px;
        padding: 32px 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .m3-card {
        padding: 28px 20px;
        border-radius: 24px;
    }
    
    /* Alinear el pie de página con el grid estándar de 24px */
    .app-footer {
        padding: 48px 24px 32px 24px;
    }
    
    /* Optimizar el espaciado de pasos de registro para evitar amontonamiento de texto en móviles */
    .step-card {
        padding: 16px 14px;
        gap: 12px;
    }
    .step-num {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .step-card h4 {
        font-size: 0.95rem;
    }
    .step-card p {
        font-size: 0.82rem;
    }

    /* Reducir canales de soporte en móviles */
    .channel-item {
        gap: 16px;
    }
    .channel-item span {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    .channel-item h5 {
        font-size: 0.95rem;
    }
    .channel-item p {
        font-size: 0.82rem;
    }
    
    .lightbox-nav {
        width: 48px;
        height: 48px;
    }
    .lightbox-nav.prev { left: 12px; }
    .lightbox-nav.next { right: 12px; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.85rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    
    /* Ajustes específicos para móviles ultra-estrechos (ej. 320px) para máxima legibilidad */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .feature-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    .beta-section {
        margin-left: 24px; /* Mantener la alineación uniforme de 24px para evitar descuadres en el borde */
        margin-right: 24px;
        padding: 24px 16px;
        border-radius: 20px;
    }
    .m3-card {
        padding: 24px 16px;
        border-radius: 20px;
    }
    
    .phone-mockup {
        width: 250px;
        height: 510px;
        border-radius: 36px;
        border-width: 8px;
    }
    .phone-speaker {
        top: 6px;
        width: 40px;
    }
    .phone-camera {
        top: 12px;
        width: 10px;
        height: 10px;
    }
    .sim-screen-yape {
        padding-top: 36px;
    }
    .yape-receipt {
        margin-top: 20px;
        padding: 16px 12px;
    }
    .yape-amount {
        font-size: 1.5rem;
    }
    .yape-recipient {
        margin-bottom: 10px;
    }
    .sim-app-bottom-sheet {
        padding: 12px 14px 18px 14px;
        border-radius: 20px 20px 0 0;
    }
    .sheet-accordion-card {
        padding: 6px 8px;
        margin-bottom: 8px;
    }
    .wallet-scroll-row {
        gap: 4px;
    }
    .wallet-tab-item {
        padding: 4px 8px;
        border-radius: 8px;
    }
    .wallet-tab-text {
        font-size: 0.62rem;
    }
    .sheet-action-row {
        gap: 3px;
        margin-bottom: 12px;
    }
    .action-icon-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    .action-btn-label {
        font-size: 0.55rem;
    }
    .sheet-save-btn {
        height: 38px;
    }
}
