/* Custom Properties (Variables) */
:root {
    --primary-color: #0F3757; /* Azul Institucional original que coincide con la imagen */
    --accent-color: #D5AA5D; /* Dorado original */
    
    /* Colores Complementarios */
    --color-amarillo: #F2A900;
    --color-naranja: #EF7B00;
    --color-verde: #31A919;
    --color-celeste: #00B5E2;

    --text-color: #374151;
    --text-light: #6B7280;
    --bg-color: #FFFFFF;
    --bg-alt: #F8FAFC;
    --white: #FFFFFF;
    
    /* Tipografía única para todo el sitio: Inter */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 25px rgba(13, 60, 97, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1150px;
    margin: 0 auto;
}

.text-left { text-align: left; }
.mb-4 { margin-bottom: 1.5rem; }

.divider {
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 1.2rem 0 1.8rem;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ------------------
   Navbar Principal
   ------------------ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 0;
    z-index: 1000;
    transition: var(--transition);
    background-color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color); /* Línea dorada definida al inicio */
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(213, 170, 93, 0.2); /* Sutil o desaparece al bajar */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 75px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.navbar.scrolled .logo img {
    height: 60px; /* Reduce tamaño al hacer scroll */
}

.logo img:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover:not(.btn-primary)::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-separator {
    width: 1px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 0.5rem;
}

.navbar .btn-primary {
    background-color: transparent;
    color: var(--accent-color) !important;
    border: 2px solid var(--accent-color);
    padding: 0.5rem 1.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
}

.navbar .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.navbar .btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Buttons Generales */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white) !important;
    border: 2px solid var(--primary-color);
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine 5s infinite;
    animation-delay: 2s;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(213, 170, 93, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-outline::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(13,60,97,0) 0%, rgba(13,60,97,0.15) 50%, rgba(13,60,97,0) 100%);
    transform: skewX(-25deg);
    animation: shine 6s infinite;
    animation-delay: 1s;
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(213, 170, 93, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.7rem 1.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
    transform: translateY(-2px);
}

.btn-pill {
    border-radius: 50px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: var(--white);
    padding-top: 80px;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 60, 97, 0.35); /* Very light translucent blue */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.hero-subtitle {
    display: block;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.2rem;
    line-height: 1.15;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    max-width: 600px;
    min-height: 55px;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
}

/* SVG Wave Divider */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 5;
}

.custom-shape-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.custom-shape-divider-bottom .shape-fill {
    fill: #FFFFFF;
}

/* Identificadores Institucionales de Sección */
.section-tag {
    display: inline-block;
    background-color: rgba(213, 170, 93, 0.15);
    color: var(--primary-color);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(213, 170, 93, 0.4);
}

/* Sections Base */
.section {
    padding: 6rem 0;
}

/* Nosotros Section */
.nosotros {
    background-color: var(--white);
    position: relative;
}

.nosotros-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.nosotros-text h2 {
    font-size: 2.2rem;
}

.nosotros-text p {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.interactive-hover:hover {
    background: transparent;
    transform: translateX(10px);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 1rem;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-left: 3px solid var(--accent-color);
    background: rgba(13, 60, 97, 0.02);
}

.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(13, 60, 97, 0.05);
    color: var(--primary-color);
    font-size: 1.35rem;
    transition: var(--transition);
}

.feature-item:hover .icon-wrapper {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.feature-item h4 {
    margin-bottom: 0.4rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.feature-item p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.nosotros-image .img-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s ease;
}

.nosotros-image .img-wrapper:hover {
    transform: scale(1.02);
}

.nosotros-image img {
    width: 100%;
    display: block;
}

/* Divisor Físico entre Secciones */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(15, 55, 87, 0.08), transparent);
    margin: 0;
}

/* Cursos Section */
.cursos {
    background-color: var(--bg-alt);
}

.cursos h2 {
    font-size: 2.2rem;
}

