/* ==========================================
   1. VARIABLES Y ESTILOS BASE (Comunes)
   ========================================== */
:root {
    --primary-color: #1F496A;
    --secondary-color: #279393;
    --accent-color: #F4B41C;
    --dark-grey: #333333;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--dark-grey); overflow-x: hidden; }

/* Contenedor responsivo base (soporte para landing) */
.container { width: min(calc(100% - 40px), 1140px); margin: 0 auto; }

/* ==========================================
   2. HEADER Y NAVEGACIÓN
   ========================================== */
header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 1);
}
header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.nav-link { cursor: pointer; transition: color 0.3s; position: relative; }
.nav-link:hover { color: var(--secondary-color); }

#mobile-menu {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--white); z-index: 2000;
    display: none; flex-direction: column; align-items: center;
    justify-content: center; gap: 2rem;
}

/* ==========================================
   3. BOTONES Y ELEMENTOS FLOTANTES
   ========================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 28px; border-radius: 12px; font-weight: 700;
    transition: all 0.3s ease; cursor: pointer; text-decoration: none; border: none;
}
.btn-primary { background-color: var(--accent-color); color: var(--primary-color); box-shadow: 0 10px 20px rgba(244, 180, 28, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 25px rgba(244, 180, 28, 0.3); }
.btn-secondary { background-color: var(--primary-color); color: var(--white); }
.btn-secondary:hover { background-color: #163650; transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid #e2e8f0; color: var(--dark-grey); }
.btn-outline:hover { border-color: var(--secondary-color); color: var(--secondary-color); }

.floating-container { position: fixed; bottom: 30px; right: 30px; z-index: 1000; display: flex; flex-direction: column; gap: 15px; }
.btn-wa {
    background-color: #25D366; color: white; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3); transition: transform 0.3s;
}
.btn-wa:hover { transform: scale(1.1); }
.btn-top {
    background-color: var(--primary-color); color: white; width: 50px; height: 50px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s; cursor: pointer; border: none;
}
.btn-top.visible { opacity: 1; visibility: visible; }

/* ==========================================
   4. ESTILOS SITIO PRINCIPAL (index.html)
   ========================================== */
.view-content { display: none; opacity: 0; transition: opacity 0.4s ease; }
.view-content.active { display: block; opacity: 1; }

.hero-swiper { width: 100%; height: 80vh; }
.hero-slide { position: relative; background-size: cover; background-position: center; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(31, 73, 106, 0.8), transparent);
    display: flex; align-items: center; padding: 0 10%;
}

.section-title {
    position: relative; padding-bottom: 15px; margin-bottom: 40px; text-align: center; font-size: 2.5rem; font-weight: 700;
}
.section-title::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 50px; height: 3px; background: var(--accent-color);
}

/* Tarjetas de Servicio (Efecto Flip 3D) */
.service-card-container { perspective: 1000px; min-height: 320px; cursor: pointer; }
.service-card-inner {
    position: relative; width: 100%; height: 100%; text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d;
}
.service-card-container.flipped .service-card-inner,
.service-card-container:hover .service-card-inner { transform: rotateY(180deg); }
.service-card-front, .service-card-back {
    position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden;
    border-radius: 20px; padding: 30px 20px; display: flex; flex-direction: column;
    justify-content: center; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    border: 1px solid #f3f4f6; background: #fff;
}
.service-card-back { background: var(--primary-color); transform: rotateY(180deg); border-color: var(--primary-color); }
.flip-hint { position: absolute; bottom: 20px; font-size: 0.75rem; color: var(--secondary-color); font-weight: 700; display: flex; align-items: center; gap: 6px; }

.blog-card { border-radius: 12px; overflow: hidden; background: white; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.swiper-pagination-bullet-active { background: var(--secondary-color) !important; }

/* ==========================================
   5. ESTILOS LANDING DE CURSO
   ========================================== */
.hero { padding: 140px 0 80px; background: radial-gradient(circle at top right, #f1f5f9 0%, #ffffff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 50px; align-items: center; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; color: var(--primary-color); line-height: 1.1; margin-bottom: 24px; }
.lead { font-size: 1.25rem; color: #64748b; margin-bottom: 32px; }

.hero-card { background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08); border: 1px solid #f1f5f9; }
.price-box { margin-bottom: 24px; }
.price { font-size: 3rem; font-weight: 800; color: var(--primary-color); }
.old-price { text-decoration: line-through; color: #94a3b8; font-size: 1.1rem; }

.bg-light { background-color: var(--light-bg); }
.section-text { text-align: center; max-width: 700px; margin: 0 auto 50px; color: #64748b; font-size: 1.1rem; }

.card { background: var(--white); padding: 35px; border-radius: var(--radius); border: 1px solid #f1f5f9; transition: all 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.04); }
.card h3 { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); margin-bottom: 15px; }

/* Módulos de Landing */
.module-item { display: flex; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid #f1f5f9; }
.module-item:last-child { border-bottom: none; }
.check-list { list-style: none; padding: 0; }
.check-list li { display: flex; gap: 12px; margin-bottom: 14px; font-weight: 500; }
.check-icon { color: var(--secondary-color); font-weight: bold; }

/* Pasos */
.step { position: relative; padding-left: 70px; margin-bottom: 40px; }
.step-num { position: absolute; left: 0; top: 0; width: 50px; height: 50px; background: var(--primary-color); color: white; border-radius: 15px; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; }

/* FAQ Accordion */
details { background: var(--white); margin-bottom: 12px; border-radius: 12px; border: 1px solid #f1f5f9; }
summary { padding: 20px; font-weight: 700; cursor: pointer; list-style: none; color: var(--primary-color); }
.details-content { padding: 0 20px 20px; color: #64748b; }

/* Sticky Mobile CTA */
.sticky-cta { position: fixed; bottom: 20px; left: 20px; right: 20px; background: var(--white); padding: 15px 20px; border-radius: 18px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); z-index: 1000; border: 1px solid #f1f5f9; }

@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .section-title { font-size: 2rem; } }
@media (min-width: 769px) { .sticky-cta { display: none; } }

/* ==========================================
   6. FORMULARIOS Y MODAL OPENPAY
   ========================================== */
.custom-input {
    width: 100%; padding: 14px 18px; border-radius: 12px; border: 1px solid #e2e8f0;
    outline: none; transition: all 0.3s ease; background-color: #f8fafc; color: var(--dark-grey);
}
.custom-input:focus { border-color: var(--secondary-color); background-color: #ffffff; box-shadow: 0 0 0 3px rgba(39, 147, 147, 0.1); }
.submit-btn {
    width: 100%; padding: 18px; background-color: var(--secondary-color); color: white;
    border-radius: 12px; font-weight: 700; font-size: 1.1rem; text-transform: uppercase;
    letter-spacing: 1px; border: none; cursor: pointer; transition: all 0.3s ease;
}
.submit-btn:hover { background-color: var(--primary-color); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(31, 73, 106, 0.2); }
.submit-btn:disabled { background-color: #94a3b8; cursor: not-allowed; transform: none; box-shadow: none; }

/* Estilización de la barra de desplazamiento del Modal */
#paymentModalContent { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
#paymentModalContent::-webkit-scrollbar { width: 8px; }
#paymentModalContent::-webkit-scrollbar-track { background: transparent; margin: 30px 0; }
#paymentModalContent::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
#paymentModalContent::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }