/**
 * Estilos para Template: Maestría en Gobierno (Detalle)
 * Version: 1.3.7 - Banners personalizados + tablas cards responsive
 */

/* ============================================
   HERO SECTION CON IMAGEN DE FONDO
   ============================================ */
.og-maestria-hero-image {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../assets/images/banner_subpestañas.webp');
    background-size: cover;
    background-position: center 65%;
    background-repeat: no-repeat;
    padding: 60px 20px 40px;
    text-align: center;
}

/* Hero específico para páginas de Educación Continua (Consultoría, Cursos Certificados, Diplomados) */
.og-maestria-hero-image.og-hero-educacion-continua {
    background-image: url('../assets/images/Maestria_comunicacion.webp');
    background-position: center center;
    min-height: 450px;
}

/* Hero específico para páginas de Acuerdo 286 (LAEd y LGAP) */
.og-maestria-hero-image.og-hero-acuerdo-286 {
    background-image: url('../assets/images/personas_286.webp');
    background-position: center center;
    min-height: 450px;
}

/* Hero específico para páginas de Programas España (Cursos Verano y Especialización) */
.og-maestria-hero-image.og-hero-programas-espana {
    background-image: url('../assets/images/madrid_curso_verano.webp');
    background-position: center 30%;
    min-height: 550px;
}

.og-maestria-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 71, 161, 0.7);
    z-index: 1;
}

.og-maestria-hero-image .og-container {
    position: relative;
    z-index: 2;
}

.og-maestria-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.og-maestria-subtitle {
    font-size: 20px;
    font-weight: 400;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
    color: #ffffff ! important;
}

/* ============================================
   SECCIÓN AZUL CON CARRUSEL (50/50)
   ============================================ */
.og-maestria-intro-blue {
    padding: 0;
    background: #0593f3;
}

.og-maestria-intro-blue-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
    align-items: stretch;
}

.og-maestria-intro-blue-text {
    padding: 60px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0593f3;
}

.og-maestria-blue-carousel {
    max-width: 600px;
    position: relative;
}

.og-maestria-blue-carousel .og-carousel-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.og-maestria-blue-carousel .og-carousel-slide.active {
    display: block;
}

.og-maestria-blue-carousel h2 {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.og-maestria-blue-carousel p {
    font-size: 16px;
    line-height: 1.8;
    color: #ffffff ! important;
    text-align: left;
}

/* Indicadores para el carrusel azul */
.og-maestria-blue-carousel .og-carousel-indicators {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: flex-start;
}

.og-maestria-blue-carousel .og-indicator {
    width: 14px;
    height: 14px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.og-maestria-blue-carousel .og-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.og-maestria-blue-carousel .og-indicator.active {
    background: #ffffff;
    width: 16px;
    height: 16px;
}

.og-maestria-intro-blue-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.og-maestria-intro-blue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   FEATURES (3 círculos)
   ============================================ */
.og-maestria-features {
    padding: 60px 20px;
    background: #ffffff;
}

.og-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.og-feature-item {
    text-align: center;
}

.og-feature-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 61, 130, 0.3);
    transition: transform 0.3s ease;
}

.og-feature-circle:hover {
    transform: translateY(-5px);
}

.og-feature-circle svg {
    width: 50px;
    height: 50px;
}

.og-feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: #003d82;
}

/* ============================================
   BOTONES DE NAVEGACIÓN
   ============================================ */
.og-maestria-nav {
    padding: 40px 20px;
    background: #003d82;
}

.og-nav-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.og-btn-maestria-nav {
    background: #ffffff;
    color: #003d82;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #ffffff;
}

.og-btn-maestria-nav:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

/* ============================================
   PLAN DE ESTUDIOS
   ============================================ */
.og-plan-estudios {
    padding: 80px 20px;
    background: #f8f9fa;
}

.og-section-title {
    font-size: 36px;
    font-weight: 700;
    color: #003d82;
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.og-plan-intro {
    background: #4A90BF;
    /* border-left: 4px solid #ffc107; */
    padding: 20px 30px;
    margin-bottom: 40px;
    border-radius: 8px;
}

.og-plan-intro h3 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 15px;
}

.og-plan-intro ul {
    list-style: disc;
    padding-left: 20px;
    color: #fff;
}

.og-plan-intro li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.og-plan-description {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.og-plan-list {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 30px auto;
}

.og-plan-list li {
    background: #ffffff;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-left: 4px solid #003d82;
    border-radius: 6px;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.og-plan-download {
    text-align: center;
    margin: 50px 0;
}

.og-btn-download {
    display: inline-block;
    background: #003d82;
    color: #ffffff;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 61, 130, 0.3);
}

.og-btn-download:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 61, 130, 0.4);
}

