/* =========================================
   VARIABLES GLOBALES
========================================= */
:root {
    --primary-main: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --text-dark: #334155;
    --text-gray: #64748b;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --warning: #f59e0b;
    --font-ui: 'Inter', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --space-sm: 10px;
    --space-md: 20px;
    --space-lg: 40px;
    --space-xl: 80px;
    --radius: 12px;
}

/* =========================================
   RESETEO Y BASES
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-dark); background-color: var(--white); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-ui); color: var(--secondary); line-height: 1.2; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.highlight { color: var(--primary-main); }
.text-center { text-align: center; }

.section-title { margin-bottom: var(--space-xl); }
.section-title h2 { font-size: 2.5rem; margin-bottom: 15px; }
.section-title p { color: var(--text-gray); font-size: 1.1rem; }

/* =========================================
   BOTONES
========================================= */
.btn-primary-large { display: inline-block; background: var(--primary-main); color: var(--white); padding: 15px 30px; border-radius: 8px; font-weight: 600; font-size: 1.1rem; transition: background 0.3s ease, transform 0.2s ease; }
.btn-primary-large:hover { background: var(--primary-dark); transform: translateY(-2px); color: white; }
.btn-outline-large { display: inline-block; background: transparent; color: var(--secondary); border: 2px solid var(--secondary); padding: 13px 30px; border-radius: 8px; font-weight: 600; font-size: 1.1rem; transition: all 0.3s ease; }
.btn-outline-large:hover { background: var(--secondary); color: var(--white); }

/* =========================================
   NAVEGACIÓN
========================================= */
.navbar { background: var(--white); padding: 15px 0; box-shadow: 0 2px 15px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 900; color: var(--secondary); font-family: var(--font-ui); }
.logo .dot { color: var(--primary-main); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 500; color: var(--text-dark); transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-main); }
.btn-aula { background: var(--primary-main); color: var(--white) !important; padding: 10px 20px; border-radius: 6px; font-weight: 600 !important; }
.btn-aula:hover { background: var(--primary-dark); }

/* =========================================
   HERO SECTION (INICIO)
========================================= */
.hero-section { background-color: var(--bg-light); padding: 100px 0; }
.hero-container { display: flex; align-items: center; gap: 50px; }
.hero-content { flex: 1; }
.hero-badge { background: rgba(37, 99, 235, 0.1); color: var(--primary-main); padding: 5px 15px; border-radius: 20px; font-weight: 600; font-size: 0.9rem; display: inline-block; margin-bottom: 20px; }
/* TAMAÑO DE TÍTULO REDUCIDO AQUÍ (Antes 3.5rem) */
.hero-content h1 { font-size: 2.8rem; margin-bottom: 20px; }
.hero-content p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 30px; font-weight: 400; }
.hero-buttons { display: flex; gap: 15px; }

.hero-image { flex: 1; width: 100%; max-width: 500px; margin: 0 auto; }
.hero-swiper { width: 100%; padding-top: 20px; padding-bottom: 20px; }
.hero-swiper .swiper-slide { width: 300px; height: 400px; border-radius: 20px; overflow: hidden; box-shadow: 0 15px 30px rgba(0,0,0,0.15); transition: filter 0.4s ease, opacity 0.4s ease; }
.hero-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-swiper .swiper-slide:not(.swiper-slide-active) { filter: blur(4px); opacity: 0.6; }

