/* ================================================= */
/* VARIABLES */
/* ================================================= */

:root {
    --primary: #006d6e;
    --secondary: #d3a81f;
    --light: #dee8e3;
    --gray: #e7e7e8;
    --gradient: linear-gradient(135deg, #6cb651, #174193);
    --shadow: 0 10px 30px rgba(0,0,0,.12);
    --transition: all .3s ease;
}

/* ================================================= */
/* RESET */
/* ================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    color: #333;
    overflow-x: hidden;
}

/* ================================================= */
/* NAVBAR */
/* ================================================= */

.custom-navbar {
    background: rgba(0, 109, 110, .95);
    backdrop-filter: blur(10px);
    transition: .3s;
}

.logo-navbar {
    height: 130px;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    margin-left: 10px;
}

.nav-link:hover {
    color: var(--secondary) !important;
}

.nav-btn {
    display: inline-block;
    padding: 10px 18px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: all .3s ease;
    position: relative;
}

.nav-btn:hover {
    background: var(--secondary);
    color: black;
    transform: translateY(-2px);
}

.nav-btn::after {
    content: '';
    width: 0%;
    height: 2px;
    background: var(--secondary);
    position: absolute;
    left: 50%;
    bottom: 0;
    transition: .3s;
}

.nav-btn:hover::after {
    width: 70%;
    left: 15%;
}

/* ================================================= */
/* HERO */
/* ================================================= */

.hero-section {
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 109, 110, .90), rgba(0, 109, 110, .85)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 50px 0;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-title span {
    color: var(--secondary);
}

.hero-text {
    margin-top: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-buttons {
    margin-top: 35px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    max-width: 90%;
    animation: float 4s ease-in-out infinite;
}

/* ================================================= */
/* ANIMACIONES */
/* ================================================= */

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ================================================= */
/* SECCIONES */
/* ================================================= */

.section-padding {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

/* ================================================= */
/* NOSOTROS */
/* ================================================= */

.info-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.info-card h3 {
    color: var(--secondary);
    font-weight: 700;
}

/* ================================================= */
/* CICLOS - CARDS */
/* ================================================= */

.cycle-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.cycle-card:hover {
    transform: translateY(-10px);
}

.cycle-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

/* ================================================= */
/* CURSOS */
/* ================================================= */

.course-card {
    background: white;
    padding: 35px;
    text-align: center;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.course-card:hover {
    transform: translateY(-10px);
    background: var(--primary);
    color: white;
}

.course-card i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.course-card:hover i {
    color: white;
}

/* ================================================= */
/* HORARIOS */
/* ================================================= */

.table {
    box-shadow: var(--shadow);
    background: white;
}

/* ================================================= */
/* PRECIOS */
/* ================================================= */

.price-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.price-card:hover {
    transform: translateY(-10px);
}

.price-card h2 {
    font-size: 3rem;
    color: var(--primary);
    margin: 20px 0;
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.price-card li {
    margin-bottom: 10px;
}

.featured-price {
    background: var(--gradient);
    color: white;
}

.featured-price h2 {
    color: white;
}

/* ================================================= */
/* BENEFICIOS */
/* ================================================= */

.benefits {
    background: var(--light);
}

.benefit-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-10px);
}

.benefit-card i {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

/* ================================================= */
/* ESTADISTICAS */
/* ================================================= */

.stats-section {
    background: var(--gradient);
    color: white;
    padding: 90px 0;
}

.stats-section h2 {
    font-size: 3rem;
    font-weight: 800;
}

/* ================================================= */
/* TESTIMONIOS */
/* ================================================= */

.testimonial-card {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    height: 100%;
}

.testimonial-card p {
    font-style: italic;
}

/* ================================================= */
/* FAQ */
/* ================================================= */

.accordion-button {
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background: var(--primary);
    color: white;
}

/* ================================================= */
/* CTA */
/* ================================================= */

.cta-section {
    background: var(--gradient);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-section h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

/* ================================================= */
/* CONTACTO */
/* ================================================= */

#contacto {
    background: #f8f9fa;
}

/* ================================================= */
/* FOOTER */
/* ================================================= */

.footer {
    background: #012f30;
    color: white;
    padding: 50px 0;
}

.footer a {
    color: white;
    font-size: 1.8rem;
    margin-left: 15px;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--secondary);
}

.footer-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    transition: .3s;
}

.footer-link:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* ================================================= */
/* BOTONES */
/* ================================================= */

.btn-warning {
    background: var(--secondary);
    border: none;
    color: #000;
    font-weight: 600;
}

.btn-warning:hover {
    background: #b78f14;
}

.btn-outline-light:hover {
    color: var(--primary);
}

/* ================================================= */
/* SCROLLBAR */
/* ================================================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* ================================================= */
/* WHATSAPP FLOTANTE */
/* ================================================= */

.floating-whatsapp {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 65px;
    height: 65px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    transition: .3s;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

.floating-whatsapp i {
    color: white;
    font-size: 2rem;
}

/* ================================================= */
/* REDES SOCIALES FLOTANTE */
/* ================================================= */

.social-floating {
    position: fixed;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
}

.social-floating a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent;
    color: #1a1a2e;
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid #1a1a2e;
}

.social-floating a:hover {
    background: #ffc107;
    color: #1a1a2e;
    border-color: #ffc107;
    transform: scale(1.1);
}

/* ================================================= */
/* VIDEO BANNER */
/* ================================================= */

.video-banner-section {
    margin-top: 76px;
    padding: 20px 0;
    background: #f8f9fa;
}

.video-banner-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.banner-video {
    width: 100%;
    height: auto;
    max-height: 650px;
    object-fit: cover;
    display: block;
}

/* ================================================= */
/* CARRUSEL UNIVERSIDADES */
/* ================================================= */

.universidades-carousel {
    margin-top: 70px;
    margin-bottom: 0;
}

.universidades-carousel img {
    height: 350px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0,0,0,.55);
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    margin: auto;
    bottom: 40px;
}

.carousel-caption h2 {
    font-weight: 700;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    margin: 0 6px !important;
}

.carousel-indicators .active {
    background-color: #ffc107;
}

/* ================================================= */
/* MODAL */
/* ================================================= */

.modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.modal-body img {
    border-radius: 15px;
}

.modal-title {
    font-size: 1.2rem;
}

/* ================================================= */
/* ANIMACIONES SCROLL (main.js) */
/* ================================================= */

.cycle-card,
.course-card,
.price-card,
.benefit-card,
.testimonial-card {
    opacity: 0;
    transform: translateY(40px);
    transition: all .8s ease;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* ================================================= */
/* SECCIÓN CICLOS - PESTAÑAS Y CARDS (VERSIÓN DEFINITIVA) */
/* ================================================= */

/* Contenedor de pestañas */
#ciclosTab {
    background: #f1f3f5 !important;
    padding: 12px !important;
    border-radius: 60px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
    border: 1px solid #dee2e6 !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* Cada botón de pestaña - ESTADO INACTIVO */
#ciclosTab .nav-link {
    border-radius: 50px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    color: #495057 !important;
    background: #ffffff !important;
    border: 2px solid #dee2e6 !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

/* Hover en pestañas inactivas */
#ciclosTab .nav-link:not(.active):hover {
    background: #e9ecef !important;
    color: #212529 !important;
    border-color: #adb5bd !important;
    transform: translateY(-2px) !important;
}

/* Pestaña ACTIVA - por defecto (se sobrescribe por universidad) */
#ciclosTab .nav-link.active {
    background: #003366 !important;
    color: #ffffff !important;
    border-color: #003366 !important;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3) !important;
}

/* Colores específicos para cada universidad cuando están ACTIVAS */
#ciclosTab .nav-link.active[data-bs-target="#tab-uni"] {
    background: #003366 !important;
    border-color: #003366 !important;
}
#ciclosTab .nav-link.active[data-bs-target="#tab-unac"] {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
}
#ciclosTab .nav-link.active[data-bs-target="#tab-sm"] {
    background: #8B0000 !important;
    border-color: #8B0000 !important;
}
#ciclosTab .nav-link.active[data-bs-target="#tab-villarreal"] {
    background: #2E4057 !important;
    border-color: #2E4057 !important;
}
#ciclosTab .nav-link.active[data-bs-target="#tab-agraria"] {
    background: #2E7D32 !important;
    border-color: #2E7D32 !important;
}
#ciclosTab .nav-link.active[data-bs-target="#tab-beca18"] {
    background: #E67E22 !important;
    border-color: #E67E22 !important;
}
#ciclosTab .nav-link.active[data-bs-target="#tab-sabatinos"] {
    background: #6A1B4D !important;
    border-color: #6A1B4D !important;
}

/* Colores de texto para cada universidad en estado INACTIVO */
#ciclosTab .nav-link[data-bs-target="#tab-uni"]:not(.active) {
    color: #003366 !important;
}
#ciclosTab .nav-link[data-bs-target="#tab-unac"]:not(.active) {
    color: #0d6efd !important;
}
#ciclosTab .nav-link[data-bs-target="#tab-sm"]:not(.active) {
    color: #8B0000 !important;
}
#ciclosTab .nav-link[data-bs-target="#tab-villarreal"]:not(.active) {
    color: #2E4057 !important;
}
#ciclosTab .nav-link[data-bs-target="#tab-agraria"]:not(.active) {
    color: #2E7D32 !important;
}
#ciclosTab .nav-link[data-bs-target="#tab-beca18"]:not(.active) {
    color: #E67E22 !important;
}
#ciclosTab .nav-link[data-bs-target="#tab-sabatinos"]:not(.active) {
    color: #6A1B4D !important;
}

