:root {
    --ampsie-azul: #004aad; /* Azul Logo aprox */
    --ampsie-vino: #8a1c1c; /* Vino Logo aprox */
    --accion-naranja: #ff5722; /* Botón Call to Action */
    --urgencia-amarillo: #ffeb3b; /* Contadores */
    --texto-oscuro: #1a1a1a;
    --gris-claro: #f4f5f7;
    --blanco: #ffffff;
}

/* Reset y Base */
body { font-family: 'Roboto', sans-serif; margin: 0; background: var(--gris-claro); color: var(--texto-oscuro); overflow-x: hidden; }
h1, h2, h3, .btn-cta, .btn-final { font-family: 'Montserrat', sans-serif; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* HERO SECTION (Híbrida) */
.hero { 
    background: linear-gradient(135deg, var(--ampsie-azul) 0%, #002a60 100%);
    color: white; 
    padding: 60px 0; 
    position: relative;
    overflow: hidden;
}
.hero-content { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 30px; }
.hero-text { flex: 1; min-width: 300px; }
.hero-form { 
    flex: 0 0 350px; 
    background: white; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    border-top: 5px solid var(--ampsie-vino);
}

.logo-hero { height: 60px; margin-bottom: 20px; background: white; padding: 5px; border-radius: 5px; }
h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 15px; }
.highlight { color: var(--urgencia-amarillo); }
.subtitulo { font-size: 1.2rem; opacity: 0.9; margin-bottom: 30px; }

/* Botón Hero */
.btn-cta { 
    background: var(--accion-naranja); 
    color: white; 
    padding: 15px 30px; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: 900; 
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(255, 87, 34, 0.4);
    display: inline-block;
}
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Formulario Caja */
.form-header { background: var(--ampsie-vino); color: white; padding: 15px; text-align: center; }
.form-header h3 { margin: 0; font-size: 1.2rem; }
.form-body { background: white; }

/* Grid Cursos */
.seccion-cursos { padding: 60px 0; }
.titulo-seccion { text-align: center; color: var(--ampsie-azul); font-size: 2.2rem; margin-bottom: 10px; }
.punto { color: var(--accion-naranja); }
.bajada-seccion { text-align: center; margin-bottom: 50px; color: #666; font-size: 1.1rem; }

.grid-cursos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

/* Tarjeta Curso */
.curso-card { 
    background: white; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    position: relative; 
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}
.curso-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.badge-urgencia { 
    position: absolute; 
    top: 10px; 
    right: 10px; 
    background: var(--ampsie-vino); 
    color: white; 
    padding: 5px 10px; 
    font-size: 0.8rem; 
    font-weight: bold; 
    border-radius: 3px;
    z-index: 10;
}

.curso-img { height: 180px; background-size: cover; background-position: center; }
.curso-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.curso-body h3 { margin: 0; font-size: 1.1rem; color: var(--ampsie-azul); height: 50px; overflow: hidden; }

/* Contador */
.countdown-box { background: #ffebee; color: var(--ampsie-vino); padding: 8px; border-radius: 5px; text-align: center; font-size: 0.9rem; border: 1px dashed var(--ampsie-vino); }
.timer { font-weight: bold; font-size: 1rem; }

.precios-preview { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.p-regular { text-decoration: line-through; color: #999; font-size: 0.9rem; }
.p-promo { color: var(--texto-oscuro); font-weight: 900; font-size: 1.2rem; }

.btn-ver-mas { 
    width: 100%; 
    padding: 12px; 
    background: white; 
    border: 2px solid var(--ampsie-azul); 
    color: var(--ampsie-azul); 
    font-weight: bold; 
    cursor: pointer; 
    border-radius: 5px; 
    transition: 0.3s;
    font-size: 0.9rem; /* Un poco más pequeño para que quepa todo */
    padding: 12px 5px; /* Menos relleno a los lados */
}
.btn-ver-mas:hover { background: var(--ampsie-azul); color: white; }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); }
.modal-content { 
    background: white; 
    margin: 5% auto; /* Margen superior reducido */
    width: 90%; 
    max-width: 500px; 
    border-radius: 10px; 
    position: relative; 
    animation: slideDown 0.4s;
    /* --- CORRECCIÓN DE ALTURA --- */
    max-height: 85vh; /* Máximo el 85% de la altura de la pantalla */
    overflow-y: auto; /* Si es más grande, permite bajar con el dedo (scroll) */
    display: flex;
    flex-direction: column;
}
@keyframes slideDown { from {top: -100px; opacity:0;} to {top: 0; opacity:1;} }

.modal-header { background: var(--ampsie-azul); color: white; padding: 20px; border-radius: 10px 10px 0 0; }
.modal-header h2 { margin: 0; font-size: 1.3rem; }
.close { position: absolute; right: 15px; top: 10px; color: white; font-size: 25px; cursor: pointer; }

.modal-body { padding: 30px; text-align: center; }
.oferta-box { background: #fdf2e9; padding: 15px; margin: 20px 0; border-radius: 5px; border: 1px solid #ffe0b2; }
.precio-gigante { font-size: 2rem; color: var(--accion-naranja); font-weight: 900; margin: 5px 0; }

.btn-final { 
    display: block; 
    background: #25D366; 
    color: white; 
    padding: 18px; 
    font-size: 1.1rem; 
    text-decoration: none; 
    border-radius: 50px; 
    font-weight: bold; 
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.2s;
}
.btn-final:hover { background: #1ebc57; transform: scale(1.02); }

/* Responsive */
@media (max-width: 768px) {
    .hero-content { justify-content: center; }
    .hero-text { text-align: center; margin-bottom: 20px; }
    .hero-form { width: 100%; }
}
/* BOTONES DE PAGO AUTOMÁTICO */
.btn-pago-auto {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    text-align: center;
    color: white !important; /* Forzamos color blanco */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    min-width: 140px;
    margin-bottom: 5px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.btn-paypal { background-color: #0070ba; border: 1px solid #003087; }
.btn-mp { background-color: #009ee3; border: 1px solid #007eb3; }

.btn-paypal:hover, .btn-mp:hover { 
    opacity: 0.9; 
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3); 
}
/* Aviso de Notificación de Pago */
.aviso-pago {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 10px;
    margin-top: 15px;
    border-radius: 5px;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}
.aviso-pago strong {
    color: #d32f2f; /* Rojo para el número */
    font-weight: 900;
}