/* =========================================
   AVALES SECTION 
========================================= */
.avales-section { padding: var(--space-xl) 0; background: var(--secondary); color: var(--white); text-align: center; }
.avales-header h2 { color: var(--white); margin-bottom: 10px; font-size: 2rem; }
.avales-header p { color: #cbd5e1; margin-bottom: 40px; }
.avales-swiper .swiper-slide { height: auto; }
.aval-card { display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.05); padding: 40px 20px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.1); transition: transform 0.3s, background 0.3s; height: 100%; cursor: pointer; color:white; }
.aval-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.1); color:white;}
.aval-icon { font-size: 3rem; color: var(--primary-main); margin-bottom: 20px; }
.aval-card h3 { color: var(--white); margin-bottom: 15px; }
.aval-card p { color: #94a3b8; font-size: 0.95rem; margin: 0; }
.swiper-pagination-avales .swiper-pagination-bullet { background: rgba(255,255,255,0.5); }
.swiper-pagination-avales .swiper-pagination-bullet-active { background: var(--white); }

/* =========================================
   NOSOTROS SECTION 
========================================= */
.nosotros-section { padding: 100px 0; background: var(--white); }
.nosotros-container { display: flex; align-items: center; gap: 60px; }
.static-image-container { flex: 1; }
.static-image-container img { width: 100%; border-radius: 20px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.nosotros-content { flex: 1; }
.nosotros-content h2 { font-size: 2.5rem; margin-bottom: 20px; }
.nosotros-content p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 30px; }
.nosotros-lista li { font-size: 1.05rem; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; color: var(--text-dark); }
.nosotros-lista li i { color: #10b981; background: #d1fae5; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }

/* =========================================
   CURSOS SECTION 
========================================= */
.cursos-section { padding: 100px 0; background: var(--bg-light); }
.cursos-wrapper { position: relative; padding: 0 60px; }
.cursos-nav-prev, .cursos-nav-next { color: var(--primary-main) !important; background: white; width: 50px !important; height: 50px !important; border-radius: 50%; box-shadow: 0 4px 15px rgba(0,0,0,0.1); position: absolute; top: 45%; transform: translateY(-50%); z-index: 10; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cursos-nav-prev { left: 0; } .cursos-nav-next { right: 0; }
.cursos-nav-prev:after, .cursos-nav-next:after { font-size: 1.2rem !important; font-weight: 900; }
.cursos-swiper .swiper-slide { height: auto; }
.curso-card { display: flex; flex-direction: column; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, border 0.3s ease; border: 2px solid transparent; height: 100%; color:var(--text-dark);}
.curso-card:hover { transform: translateY(-10px); border-color: var(--primary-main); color:var(--text-dark);}
.curso-img { height: 220px; background-size: cover; background-position: center; flex-shrink: 0; }
.curso-body { padding: 30px 25px; flex-grow: 1; display: flex; flex-direction: column; }
.curso-body h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--secondary); }
.curso-body p { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 20px; line-height: 1.5; flex-grow: 1; }
.curso-meta { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eee; padding-top: 15px; margin-top: auto; }
.curso-meta span { color: var(--primary-main); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.btn-inscribir { color: var(--secondary); font-weight: 700; font-size: 0.95rem; transition: color 0.2s; }
.curso-card:hover .btn-inscribir { color: var(--primary-main); }

/* =========================================
   TESTIMONIOS SECTION
========================================= */
.testimonios-section { padding: 100px 0; background: var(--white); }
.testimonios-swiper .swiper-slide { height: auto; }
.testimonio-card { display: flex; flex-direction: column; background: var(--bg-light); padding: 40px; border-radius: var(--radius); border-left: 4px solid var(--warning); transition: transform 0.3s ease; height: 100%; }
.testimonio-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); border-left-color: var(--primary-main); }
.estrellas { color: var(--warning); margin-bottom: 15px; }
.testimonio-texto { font-style: italic; color: var(--text-dark); font-size: 1.05rem; margin-bottom: 20px; flex-grow: 1; }
.testimonio-autor { margin-top: auto; }
.testimonio-autor h4 { margin: 0; font-size: 1.1rem; color: var(--secondary); transition: color 0.3s; }
.testimonio-autor span { color: var(--text-gray); font-size: 0.9rem; display: flex; align-items: center; }
.ver-video-btn { color: var(--primary-main); font-size: 0.8rem; margin-left: 10px; opacity: 0; transition: opacity 0.3s; }
.testimonio-card:hover .ver-video-btn { opacity: 1; }

