/* --- VARIABLES DE DISEÑO --- */
:root {
    --brand-red: #D80000;
    --brand-red-dark: #a80000;
    --brand-dark: #1a1a1a;
    --brand-gray: #f4f4f4;
    --text-color: #333;
    --white: #ffffff;
    --font-headings: 'Chakra Petch', sans-serif;
    --font-subheadings: 'Rajdhani', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --header-height: 65px;
}

/* --- RESET Y BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-color); line-height: 1.6; background-color: var(--white); overflow-x: hidden; }
body.modal-open, body.menu-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-headings); text-transform: uppercase; font-weight: 700; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* --- COMPONENTES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

.btn { 
    display: inline-block; 
    padding: 12px 25px; 
    background-color: var(--brand-red); 
    color: var(--white); 
    font-family: var(--font-subheadings); 
    font-weight: 700; 
    font-size: 1rem; 
    text-transform: uppercase; 
    border-radius: 4px; 
    border: 2px solid var(--brand-red); 
    cursor: pointer; 
    letter-spacing: 1px; 
    text-align: center;
    transition: 0.3s ease;
}
.btn:hover { background-color: var(--white); color: var(--brand-red); }

.btn-outline { background-color: transparent; border: 2px solid var(--white); color: var(--white); }
.btn-outline:hover { background-color: var(--white); color: var(--brand-red); border-color: var(--white); }

.section-padding { padding: clamp(50px, 8vw, 100px) 0; }
.section-header { text-align: center; margin-bottom: clamp(30px, 5vw, 60px); }
.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--brand-dark); margin-bottom: 10px; }
.section-header .line { width: 80px; height: 4px; background-color: var(--brand-red); margin: 0 auto; }

/* --- HEADER Y MENÚ MÓVIL --- */
header { 
    background-color: var(--white); 
    box-shadow: 0 2px 15px rgba(0,0,0,0.1); 
    position: fixed; 
    width: 100%; 
    z-index: 1000; 
    top: 0; 
    height: var(--header-height);
    display: flex;
    align-items: center;
}
nav { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo-container img { max-height: 35px; width: auto; display: block; }

/* Navegación Escritorio */
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { font-family: var(--font-subheadings); font-weight: 700; font-size: 1rem; text-transform: uppercase; color: var(--brand-dark); }
.nav-links a:hover { color: var(--brand-red); }

.nav-social { display: flex; gap: 18px; align-items: center; font-size: 1.2rem; }
.nav-social a { color: var(--brand-dark); }
.nav-social a:hover { color: var(--brand-red); }

.mobile-menu-btn { 
    display: none; 
    font-size: 1.8rem; 
    cursor: pointer; 
    color: var(--brand-dark); 
}

/* Menú Lateral Móvil */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--white);
    z-index: 1100;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 40px 30px;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.mobile-nav.active { right: 0; }
.mobile-nav .close-menu { align-self: flex-end; font-size: 2rem; cursor: pointer; margin-bottom: 20px; }
.mobile-nav a { font-family: var(--font-subheadings); font-weight: 700; font-size: 1.3rem; text-transform: uppercase; }
.mobile-nav .social-mobile { margin-top: auto; display: flex; gap: 20px; font-size: 1.5rem; color: var(--brand-red); }

.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    display: none;
}
.overlay.active { display: block; }

/* --- SLIDER --- */
.slider-container { position: relative; height: 100vh; width: 100%; overflow: hidden; background-color: #000; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; display: grid; grid-template-columns: 60fr 40fr; align-items: center; background-size: cover; background-position: center; }
.slide.active { opacity: 1; z-index: 1; }
.slide::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1; }

.slide-content { position: relative; z-index: 2; text-align: left; color: var(--white); padding: 0 clamp(20px, 4vw, 50px) 0 clamp(50px, 8vw, 120px); grid-column: 1; }
.slide-content h1 { font-size: clamp(1.8rem, 4vw, 3.2rem); margin-bottom: 20px; line-height: 1.1; letter-spacing: 2px; }
.slide-content p { font-size: clamp(1rem, 2vw, 1.2rem); margin-bottom: 30px; max-width: 500px; }

.slider-arrow { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 10; 
    background: rgba(0,0,0,0.3); 
    color: white; 
    width: clamp(40px, 8vw, 55px); 
    height: clamp(40px, 8vw, 55px); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    border-radius: 50%; 
    transition: 0.3s; 
    border: 1px solid rgba(255,255,255,0.2); 
}
.slider-arrow:hover { background: var(--brand-red); border-color: var(--brand-red); }
.arrow-left { left: 15px; }
.arrow-right { right: 15px; }