/* ============================================
   TABLAS DE MALLAS CURRICULARES
   ============================================ */
.og-mallas-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.og-malla-table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.og-malla-title {
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    color: #ffffff;
    padding: 20px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 0;
}

.og-malla-table table {
    width: 100%;
    border-collapse: collapse;
}

.og-malla-table thead {
    background: #e9ecef;
}

.og-malla-table th {
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    color: #003d82;
    font-size: 14px;
    border-bottom: 2px solid #003d82;
}

.og-malla-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 15px;
    color: #333;
    text-align: center;
}

.og-malla-table tbody tr:hover {
    background: #f8f9fa;
}

.og-malla-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   TABLA DE ACTIVIDADES
   ============================================ */
.og-actividades {
    padding: 60px 20px;
    background: #ffffff;
}

.og-actividades-table {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.og-actividades-table thead {
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
    color: #ffffff;
}

.og-actividades-table th {
    padding: 20px 25px;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
}

.og-actividades-table td {
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.og-actividades-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.og-actividades-table tbody tr:hover {
    background: #e9ecef;
}

.og-actividades-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   BOTONES CTA FINALES
   ============================================ */
.og-maestria-ctas {
    padding: 60px 20px;
    background: linear-gradient(135deg, #003d82 0%, #0056b3 100%);
}

.og-ctas-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.og-btn-primary,
.og-btn-secondary {
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.og-btn-primary {
    background: #ffffff;
    color: #003d82;
    border: 2px solid #ffffff;
}

.og-btn-primary:hover {
    background: transparent;
    color: #ffffff;
}

.og-btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.og-btn-secondary:hover {
    background: #ffffff;
    color: #003d82;
}

/* ============================================
   BOTÓN FLOTANTE INSCRIBIRME AHORA
   ============================================ */
.og-floating-cta {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
    animation: pulse 2s infinite;
}

.og-btn-floating {
    display: inline-block;
    background: #003d82;
    color: #ffffff;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(0, 61, 130, 0.4);
    transition: all 0.3s ease;
    border: 2px solid #003d82;
}

.og-btn-floating:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 61, 130, 0.5);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   ACREDITACIÓN
   ============================================ */
.og-acreditacion {
    background: #f8f9fa;
    padding: 40px 20px;
    text-align: center;
}

.og-acreditacion-text {
    max-width: 900px;
    margin: 0 auto;
    font-size: 16px;
    color: #003d82;
    font-weight: 500;
    line-height: 1.8;
}

/* ============================================
   CLAUSTRO DOCENTE
   ============================================ */
.og-claustro {
    padding: 80px 20px;
    background: #ffffff;
}

.og-claustro-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 50px;
}

.og-docente-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #003d82;
    transition: all 0.3s ease;
}

.og-docente-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 61, 130, 0.15);
}

.og-docente-card h3 {
    font-size: 22px;
    color: #003d82;
    margin-bottom: 10px;
    font-weight: 700;
}

.og-docente-card p {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 10px;
}