/* =========================================
   ESTILOS DE ADMINISTRADOR (NUEVO)
========================================= */
.admin-only-landing {
    display: none; /* Se activa con JS si es admin */
    position: absolute;
    z-index: 99;
    padding: 8px 15px;
    background: #10b981;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    align-items: center;
    gap: 5px;
}
.admin-overlay {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 10;
}
.admin-overlay button, .admin-del-btn {
    background: rgba(255,255,255,0.9);
    border: none; width: 35px; height: 35px; border-radius: 50%;
    cursor: pointer; color: #d9534f; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.admin-del-btn { position: absolute; top:10px; right:10px; z-index:10; }

.modal-admin {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
}
.modal-admin-content {
    background: white; padding: 30px; border-radius: 12px;
    width: 90%; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* =========================================
   FOOTER Y RESPONSIVE
========================================= */
.footer { background-color: var(--secondary); color: #fff; padding: 80px 0 0; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: var(--white); font-size: 1.8rem; margin-bottom: 20px; }
.footer-col h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background-color: var(--primary-main); }
.footer-col p { color: #cbd5e1; margin-bottom: 20px; }
.social-links { display: flex; gap: 15px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%; color: var(--white); transition: 0.3s; }
.social-links a:hover { background: var(--primary-main); transform: translateY(-3px); }
.footer-col ul li { margin-bottom: 15px; }
.footer-col ul li a { color: #cbd5e1; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--primary-main); padding-left: 8px; }

@media (max-width: 992px) {
    .hero-container, .nosotros-container { flex-direction: column; text-align: center; }
    .hero-buttons { justify-content: center; }
    .nosotros-lista li { justify-content: center; text-align: left; }
    .hero-swiper .swiper-slide { width: 250px; height: 350px; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-swiper .swiper-slide { width: 220px; height: 320px; }
    .cursos-wrapper { padding: 0; }
    .cursos-nav-prev, .cursos-nav-next { display: none !important; }
}

/* =========================================
   ESTILOS PARA LA LISTA ARRASTRABLE DEL MODAL (NUEVO)
========================================= */
.admin-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.admin-item-row {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.admin-item-row:hover {
    background: #f1f5f9;
}

.drag-handle {
    cursor: grab;
    color: #94a3b8;
    padding: 0 10px;
    font-size: 1.2rem;
}

.drag-handle:active {
    cursor: grabbing;
}

.admin-item-thumb {
    width: 60px;
    height: 40px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-item-info {
    flex-grow: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
}

.admin-item-row .btn-icon.delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: transform 0.2s;
}

.admin-item-row .btn-icon.delete:hover {
    transform: scale(1.2);
}

/* Efecto visual mientras se arrastra (Clase agregada por SortableJS) */
.sortable-ghost {
    opacity: 0.4;
    background: #e2e8f0;
}

/* =========================================
   ESTILOS PARA LA LISTA ARRASTRABLE DEL MODAL
========================================= */
.admin-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.admin-item-row {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.admin-item-row:hover { background: #f1f5f9; }

.drag-handle {
    cursor: grab; color: #94a3b8; padding: 0 10px; font-size: 1.2rem;
}
.drag-handle:active { cursor: grabbing; }

.admin-item-thumb {
    width: 60px; height: 40px; background-size: cover; background-position: center;
    border-radius: 4px; margin-right: 15px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-item-icon {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: #e2e8f0; border-radius: 4px; margin-right: 15px; color: var(--primary-main); font-size: 1.2rem;
}

.admin-item-info {
    flex-grow: 1; font-size: 0.9rem; font-weight: 500; color: var(--secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 10px;
}

.admin-item-row .btn-icon.delete {
    background: none; border: none; color: #ef4444; cursor: pointer;
    padding: 5px; font-size: 1rem; transition: transform 0.2s;
}
.admin-item-row .btn-icon.delete:hover { transform: scale(1.2); }

.sortable-ghost { opacity: 0.4; background: #e2e8f0; }

/* Oculta los botones rojos invasivos de los carruseles si aún quedaran rastros en el CSS */
.admin-overlay { display: none !important; }

/* =========================================
   MENÚ LATERAL (SIDEBAR DE CURSOS)
========================================= */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 2000;
    display: none; opacity: 0; transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; }

.sidebar {
    position: fixed; top: 0; left: -320px; width: 300px; height: 100%;
    background: var(--white); z-index: 2001; transition: left 0.3s ease;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column;
}
.sidebar.active { left: 0; }

.sidebar-header {
    background: var(--secondary); color: var(--white); padding: 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.sidebar-header h3 { color: var(--white); margin: 0; font-size: 1.2rem; }
.sidebar-header button {
    background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer;
}

.sidebar-list {
    padding: 20px; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 15px;
}
.sidebar-course-item {
    display: flex; gap: 15px; align-items: center; padding-bottom: 15px;
    border-bottom: 1px solid #eee; transition: transform 0.2s ease; cursor: pointer;
}
.sidebar-course-item:hover { transform: translateX(5px); }
.sidebar-course-img {
    width: 60px; height: 60px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0;
}
.sidebar-course-info h4 { margin: 0 0 5px 0; font-size: 0.95rem; color: var(--secondary); line-height: 1.2; }
.sidebar-course-info p { margin: 0; font-size: 0.8rem; color: var(--text-gray); }

/* Botón Hamburguesa */
.btn-menu {
    background: none; border: none; font-size: 1.5rem; color: var(--secondary); cursor: pointer; margin-right: 15px;
}