.fixed-slider-image { 
    position: absolute; 
    bottom: 0; 
    left: 73%; 
    z-index: 20; 
    height: 100vh; 
    width: auto; 
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); 
    animation: floatLogo 3s ease-in-out infinite; 
    transform: translateX(-50%);
}
@keyframes floatLogo { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-12px); } }

/* --- VERIFICAR CERTIFICADO --- */
.verify-section {
    background-color: var(--brand-dark);
    padding: clamp(40px, 6vw, 70px) 0;
}
.verify-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}
.verify-text h2 {
    color: var(--white);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 8px;
}
.verify-text p {
    color: #aaa;
    font-size: 1rem;
    font-family: var(--font-body);
}
.verify-text .line { width: 60px; height: 4px; background-color: var(--brand-red); margin-bottom: 12px; }
@media (max-width: 768px) {
    .verify-inner { flex-direction: column; text-align: center; }
    .verify-text .line { margin: 0 auto 12px; }
}

/* --- SOBRE NOSOTROS --- */
.about-section { background-color: var(--white); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 60px); align-items: center; }
.about-text h3 { color: var(--brand-red); margin-bottom: 20px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.about-text p { margin-bottom: 20px; color: #555; font-size: 1rem; }
.about-image img { border-radius: 8px; box-shadow: 15px 15px 0px var(--brand-red); }
.values-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.value-box { background: var(--brand-gray); padding: 20px; border-left: 4px solid var(--brand-red); border-radius: 4px; }
.value-box h4 { font-size: 1rem; color: var(--brand-dark); margin-bottom: 5px; }

/* Fila Misión / Visión debajo de la grilla principal */
.mission-vision-row { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-top: 40px; }
.mission-vision-row .value-box { padding: 28px 30px; }
.mission-vision-row .value-box h4 { font-size: 1.1rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
@media (max-width: 768px) { .mission-vision-row { grid-template-columns: 1fr; } }

/* --- VALORES CORPORATIVOS --- */
.valores-section { background-color: var(--brand-gray); }
.corp-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 25px;
}
.corp-value-card {
    background: var(--white);
    padding: 30px 25px;
    border-radius: 8px;
    border-top: 4px solid var(--brand-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: 0.3s;
}
.corp-value-card:hover { transform: translateY(-6px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }
.corp-value-card i { font-size: 2.5rem; color: var(--brand-red); margin-bottom: 15px; display: block; }
.corp-value-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--brand-dark); }
.corp-value-card p { font-size: 0.9rem; color: #666; line-height: 1.6; }

/* --- MÁS PROGRAMAS --- */
.programs-subtitle {
    font-family: var(--font-headings);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: var(--brand-dark);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--brand-red);
}
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}
.program-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--white);
    padding: 22px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    border-left: 4px solid var(--brand-red);
    transition: 0.3s;
}
.program-item:hover { transform: translateX(5px); box-shadow: 0 6px 18px rgba(0,0,0,0.1); }
.program-item > i { font-size: 1.8rem; color: var(--brand-red); margin-top: 3px; flex-shrink: 0; }
.program-item h4 { font-family: var(--font-subheadings); font-size: 1.05rem; color: var(--brand-dark); margin-bottom: 5px; text-transform: uppercase; }
.program-item p { font-size: 0.88rem; color: #666; line-height: 1.5; }

/* --- CURSOS --- */
.courses { background-color: var(--brand-gray); }
.course-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); 
    gap: 30px; 
}
.course-card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border-bottom: 5px solid var(--brand-red); height: 100%; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.course-img { height: 220px; background-size: cover; background-position: center; }
.course-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.course-content h3 { margin-bottom: 10px; color: var(--brand-dark); font-size: 1.3rem; }
.course-content ul { margin: 15px 0; flex-grow: 1; }
.course-content li { font-size: 0.95rem; margin-bottom: 8px; color: #555; display: flex; align-items: center; }
.course-content li i { color: var(--brand-red); margin-right: 10px; font-size: 0.8rem; }

/* Card horizontal: Nivel Jefe de Área */
.course-card-horizontal {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    margin-top: 25px;
    height: auto;
    border-bottom: none;
    border-left: 5px solid var(--brand-red);
}
.course-card-horizontal .course-img-h {
    height: 100%;
    min-height: 220px;
}
.course-card-horizontal .course-content-h-text {
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #eee;
}
.course-card-horizontal .course-content-h-text h3 { margin-bottom: 14px; }
.course-card-horizontal .course-content-h-details {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--brand-gray);
    gap: 20px;
}
.course-card-horizontal .course-content-h-details ul { flex-grow: 0; }