.cursos p.mb-4 {
    font-size: 1.05rem;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.curso-card {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    position: relative;
    transition: all 0.4s ease;
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: none;
    overflow: hidden;
}

.curso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(213,170,93,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.5s ease;
    z-index: 1;
}

.curso-card:hover::before {
    left: 200%;
}

.curso-card:hover {
    box-shadow: 0 15px 35px rgba(13, 60, 97, 0.1);
    transform: translateY(-8px);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.curso-card:hover .card-icon {
    color: var(--accent-color);
    transform: scale(1.1) translateY(-5px);
}

.curso-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.curso-card p {
    color: var(--text-color);
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(15, 55, 87, 0.08);
}

.badge {
    background-color: rgba(213, 170, 93, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    animation: pulse-badge 3s infinite;
}

@keyframes pulse-badge {
    0% { box-shadow: 0 0 0 0 rgba(213, 170, 93, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(213, 170, 93, 0); }
    100% { box-shadow: 0 0 0 0 rgba(213, 170, 93, 0); }
}

.arrow-link {
    color: var(--primary-color);
    transition: var(--transition);
    font-size: 1.1rem;
}

.curso-card:hover .arrow-link {
    color: var(--accent-color);
    transform: translateX(8px);
}

/* ------------------
   Footer Institucional Compacto
   ------------------ */
.footer-premium {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 0 0;
    border-top: 4px solid var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: block;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    max-height: 100px; /* Logotipo gigante en el footer */
    width: auto;
    display: block;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-socials {
    display: flex;
    gap: 0.8rem;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(213, 170, 93, 0.3);
    border-radius: 50%;
    color: var(--accent-color);
    transition: var(--transition);
}

.footer-socials a:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h4, .footer-contact h4 {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.curso-card-detailed {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    border: none;
}

.curso-card-detailed:hover {
    box-shadow: 0 15px 35px rgba(13, 60, 97, 0.1);
    transform: translateY(-8px);
}

.curso-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.curso-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.curso-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.curso-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.curso-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 55, 87, 0.05);
}

.curso-meta span {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.curso-meta i {
    color: rgba(213, 170, 93, 0.8); /* Dorado suavizado */
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

.btn-ver-mas {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    margin-top: auto;
}

.btn-ver-mas:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.curso-card-detailed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links ul, .footer-contact ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.footer-links ul li a i {
    font-size: 0.6rem;
    color: var(--accent-color);
    margin-right: 0.5rem;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--accent-color);
}

.footer-links ul li a:hover i {
    transform: translateX(3px);
}

.footer-contact ul li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-icon {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-right: 0.8rem;
}

.contact-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bottom-flex {
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-flex p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* ------------------
   ANIMACIONES MEJORADAS PARA SCROLL
   ------------------ */
.fade-up {
    opacity: 0;
    transform: translateY(60px); /* Aumentado para que el movimiento sea muy notorio */
    transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fade-up.visible, .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* --- STATS SECTION (Cifras de Éxito) --- */
.stats-section {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 3rem 0;
    color: var(--primary-color);
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(15, 55, 87, 0.05);
    border-bottom: 1px solid rgba(15, 55, 87, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: left;
}

.stat-item {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    justify-content: center;
}

.stat-emoji {
    font-size: 2.2rem;
    display: inline-block;
    animation: float-emoji 4s ease-in-out infinite;
    background: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

@keyframes float-emoji {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

.stat-item:nth-child(2) .stat-emoji {
    animation-delay: 1s;
}

.stat-item:nth-child(3) .stat-emoji {
    animation-delay: 2s;
}

.stat-content-wrap {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 0;
    line-height: 1;
    color: var(--primary-color);
}

.stat-number::after {
    content: '+';
    color: var(--accent-color);
}

.stat-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

/* --- MODAL DE CURSOS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 55, 87, 0.85); /* Fondo oscuro azulado */
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--white);
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 2.5rem;
    overflow-y: auto;
}

.modal-body h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-body p {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
}

.modal-meta-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 900px) {
    .nosotros-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons a {
        text-align: center;
    }
}
