/* ==============================================================
   ESTILOS EXCLUSIVOS: PÁGINA DE CURSOS (MOCKUP V2 DRUPALIZADO)
   ============================================================== */

   :root {
    --gov-blue: #0080d9;
    --suba-red: #f5333f;
    --neon-green: #5add8b;
    --dark-gray: #4b4b60;
}

/* Ocultar elementos sobrantes del layout_builder general para darle apariencia Landing */
.page-node-57 #page-wrapper .layout__region--content {
    max-width: 100% !important;
    padding: 0 !important;
}
.page-node-57 {
    overflow-x: hidden !important;
}

/* --- 1. OVERRIDE EASY CAROUSEL (CARRUSEL INICIO OVERRIDE) --- */
.page-node-57 .item.slide,
.page-node-57 .slide-content {
    background-color: transparent !important; /* Quitar franjas negras */
}
.page-node-57 .item.slide {
    position: relative;
}
.page-node-57 .slide-image {
    width: 100%;
    height: 60vh;
    position: relative;
}
.page-node-57 .slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Mover contenido y botón sobre la imagen (flotando al costado) */
.page-node-57 .slide-content {
    position: absolute;
    bottom: 30px;
    right: 50px;
    left: auto;
    width: auto !important;
    text-align: left !important;
}
.page-node-57 .slide-link {
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 18px;
    background-color: transparent !important;
    color: #f6323e !important; /* Rojo oscuro de SubaLab */
    border: 3px solid #f6323e !important;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.page-node-57 .slide-link:hover {
    transform: scale(1.1);
    background-color: #f6323e !important;
    color: white !important;
    box-shadow: 0 10px 20px rgba(246, 50, 62, 0.4);
}

/* --- 2. SECCIÓN INTRODUCCIÓN --- */
.intro-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
.intro-text h2 { font-size: 40px; font-weight: 800; color: var(--dark-gray); margin-bottom: 20px; }
.intro-text p { font-size: 18px; color: #555; line-height: 1.6; }
.intro-image {
    width: 100%; height: 300px;
    background: url('https://images.unsplash.com/photo-1552664730-d307ca884978?q=80&w=800&fit=crop') center/cover;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}








/* --- 2.1 DISEÑO CHICA FOTÓGRAFA (VERSIÓN ROBUSTA) --- */




.intro-premium {
    position: relative !important;
    width: 100%;
    height: 500px;
    overflow: hidden !important;
    border-radius: 20px !important;
    margin: 40px 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* Eliminar espacios extra que Drupal pueda meter por error */
.page-node-57 .field--name-body p:empty { display: none !important; }

.intro-premium img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
    border-radius: 20px !important;
}

.intro-premium .texto-overlay {
    position: relative !important;
    z-index: 10 !important;
    width: 100%;
    max-width: 500px;
    margin-right: 60px;
    text-align: right;
    padding: 40px;
}

.intro-premium h2, 
.intro-premium h2 strong,
.intro-premium p {
    color: #ffffff !important;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.intro-premium h2 {
    font-size: 42px !important;
    line-height: 1.1;
    margin-bottom: 15px;
}

.intro-premium p {
    font-size: 17px;
    line-height: 1.4;
}

.intro-premium .cian-destacado strong {
    color: #00e7ff !important;
    font-size: 20px;
    display: block;
    margin-top: 15px;
}

/* MÓVIL */
@media (max-width: 1400px) {
    .intro-premium {
        height: 400px;
    }
    .intro-premium .texto-overlay {
        max-width: 400px;
        margin-right: 40px;
    }
}

@media (max-width: 1200px) {
    .intro-premium {
        height: 350px;
    }
    .intro-premium .texto-overlay {
        max-width: 350px;
        margin-right: 30px;
    }
    .intro-premium h2 {
        font-size: 32px !important;
    }
}

@media (max-width: 991px) {
    .intro-premium {
        height: 400px;
        justify-content: center;
    }
    .intro-premium img {
        position: absolute !important;
    }
    .intro-premium .texto-overlay {
        position: absolute;
        max-width: 85%;
        margin: 0;
        text-align: center;
        background: rgba(0,0,0,0.6);
        padding: 30px;
        border-radius: 10px;
    }
    .intro-premium h2, .intro-premium p {
        color: #fff !important;
        text-shadow: none;
    }
}

/* ELIMINAR CUALQUIER MARGEN FORZADO ANTERIOR */
.folder-section {
    margin-top: 0 !important;
}

/* --- 3. SECCIÓN DE CARPETAS / NODOS (GENERADA POR JS) --- */
.folder-section {
    max-width: 1000px;
    width: 85%;
    margin: 40px auto;
}
.tab-container {
    display: flex;
    margin-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden; /* Fija la fuga vertical */
    padding-top: 10px; 
    scrollbar-width: none; /* Ocultar en Firefox */
}
.tab-container::-webkit-scrollbar {
    display: none; /* Ocultar barra antiestética original en Chrome */
}
.tab-btn {
    flex: 1;
    padding: 20px 10px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 20px 20px 0 0;
    opacity: 0.6;
    transition: all 0.3s ease;
    transform: translateY(10px);
}
.tab-btn.active {
    opacity: 1;
    transform: translateY(0);
    z-index: 10;
}

.folder-body {
    background-color: var(--gov-blue);
    padding: 60px 60px 40px 60px;
    border-radius: 0 0 20px 20px;
    transition: background-color 0.4s ease;
    position: relative;
    z-index: 5;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 20px 40px rgba(0,0,0,0.1);
}

.folder-title {
    font-size: 42px;
    font-weight: 900;
    margin-top: 0;
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
    grid-column: 1 / -1; /* Ocupar todo el ancho en el grid */
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: 1000px;
    gap: 40px;
    width: 100%;
    margin-bottom: 0;
    padding-bottom: 0;
    place-items: center;
}

/* Estilo del Scrollbar para el swipe */
.course-grid::-webkit-scrollbar {
    height: 10px;
}
.course-grid::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1); 
    border-radius: 10px;
}
.course-grid::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3); 
    border-radius: 10px;
}