.og-docente-card p:first-of-type {
    font-weight: 600;
    color: #0056b3;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .og-maestria-intro-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .og-mallas-container {
        grid-template-columns: 1fr;
    }
    
    .og-claustro-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .og-maestria-title {
        font-size: 36px;
    }
    
    .og-maestria-subtitle {
        font-size: 18px;
    }
    
    .og-features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .og-nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .og-btn-maestria-nav {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .og-section-title {
        font-size: 28px;
    }
    
    /* Ajustar contenedor de mallas en móvil */
    .og-mallas-container {
        gap: 20px;
        padding: 0 10px;
    }
    
    /* Ajustar título de malla */
    .og-malla-title {
        font-size: 16px;
        padding: 15px 12px;
        line-height: 1.3;
    }
    
    /* Convertir tablas a formato card en móvil */
    .og-malla-table {
        margin-bottom: 20px;
    }
    
    .og-malla-table table {
        display: block;
    }
    
    .og-malla-table thead {
        display: none; /* Ocultar encabezados en móvil */
    }
    
    .og-malla-table tbody {
        display: block;
    }
    
    .og-malla-table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .og-malla-table tr:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }
    
    .og-malla-table td {
        display: block;
        text-align: left;
        padding: 14px 15px;
        border-bottom: none;
        font-size: 14px;
        line-height: 1.6;
        color: #333;
    }
    
    /* Agregar icono bullet a cada item */
    .og-malla-table td:before {
        content: "▸";
        color: #003d82;
        font-weight: bold;
        margin-right: 8px;
    }
    
    .og-malla-table tbody tr:hover {
        background: #fff;
    }
    
    /* Tabla de actividades también responsive */
    .og-actividades-table {
        display: block;
    }
    
    .og-actividades-table thead,
    .og-actividades-table tbody,
    .og-actividades-table tr,
    .og-actividades-table th,
    .og-actividades-table td {
        display: block;
    }
    
    .og-actividades-table thead {
        display: none;
    }
    
    .og-actividades-table tr {
        margin-bottom: 10px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
    
    .og-actividades-table td {
        text-align: left;
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }
    
    .og-actividades-table td:last-child {
        border-bottom: none;
    }
    
    .og-ctas-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .og-btn-primary,
    .og-btn-secondary {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .og-maestria-hero-image {
        min-height: 300px;
        padding: 60px 15px 40px;
    }
    
    .og-maestria-title {
        font-size: 28px;
    }
    
    .og-maestria-subtitle {
        font-size: 16px;
    }
    
    .og-maestria-intro-blue-grid {
        grid-template-columns: 1fr;
        padding: 30px 15px;
        gap: 30px;
    }
    
    .og-maestria-blue-carousel h2 {
        font-size: 20px;
    }
    
    .og-maestria-blue-carousel p {
        font-size: 16px;
    }
    
    .og-maestria-intro-blue-image {
        order: -1;
    }
    
    .og-maestria-intro-text p {
        font-size: 16px;
    }
    
    .og-feature-circle {
        width: 100px;
        height: 100px;
    }
    
    .og-feature-circle svg {
        width: 40px;
        height: 40px;
    }
    
    .og-floating-cta {
        bottom: 90px;
        right: 20px;
    }
    
    .og-btn-floating {
        padding: 15px 25px;
        font-size: 16px;
    }
}

/* ============================================
   CLAUSTRO DOCENTE
   ============================================ */
.og-claustro-docente {
    background: #f5f5f5;
    padding: 60px 0;
}

.og-section-title-claustro {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #0593f3;
    text-transform: uppercase;
}

/* Mantener .og-docentes-grid para templates que no usan slider */
.og-docentes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Slider de docentes */
.og-docentes-slider {
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.og-docentes-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.og-docentes-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 0 60px;
}

.og-docente-card {
    background: white;
    padding: 25px;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Botones de navegación para docentes */
.og-docentes-prev,
.og-docentes-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(5, 147, 243, 0.8);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.og-docentes-prev:hover,
.og-docentes-next:hover {
    background: rgba(5, 147, 243, 1);
}

.og-docentes-prev {
    left: 0;
}

.og-docentes-next {
    right: 0;
}

/* Indicadores para docentes */
.og-docentes-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.og-docente-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.og-docente-dot.active {
    background: #0593f3;
}

.og-docente-dot:hover {
    background: #0593f3;
}

.og-docente-nombre {
    font-size: 16px;
    font-weight: 700;
    color: #0593f3;
    margin-bottom: 5px;
    line-height: 1.3;
}

.og-docente-titulo {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-style: italic;
}

.og-docente-bio {
    font-size: 13px;
    color: #0593f3;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   CONVOCATORIA VIGENTE
   ============================================ */
.og-convocatoria-vigente {
    background: #0593f3;
    padding: 60px 0;
}

.og-convocatoria-title {
    font-size: 28px;
    font-weight: 700;
    text-align: left;
    color: #003366;
    margin-bottom: 10px;
}

.og-convocatoria-subtitle {
    text-align: left;
    font-size: 15px;
    color: #003366;
    margin-bottom: 30px;
    font-weight: 400;
}

.og-convocatoria-table-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.og-convocatoria-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.og-convocatoria-table thead {
    background: white;
    border-bottom: 2px solid #333;
}

.og-convocatoria-table thead th {
    color: #333;
    padding: 12px 15px;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
}

.og-convocatoria-table tbody tr {
    border-bottom: 1px solid #ddd;
}

.og-convocatoria-table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    color: #333;
    text-align: center;
}

.og-convocatoria-table tbody tr:last-child {
    border-bottom: none;
}

/* ============================================
   RESPONSIVE - NUEVAS SECCIONES
   ============================================ */
@media (max-width: 768px) {
    .og-docentes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .og-docentes-slide {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 50px;
    }
    
    .og-docentes-prev,
    .og-docentes-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .og-docentes-prev {
        left: 5px;
    }
    
    .og-docentes-next {
        right: 5px;
    }
    
    .og-docente-card {
        padding: 20px;
    }
    
    .og-docente-nombre {
        font-size: 15px;
    }
    
    .og-docente-bio {
        font-size: 12px;
    }
    
    .og-convocatoria-title {
        font-size: 24px;
    }
    
    .og-convocatoria-subtitle {
        font-size: 14px;
    }
    
    .og-convocatoria-table {
        font-size: 12px;
    }
    
    .og-convocatoria-table thead th,
    .og-convocatoria-table tbody td {
        padding: 10px 8px;
    }
}