/* Iconos en las pestañas */
#ciclosTab .nav-link i {
    margin-right: 6px !important;
}

/* ================================================= */
/* CARDS DE CICLOS - DENTRO DE LAS PESTAÑAS */
/* ================================================= */

/* Margen inferior para separar cards en móviles */
#ciclosTabContent .col-md-3 {
    margin-bottom: 16px !important;
}

/* Asegurar que las cards tengan altura consistente */
#ciclosTabContent .card {
    height: 100% !important;
}

/* Efecto hover en cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.hover-lift:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
}

/* Círculo de iconos en las cards */
.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
}
.hover-lift:hover .icon-circle {
    transform: scale(1.05);
}

/* Colores de fondo para los círculos de iconos */
.bg-uni-light { background: #e8f0fe; }
.bg-unac-light { background: #e3f2fd; }
.bg-sm-light { background: #fce8e8; }
.bg-villarreal-light { background: #e8ecf0; }
.bg-agraria-light { background: #e8f5e9; }
.bg-beca18-light { background: #fef3e8; }
.bg-sabatinos-light { background: #f3e5f5; }

/* Colores de texto para iconos */
.text-uni { color: #003366; }
.text-unac { color: #0d6efd; }
.text-sm { color: #8B0000; }
.text-villarreal { color: #2E4057; }
.text-agraria { color: #2E7D32; }
.text-beca18 { color: #E67E22; }
.text-sabatinos { color: #6A1B4D; }

/* Badges en cards */
.badge {
    font-weight: 500;
    padding: 6px 12px;
}

/* ================================================= */
/* RESPONSIVE */
/* ================================================= */

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    .hero-section {
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-image {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .hero-text {
        font-size: 1rem;
    }
    .stats-section h2 {
        font-size: 2.2rem;
    }
    .price-card {
        margin-bottom: 25px;
    }
    .video-banner-section {
        margin-top: 60px;
        padding: 10px 0;
    }
    .banner-video {
        max-height: 250px;
    }
    .universidades-carousel img {
        height: 220px;
    }
    .carousel-caption {
        padding: 10px;
    }
    .carousel-caption h2 {
        font-size: 1.2rem;
    }
    .carousel-caption p {
        font-size: .9rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    .section-padding {
        padding: 70px 0;
    }
    .cta-section h2 {
        font-size: 2rem;
    }
    .banner-video {
        max-height: 200px;
    }
    /* Pestañas en móvil */
    #ciclosTab .nav-link {
        padding: 6px 14px !important;
        font-size: 0.75rem !important;
    }
    #ciclosTab {
        padding: 8px !important;
        border-radius: 30px !important;
        gap: 4px !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }
    #ciclosTab::-webkit-scrollbar {
        display: none !important;
    }
    .icon-circle {
        width: 60px;
        height: 60px;
    }
    .icon-circle i {
        font-size: 1.8rem !important;
    }
}

/* En style.css */

/* Valores base para todas las secciones */
section[id] {
    scroll-margin-top: 90px;
}

/* Ajustes específicos para mejor precisión */
#inicio {
    scroll-margin-top: 0px; /* Hero sin offset */
}

#nosotros {
    scroll-margin-top: 85px;
}

#ciclos {
    scroll-margin-top: 85px;
}

#cursos {
    scroll-margin-top: 85px;
}

#horarios {
    scroll-margin-top: 85px;
}

#inversion {
    scroll-margin-top: 85px;
}

#contacto {
    scroll-margin-top: 85px;
}

/* Móviles */
@media (max-width: 991.98px) {
    section[id] {
        scroll-margin-top: 70px;
    }
    
    #inicio {
        scroll-margin-top: 0px;
    }
    
    #nosotros,
    #ciclos,
    #cursos,
    #horarios,
    #inversion,
    #contacto {
        scroll-margin-top: 65px;
    }
}

/* ============================================ */
/* CARRUSEL BANNER - VERSIÓN SIMPLE Y LIMPIA    */
/* ============================================ */

.carrusel-banner-section {
    padding-top: 80px;
    width: 100%;
    background: #f8f9fa;
}

/* Carrusel a todo el ancho */
#bannerCarousel {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Forzar altura automática en TODO */
#bannerCarousel .carousel-inner,
#bannerCarousel .carousel-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

/* La imagen define la altura. Se ve COMPLETA. */
#bannerCarousel .slide-img-principal {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    transition: none !important;
    transform: none !important;
}

/* Anular cualquier hover/zoom sobre la imagen */
#bannerCarousel .slide-img-principal:hover,
#bannerCarousel .carousel-item:hover .slide-img-principal {
    transform: none !important;
    filter: none !important;
}

/* Los botones van superpuestos encima de la imagen */
#bannerCarousel .carousel-item {
    position: relative;
}

#bannerCarousel .slide-buttons {
    position: absolute;
    bottom: 45px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    z-index: 5;
    padding: 0 20px;
}