/* Estructura del Nodo Curso individual interceptado desde views-row */
.course-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Iconos alineados arriba */
    text-align: center;
    color: inherit; /* Heredar color dinámicamente del tab seleccionado */
    scroll-snap-align: start;
}

.circle-icon {
    width: 180px;
    height: 180px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

/* Centrar enlace dentro del círculo */
.circle-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Centrar imagen en el círculo - Con enlace */
.circle-icon a img,
/* Centrar imagen en el círculo - Sin enlace */
.folder-body .circle-icon img {
    max-width: 65% !important;
    max-height: 65% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.circle-icon:hover {
    transform: scale(1.05);
}
.course-item span {
    font-size: 24px;
    font-weight: 800;
    margin-top: 10px;
    line-height: 1.2;
    max-width: 250px;
}


/* Botón flotante inferior de la carpeta */
.folder-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 60px;
    padding: 40px 0 0 0;
    border-top: none;
    position: relative;
    z-index: 15;
}

.inscribete-btn {
    background-color: var(--btn-bg, #0b2e4f);
    color: white !important;
    border: none;
    padding: 18px 60px; /* Un poco más grande y legible */
    font-size: 22px;
    font-weight: 800;
    border-radius: 50px; /* Redondeado tipo cápsula para mayor elegancia */
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}
.inscribete-btn:hover { 
    background-color: var(--btn-hover, #000); 
    color: white !important;
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--btn-bg, rgba(0,0,0,0.4));
}

/* --- 4. FORMULARIO E INSCRIPCIÓN (NUEVO DISEÑO 6 PASOS) --- */
.oferta-disponible-banner {
    background-color: #00d2ff;
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
}
.form-section {
    max-width: 1000px;
    width: 85%;
    margin: 80px auto;
    background: #64e1ff; /* Azul claro de fondo */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Imagen izq, Pasos der */
    gap: 30px;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* Imagen del celular */
.form-image {
    width: 100%; 
    height: 100%; /* Auto ajustarse */
    display: flex;
    align-items: center;
    justify-content: center;
}
.form-image img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Contenedor de los 6 pasos */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.step-box {
    background-color: white;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.step-number {
    font-size: 45px;
    font-weight: 800;
    color: #00bced; /* Azul intermedio */
    margin-right: 15px;
    line-height: 1;
}
.step-text {
    font-size: 14px;
    color: #008eb3; /* Azul oscuro para el texto */
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

/* --- 5. UBICACIONES (MAPAS RECUADRO) --- */
.maps-section {
    max-width: 1000px;
    width: 85%;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
}
.maps-section h2 { font-size: 40px; margin-bottom: 40px; color: var(--dark-gray); }
.maps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.map-box {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    text-align: left;
}
.map-box iframe {
    width: 100%;
    height: 250px;
    border: none;
}
.map-info {
    padding: 20px;
}
.map-info h4 { font-size: 20px; margin-bottom: 5px; color: var(--gov-blue); }
.map-info p { font-size: 14px; color: #666; margin-bottom: 0;}

/* Responsive Mobile */
@media (max-width: 900px) {
    .course-grid { grid-template-columns: repeat(2, 1fr); }
    .folder-body { border-radius: 20px; padding: 30px; }
}
@media (max-width: 768px) {
    .intro-section, .form-section, .maps-grid { grid-template-columns: 1fr; }
    .course-grid { grid-template-columns: repeat(2, 1fr); }
    .folder-body { border-radius: 20px; padding: 20px;} 
    .form-section { padding: 30px 20px; }
    .hero-banner h1 { font-size: 35px; }
}
@media (max-width: 600px) {
    .course-grid { grid-template-columns: 1fr; }
    .tab-btn { font-size: 14px; padding: 15px 5px; }
}

/* ========== MOSTRAR IMAGENES DE CURSOS DENTRO DE LOS CIRCULOS ========== */

/* 1. El c�rculo es la �nica caja de referencia geom�trica */
.course-grid .course-item .circle-icon {
    position: relative;
    display: block;
}

/* 2. Quitamos la relatividad al div del lapicito de Drupal para que no "secuestre" a la imagen */
.course-grid .course-item .circle-icon .contextual-region {
    position: static !important;
}

/* 3. Ocultamos el texto "Imagen" que imprime Drupal por defecto */
.course-grid .course-item .circle-icon .field__label {
    display: none !important;
}

/* 4. El enlace ocupa el 100% del c�rculo para poder hacer clic en cualquier parte */
.course-grid .course-item .circle-icon a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* 5. La imagen flota exactamente en el centro del c�rculo blanco */
.course-grid .course-item .circle-icon img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    max-width: none;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
    z-index: 10;
}

/* ========== CORRECCI�N DE LOS T�TULOS (LETRA BLANCA Y ABAJO) ========== */
.course-grid .course-item .views-field-title {
    margin-top: 15px;
    width: 100%;
    text-align: center;
}

.course-grid .course-item .views-field-title a,
.course-grid .course-item .views-field-title span {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
    display: block;
    max-width: 250px;
    margin: 0 auto;
}

.course-grid .course-item:hover .views-field-title a {
    opacity: 0.8;
}
/* =========================================
   PRESENTACIÓN DE CURSOS
   (Sección similar a "Construyendo Futuro" pero con cyan)
========================================= */
.page-node-57 {
    --pc-cyan: #00d2ff;
    --pc-text: #1a1a1a;
    --pc-gris-fondo: #5a5a5a;
}

.page-node-57 .fondo-presentacion-cursos {
    background-color: var(--pc-gris-fondo);
    padding: 60px 20px;
    margin: 40px 0;
}

.page-node-57 .seccion-presentacion-cursos {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
}

.page-node-57 .contenedor-imagenes {
    flex: 0 0 40%;
    position: relative;
}

.page-node-57 .img-logo-cursos {
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
}

.page-node-57 .img-persona-cursos {
    width: 100%;
    max-width: 350px;
    border-radius: 15px;
}

.page-node-57 .contenedor-texto {
    flex: 0 0 60%;
    color: #ffffff;
}

.page-node-57 .contenedor-texto h2 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-node-57 .resaltado-cyan {
    background-color: var(--pc-cyan);
    color: #000000;
    padding: 5px 10px;
    display: inline-block;
}

.page-node-57 .contenedor-texto p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.page-node-57 .contenedor-texto ul {
    list-style: none;
    padding-left: 0;
}

.page-node-57 .contenedor-texto li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.5;
}

.page-node-57 .contenedor-texto li::before {
    content: "•";
    color: var(--pc-cyan);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 20px;
}

/* RESPONSIVE - MÓVIL */
@media (max-width: 768px) {
    .page-node-57 .seccion-presentacion-cursos {
        flex-direction: column;
        text-align: center;
    }
    
    .page-node-57 .contenedor-imagenes {
        flex: 0 0 100%;
        width: 100%;
    }
    
    .page-node-57 .contenedor-texto {
        flex: 0 0 100%;
    }
    
    .page-node-57 .contenedor-texto h2 {
        font-size: 32px;
    }
    
    .page-node-57 .img-logo-cursos {
        max-width: 200px;
    }
    
    .page-node-57 .img-persona-cursos {
        max-width: 280px;
    }
}