/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root {
    --text-primary: #0f2c44;   
    --text-secondary: #455a6b; 
    --accent-gold: #c5a059;    
    --accent-light: #00d2ff;   
    --white: #ffffff;
    
    --glass-nav: rgba(15, 44, 68, 0.95); 
    --glass-bg: rgba(255, 255, 255, 0.65); 
    --glass-border: 1px solid rgba(255, 255, 255, 0.9);
    --blur-amount: blur(25px);
    
    --font-body: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.7;
    background-color: #e8f0f7;
    background: linear-gradient(to bottom, #e3ecf5 0%, #f0f7ff 40%, #ffffff 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* LUCES DE FONDO */
body::before {
    content: ''; position: fixed; top: 20%; left: -10%; width: 50vw; height: 50vw;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1; pointer-events: none;
}
body::after {
    content: ''; position: fixed; bottom: 10%; right: -10%; width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1; pointer-events: none;
}

/* RESET FORZADO */
a { text-decoration: none !important; transition: all 0.3s ease; }
ul, li { list-style: none !important; margin: 0; padding: 0; }

/* =========================================
   2. HEADER
   ========================================= */
.navbar {
    background: var(--glass-nav);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky; top: 0; z-index: 9999; padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.container { max-width: 1150px; margin: 0 auto; padding: 0 25px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }

.logo { font-size: 1.5rem; font-weight: 900; color: #fff; letter-spacing: -0.5px; }
.logo span { color: var(--accent-gold); }

.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { 
    color: rgba(255,255,255,0.9); font-weight: 600; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase;
}
.nav-links a:hover { color: var(--accent-gold); }
.nav-links .btn-primary { 
    background: var(--accent-gold); color: #fff !important; padding: 10px 24px; border-radius: 50px;
}

/* =========================================
   3. HERO SLIDER
   ========================================= */
.hero {
    position: relative; height: 100vh; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-top: -76px; 
    background-color: #000; 
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover; background-position: center;
}

.hero-slider, .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.slide {
    background-size: cover; background-position: center; opacity: 0; transform: scale(1.05);
    animation: slideAnimation 18s infinite;
}
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 6s; }
.slide:nth-child(3) { animation-delay: 12s; }

@keyframes slideAnimation {
    0% { opacity: 0; transform: scale(1.05); } 5% { opacity: 1; } 33% { opacity: 1; } 38% { opacity: 0; } 100% { opacity: 0; transform: scale(1); }
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10, 25, 40, 0.8), rgba(20, 61, 89, 0.4)); z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; }

.hero h1 {
    font-size: 3.5rem; line-height: 1.1; color: #fff; text-transform: uppercase; margin-bottom: 25px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5); font-weight: 800;
}
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.95); margin-bottom: 45px; font-weight: 500; }

.btn-hero-glass {
    display: inline-block; background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6); color: #fff !important; padding: 16px 45px;
    font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; border-radius: 50px;
    transition: all 0.3s;
}
.btn-hero-glass:hover { background: #fff; color: var(--text-primary) !important; transform: translateY(-3px); }

/* =========================================
   4. ESTRUCTURA Y TARJETAS (FIXED HEIGHTS)
   ========================================= */
.section { padding: 100px 0; position: relative; z-index: 1; }
.text-center { text-align: center; }
.section-title { font-size: 2.5rem; margin-bottom: 2rem; color: var(--text-primary); font-weight: 800; }
.section-title span { color: var(--accent-gold); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }

/* LA CLAVE PARA QUE NO SE DESCUADREN */
.grid-3 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    align-items: stretch; /* Obliga a que todas tengan la misma altura */
}

/* TARJETA DE CRISTAL */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-amount);
    -webkit-backdrop-filter: var(--blur-amount);
    border: var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(20, 61, 89, 0.05);
    transition: 0.3s;
    /* ESTO ES VITAL PARA LA ALTURA IGUAL */
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start;
}
.glass-card:hover { transform: translateY(-5px); border-color: #fff; box-shadow: 0 25px 50px rgba(20, 61, 89, 0.15); }

.service-panel {
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.service-panel h3 { 
    font-size: 1.8rem; color: var(--text-primary); border-bottom: 2px solid var(--accent-gold); 
    display: inline-block; padding-bottom: 10px; margin-bottom: 20px;
}
.service-panel p { color: var(--text-secondary); margin-bottom: 20px; text-align: justify; }

h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-primary); font-weight: 700; }
h4 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 10px; display: flex; align-items: center; gap:10px; font-weight: 700;}
h4 i { color: var(--accent-gold); font-size: 1.3rem; }

.sub-service { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.1); }
.service-list li { margin-bottom: 8px; padding-left: 20px; position: relative; color: var(--text-secondary); font-size: 0.9rem;}
.service-list li::before { content: '✦'; color: var(--accent-gold); position: absolute; left: 0; }

.feature-icon { font-size: 3rem; color: var(--accent-gold); margin-bottom: 20px; display: block; }
.stats-grid { display: flex; justify-content: center; gap: 50px; margin-top: 60px; }
.stat-item h3 { font-size: 3.5rem; color: var(--accent-gold); line-height: 1; font-weight: 800; }

/* =========================================
   5. FORMULARIO (CORREGIDO)
   ========================================= */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.85rem; }

/* ARREGLO DE FUENTE TIMES NEW ROMAN */
.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%; 
    padding: 15px; 
    background: rgba(255,255,255,0.6); 
    border: 1px solid rgba(255,255,255,0.5); 
    border-radius: 10px; 
    transition: all 0.3s;
    
    /* ESTO ARREGLA LA TIPOGRAFÍA FEA EN EL INPUT */
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.form-group input:focus, textarea:focus {
    outline: none; background: #fff; border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}
.full-width { width: 100%; }
.btn { border: none; cursor: pointer; font-family: inherit; }
.btn-primary.full-width { 
    background: var(--accent-gold); color: #fff; padding: 16px; border-radius: 12px; font-weight: 700; letter-spacing: 1px;
}
.btn-primary.full-width:hover { background: var(--text-primary); }

/* MENSAJES DE ESTADO BONITOS */
.success-message {
    margin-top: 15px; padding: 15px; border-radius: 8px;
    background: #d4edda; color: #155724; border: 1px solid #c3e6cb;
    text-align: center; font-weight: 600;
}
.error-message {
    margin-top: 15px; padding: 15px; border-radius: 8px;
    background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb;
    text-align: center; font-weight: 600;
}

.footer { padding: 50px 0; text-align: center; color: var(--text-secondary); background: #fff; border-top: 1px solid #eee;}

/* =========================================
   6. MÓVIL
   ========================================= */
.menu-toggle { display: none; font-size: 1.8rem; color: #fff; cursor: pointer; }

@media (max-width: 768px) {
    .grid-2, .grid-3, .stats-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero h1 { font-size: 2.2rem; }
    .service-panel { padding: 30px 20px; }
    
    .menu-toggle { display: block; }
    .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: rgba(15, 44, 68, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; padding: 40px 20px;
        display: none; border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links.active { display: flex; }
    .nav-links a { display: block; padding: 15px 0; border-bottom: 1px solid rgba(255,255,255,0.05); width: 100%; text-align: center;}
    .nav-links .btn-primary { width: 100%; margin-top: 10px; }
}