/* Botones */
#bannerCarousel .btn-sm-slide {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border-width: 2px;
    transition: all 0.3s ease;
}

#bannerCarousel .btn-sm-slide:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Flechas */
#bannerCarousel .carousel-control-prev,
#bannerCarousel .carousel-control-next {
    width: 70px;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    z-index: 10;
    top: 0;
    bottom: 0;
    height: 100%;
}

#bannerCarousel .carousel-control-prev:hover,
#bannerCarousel .carousel-control-next:hover {
    opacity: 1;
}

#bannerCarousel .carousel-control-prev-icon,
#bannerCarousel .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8));
}

/* Indicadores */
#bannerCarousel .carousel-indicators {
    bottom: 20px;
    gap: 8px;
    z-index: 10;
    margin-bottom: 0;
}

#bannerCarousel .carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255,255,255,0.8) !important;
    background: transparent !important;
    opacity: 0.9;
    transition: all 0.3s ease;
}

#bannerCarousel .carousel-indicators button.active {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    transform: scale(1.2);
}

/* ============================================ */
/* RESPONSIVE                                    */
/* ============================================ */

@media (max-width: 992px) {
    .carrusel-banner-section { padding-top: 70px; }
    #bannerCarousel .slide-buttons { bottom: 35px; gap: 10px; }
    #bannerCarousel .btn-sm-slide { padding: 10px 24px; font-size: 0.9rem; }
}

@media (max-width: 768px) {
    .carrusel-banner-section { padding-top: 60px; }
    #bannerCarousel .slide-buttons { bottom: 30px; gap: 8px; padding: 0 10px; }
    #bannerCarousel .btn-sm-slide { padding: 8px 18px; font-size: 0.8rem; }
    #bannerCarousel .carousel-indicators { bottom: 12px; }
    #bannerCarousel .carousel-indicators button {
        width: 10px !important;
        height: 10px !important;
    }
    #bannerCarousel .carousel-control-prev,
    #bannerCarousel .carousel-control-next { width: 45px; }
    #bannerCarousel .carousel-control-prev-icon,
    #bannerCarousel .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
    }
}

@media (max-width: 576px) {
    #bannerCarousel .slide-buttons { bottom: 25px; gap: 6px; }
    #bannerCarousel .btn-sm-slide { padding: 6px 14px; font-size: 0.72rem; }
    #bannerCarousel .carousel-indicators { bottom: 10px; }
    #bannerCarousel .carousel-indicators button {
        width: 8px !important;
        height: 8px !important;
    }
}

/* ============================================ */
/* DEBUG: Forzar tamaño natural de la imagen    */
/* ============================================ */

.carrusel-banner-section {
    padding-top: 140px !important;  /* Más espacio para el navbar real (130px + margen) */
}

#bannerCarousel,
#bannerCarousel .carousel-inner,
#bannerCarousel .carousel-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

#bannerCarousel .carousel-item img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    transition: none !important;
    transform: none !important;
}

#bannerCarousel .carousel-item img:hover,
#bannerCarousel .carousel-item:hover img {
    transform: none !important;
}