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

   :root {
    --gov-blue: #004884;
    --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: 50px;
    left: 50px;
    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%;
    min-height: 550px;
    height: 550px;
    overflow: hidden !important;
    border-radius: 20px !important;
    margin: 40px 0 !important; /* Margen simétrico arriba y abajo */
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    /* Fix para asegurar el redondeado en todos los navegadores */
    -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: 450px;
    margin-right: 60px;
    text-align: right;
}

.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: 991px) {
    .intro-premium {
        height: auto;
        min-height: auto;
        flex-direction: column;
        display: block !important;
    }
    .intro-premium img {
        position: relative !important;
        height: 300px !important;
    }
    .intro-premium .texto-overlay {
        max-width: 90%;
        margin: 20px auto;
        text-align: center;
    }
    .intro-premium h2, .intro-premium p {
        color: #333 !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;
    border-radius: 0 0 20px 20px; /* Quitar curvas superiores para que las pestañas no floten raras sobre bordes redondeados */
    transition: background-color 0.4s ease;
    position: relative;
    z-index: 5;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: 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: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px 40px;
    width: 100%;
    margin-bottom: 50px;
    padding-bottom: 20px;
}

/* 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; /* Clave para el centrado absoluto */
}

.folder-body .circle-icon img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 95% !important;
    max-height: 95% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
    display: block;
}

.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: 20px;
    padding-bottom: 20px;
}

.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; }
}