@media (max-width: 768px) {
    .course-card-horizontal {
        grid-template-columns: 1fr;
        border-left: none;
        border-bottom: 5px solid var(--brand-red);
    }
    .course-card-horizontal .course-img-h { height: 220px; }
    .course-card-horizontal .course-content-h-text { border-right: none; }
    .course-card-horizontal .course-content-h-details { background: var(--white); }
}

/* --- CARACTERÍSTICAS / GARANTÍAS --- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; max-width: 1000px; margin: 0 auto; }
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }
@media (min-width: 769px) and (max-width: 992px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
.feature-item i { font-size: 3.5rem; color: var(--brand-red); margin-bottom: 20px; }
.feature-item h3 { margin-bottom: 15px; font-size: 1.3rem; }

/* --- CTA BANNER --- */
.cta-banner { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), url('https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80'); 
    background-size: cover; 
    background-position: center; 
    background-attachment: fixed; 
    color: var(--white); 
    text-align: center; 
    padding: clamp(60px, 10vw, 100px) 20px; 
}
.cta-banner h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin-bottom: 20px; }

/* --- CONTACTO --- */
.contact-cards-wrapper { display: flex; justify-content: center; gap: 20px; margin-top: 40px; flex-wrap: wrap; }
.contact-card-item { background: #f8f8f8; padding: clamp(20px, 5vw, 35px); border-radius: 8px; border-bottom: 4px solid var(--brand-red); width: 100%; max-width: 350px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center; }
.contact-card-item i { color: var(--brand-red); font-size: 2.5rem; margin-bottom: 15px; display: block; }
.contact-card-item p { word-break: break-all; }

/* --- FOOTER --- */
footer { background-color: #111; color: #aaa; padding: 60px 0 20px 0; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--white); margin-bottom: 25px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a:hover { color: var(--brand-red); cursor: pointer; }
.social-links a { font-size: 1.5rem; color: var(--white); transition: 0.3s; }
.social-links a:hover { color: var(--brand-red); }
.copyright { text-align: center; border-top: 1px solid #222; padding-top: 30px; margin-top: 20px; }

/* --- MODALES --- */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px); }
.modal-content { 
    background-color: var(--white); 
    margin: 5vh auto; 
    padding: clamp(30px, 5vw, 50px); 
    border-radius: 12px; 
    width: 95%; 
    max-width: 850px; 
    position: relative; 
    max-height: 90vh; 
    overflow-y: auto; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.modal-content h2 { margin-bottom: 25px; color: var(--brand-red); border-bottom: 2px solid var(--brand-gray); padding-bottom: 15px; }
.modal-content h3 { margin: 25px 0 10px; color: var(--brand-dark); font-size: 1.2rem; }
.modal-content p, .modal-content li { font-size: 0.95rem; color: #444; margin-bottom: 15px; line-height: 1.7; }
.modal-content ul { margin-left: 20px; margin-bottom: 20px; list-style-type: disc; }
.modal-content li { margin-bottom: 8px; }
.close-modal { position: absolute; top: 15px; right: 20px; color: #888; font-size: 2rem; cursor: pointer; transition: 0.3s; }
.close-modal:hover { color: var(--brand-red); }

/* --- WHATSAPP --- */
.whatsapp-float { position: fixed; width: clamp(50px, 12vw, 65px); height: clamp(50px, 12vw, 65px); bottom: 25px; right: 25px; background-color: #25d366; color: #FFF; border-radius: 50%; text-align: center; font-size: 2rem; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 900; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.whatsapp-float:hover { transform: scale(1.1); background-color: var(--brand-red); }

/* --- ANIMACIONES --- */
.scroll-reveal { opacity: 0; transform: translateY(40px); transition: 0.8s ease-out; }
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }
.scroll-item { opacity: 0; transition: 1s ease-out; }
.from-left { transform: translateX(-50px); }
.from-right { transform: translateX(50px); }
.from-bottom { transform: translateY(50px); }
.scroll-item.visible { opacity: 1; transform: translate(0, 0); }

/* Retrasos para cascada */
.delay-1-5s { transition-delay: 0.3s; }
.delay-3s { transition-delay: 0.6s; }

/* --- RESPONSIVE ESPECÍFICO --- */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-image { order: -1; }
    .about-image img { box-shadow: 10px 10px 0px var(--brand-red); max-width: 90%; margin: 0 auto; }
}

@media (max-width: 768px) {
    :root { --header-height: 55px; }
    .nav-links, .nav-cta, .nav-social { display: none; }
    .mobile-menu-btn { display: block; }
    .cta-banner { background-attachment: scroll; }
    .slide { grid-template-columns: 1fr; }
    .slide-content { text-align: center; padding: 0 20px; margin-top: 55px; }
    .fixed-slider-image { left: 50%; height: 40vh; pointer-events: none; }
}
