/* ═══════════════════════════════════════════════════════════════
   VARIABLES Y RESET
   ═══════════════════════════════════════════════════════════════ */
:root {
    --navy: #0A192F;
    --navy-light: #112240;
    --gold: #C5A059;
    --gold-hover: #D4AF37;
    --text-light: #E6F1FF;
    --text-gray: #8892B0;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--navy);
    color: var(--text-light);
    font-family: var(--font-body);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   SPLASH SCREEN
   ═══════════════════════════════════════════════════════════════ */
#splash-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#splash-screen.fade-out { opacity: 0; visibility: hidden; }
.splash-content { text-align: center; }
.splash-loader {
    width: 50px; height: 50px;
    border: 3px solid rgba(197, 160, 89, 0.2);
    border-top: 3px solid var(--gold);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.splash-logo { font-family: var(--font-heading); font-size: 32px; letter-spacing: 5px; color: var(--text-light); margin-bottom: 5px; }
.splash-subtitle { font-size: 12px; letter-spacing: 8px; color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════
   OVERLAY DE CARGA (Para transición entre apps)
   ═══════════════════════════════════════════════════════════════ */
#nav-loader {
    position: fixed;
    inset: 0;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000; /* Por encima de todo */
    opacity: 1;
    transition: opacity 0.3s ease;
}

#nav-loader.hidden {
    display: none !important;
}

/* Reutilizamos la animación del loader, pero un poco más grande */
#nav-loader .splash-loader {
    width: 60px;
    height: 60px;
    border-width: 4px;
    margin-bottom: 15px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, var(--navy-light) 0%, var(--navy) 100%);
    text-align: center;
    padding: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    color: var(--text-light);
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease 0.5s both;
}

.hero-subtitle {
    font-size: 16px;
    letter-spacing: 12px;
    color: var(--gold);
    font-weight: 600;
    animation: fadeInUp 1s ease 0.7s both;
}

.hero-description {
    color: var(--text-gray);
    font-size: 14px;
    max-width: 400px;
    animation: fadeInUp 1s ease 0.9s both;
}

.scroll-down {
    position: absolute;
    bottom: 40px;
    cursor: pointer;
    color: var(--gold);
    font-size: 24px;
    animation: bounce 2s infinite;
    transition: 0.3s;
}

.scroll-down:hover { color: var(--gold-hover); }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════════════════
   SOLUTIONS SECTION
   ═══════════════════════════════════════════════════════════════ */
.solutions-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-family: var(--font-heading); font-size: 36px; color: var(--gold); letter-spacing: 2px;}
.section-divider { width: 60px; height: 2px; background: var(--gold); margin: 15px auto 0; }

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    justify-content: center;
}

/* Tarjetas */
.solution-card {
    background: var(--navy-light);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 16px;
    padding: 30px;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.solution-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.solution-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    background: #172a45;
}

/* CORRECCIÓN DEFINITIVA DEL CONTENEDOR DE LA IMAGEN */
.card-image {
    width: 120px; /* Tamaño fijo cuadrado */
    height: 120px; /* Tamaño fijo cuadrado */
    margin-bottom: 25px;
    border-radius: 20px;
    overflow: hidden; 
    background: #fff; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    flex-shrink: 0; /* Evita que flexbox deforme el contenedor */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Llena el cuadrado sin dejar bordes blancos ni deformar */
    display: block; /* Elimina el espacio fantasma debajo de la imagen */
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--gold);
}

.card-content p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Botón de Ingresar con estilo */
.card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(197, 160, 89, 0.5);
    border-radius: 30px;
    transition: all 0.3s ease;
    width: fit-content;
    margin: 0 auto;
}

.solution-card:hover .card-link {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.app-footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-gray);
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .hero-title { font-size: 40px; letter-spacing: 5px; }
    .hero-subtitle { font-size: 12px; letter-spacing: 8px; }
    .section-header h2 { font-size: 28px; }
    .solutions-grid { grid-template-columns: 1fr; }
}