/* =========================================
   PÁGINA DE DETALLE DE DIPLOMADO (Lujo)
   ========================================= */

/* --- Hero Banner --- */
.dip-det-hero {
    position: relative;
    padding: 100px 5% 120px;
    background: linear-gradient(to right, rgba(23, 27, 77, 0.95) 0%, rgba(23, 27, 77, 0.6) 100%),
        url('https://images.unsplash.com/photo-1514933651103-005eec06c04b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: var(--white);
}

.dip-det-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.dip-det-badge {
    align-self: flex-start;
    background: var(--primary-red);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.dip-det-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 800px;
}

.dip-det-hero p {
    font-size: 1.15rem;
    color: #cbd5e1;
    max-width: 700px;
    font-weight: 300;
    line-height: 1.6;
}

/* --- Barra de Resumen (Flotante) --- */
.dip-stats-bar {
    max-width: 1400px;
    margin: -50px auto 50px;
    /* Sube para superponerse al hero */
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(23, 27, 77, 0.08);
    display: flex;
    position: relative;
    z-index: 10;
    border-bottom: 4px solid var(--yellow);
}

.dip-stat-item {
    flex: 1;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-right: 1px solid rgba(23, 27, 77, 0.05);
}

.dip-stat-item:last-child {
    border-right: none;
}

.dip-stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(186, 19, 24, 0.08);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-red);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.dip-stat-text span {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.dip-stat-text strong {
    display: block;
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- Layout Principal --- */
.dip-det-layout {
    display: flex;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% 100px;
    align-items: flex-start;
}

.dip-main-content {
    flex: 1;
    min-width: 0;
}

/* Títulos de sección internos */
.dip-section-title {
    color: var(--primary-blue);
    font-size: 2rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.dip-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--yellow);
}

.dip-main-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Lista de Beneficios (Grid) */
.dip-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dip-benefit-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-red);
}

.dip-benefit-card h4 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.dip-benefit-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Acordeón de Malla Curricular */
.dip-accordion .card {
    border: 1px solid rgba(23, 27, 77, 0.08);
    border-radius: 8px !important;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.dip-accordion .card-header {
    background-color: var(--white);
    border-bottom: none;
    padding: 0;
    border-radius: 8px !important;
}

.dip-accordion .btn-link {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    width: 100%;
    text-align: left;
    padding: 20px 25px;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dip-accordion .btn-link:hover {
    text-decoration: none;
    background: #f8fafc;
}

.dip-accordion .btn-link::after {
    content: '+';
    color: var(--primary-red);
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.dip-accordion .btn-link[aria-expanded="true"]::after {
    content: '-';
    transform: rotate(180deg);
}

.dip-list-item {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.dip-list-item::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--yellow);
    font-weight: bold;
}

/* Certificación */
.dip-cert-box {
    display: flex;
    align-items: center;
    gap: 25px;
    background: var(--bg-light);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(23, 27, 77, 0.05);
}

.dip-cert-icon {
    font-size: 3rem;
    color: var(--yellow);
}

/* --- Sidebar Formulario (Derecha) --- */
.dip-sidebar {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

/* --- Botón Descargar Sílabo --- */
.btn-outline-lux {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-outline-lux:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* =========================================
   SECCIÓN: LOGÍSTICA (TIEMPO Y HORARIOS)
   ========================================= */
.dip-logistics-box {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(23, 27, 77, 0.08);
    margin-bottom: 50px;
}

.logistics-col {
    padding: 40px;
    flex: 1;
}

.time-col {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-red);
}

.time-col h4 {
    color: var(--primary-blue);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.time-col p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.7;
}

.time-col strong {
    color: var(--primary-red);
}

.schedule-col {
    background: var(--primary-blue);
    color: var(--white);
    position: relative;
}

.schedule-col::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.schedule-col h4 {
    color: var(--yellow);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.schedule-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.schedule-day {
    font-weight: 600;
    font-size: 1.05rem;
}

.schedule-hours {
    color: #cbd5e1;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

/* =========================================
   SECCIÓN: CARRUSEL MODULAR
   ========================================= */
.dip-modules-section {
    position: relative;
    margin-bottom: 70px;
}

.dip-modules-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.dip-modules-header-row .dip-section-title {
    margin: 0;
}

.dip-slider-controls {
    display: flex;
    gap: 15px;
}

.btn-mod-slider {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(23, 27, 77, 0.2);
    background: var(--white);
    color: var(--primary-blue);
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.btn-mod-slider:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(23, 27, 77, 0.15);
}

.dip-modules-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    padding-top: 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.dip-modules-track::-webkit-scrollbar {
    display: none;
}

.dip-module-card {
    flex: 0 0 calc(50% - 15px);
    scroll-snap-align: start;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(23, 27, 77, 0.02);
}

.dip-module-card:hover {
    border-color: var(--primary-red);
    box-shadow: 0 15px 35px rgba(23, 27, 77, 0.08);
    transform: translateY(-5px);
}

.dip-module-card::before {
    content: attr(data-module);
    position: absolute;
    top: -15px;
    right: 5px;
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(212, 175, 55, 0.08);
    z-index: 1;
    pointer-events: none;
    transition: color 0.4s ease;
}

.dip-module-card:hover::before {
    color: rgba(186, 19, 24, 0.06);
}

.dip-module-header {
    position: relative;
    z-index: 2;
    margin-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.dip-module-eyebrow {
    color: var(--primary-red);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 8px;
}

.dip-module-header h4 {
    color: var(--primary-blue);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.dip-module-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.dip-module-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.dip-module-icon {
    color: var(--yellow);
    flex-shrink: 0;
    margin-top: 3px;
}

/* =========================================
   SECCIONES EXTRAS (EXPLORA, REQUISITOS, TESTIMONIOS)
   ========================================= */
.dip-explore-section {
    margin-top: 50px;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.explore-item {
    background: #fdfdfd;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.explore-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.explore-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.requirements-box {
    background: #f0f7ff;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
}

.req-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    color: #444;
    font-weight: 500;
}

.req-item svg {
    color: var(--primary-blue);
    flex-shrink: 0;
}

.dip-testimonials {
    margin-top: 60px;
    padding: 40px 0;
}

.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 700px;
}

.test-quote {
    font-style: italic;
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 25px;
    position: relative;
}

.test-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.test-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

/* =========================================
   RESPONSIVE Y MEDIA QUERIES (CORREGIDO)
   ========================================= */

/* Tablets (hasta 992px) */
@media (max-width: 992px) {
    .dip-det-hero {
        padding: 80px 5% 80px;
    }

    .dip-det-hero h1 {
        font-size: 2.8rem;
    }

    .dip-stats-bar {
        flex-direction: column;
        margin: 20px 5% 50px;
        /* Quitamos el margen negativo para que no se superponga raro */
        border-bottom: none;
        border-left: 4px solid var(--yellow);
    }

    .dip-stat-item {
        border-right: none;
        border-bottom: 1px solid rgba(23, 27, 77, 0.05);
    }

    .dip-det-layout {
        flex-direction: column;
        gap: 40px;
    }

    .dip-sidebar {
        width: 100%;
        position: static;
    }

    /* CORRECCIÓN: Evitar que logística se aplaste en tablets */
    .dip-logistics-box {
        flex-direction: column;
    }
}

/* Teléfonos (hasta 768px) */
@media (max-width: 768px) {
    .dip-det-hero h1 {
        font-size: 2.2rem;
    }

    .dip-section-title {
        font-size: 1.6rem;
    }

    /* Corrección Logística en móviles (espaciado interior) */
    .logistics-col {
        padding: 25px;
    }

    /* Corrección Carrusel en móviles */
    .dip-modules-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .dip-module-card {
        flex: 0 0 100%;
        /* Muestra 1 sola tarjeta en celulares */
        padding: 25px 20px;
    }

    /* Corrección Testimonios y Certificado en móviles */
    .testimonial-card {
        padding: 25px;
    }

    .dip-cert-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }
}

/* =========================================
   FIX DEFINITIVO PARA MÓVILES (FORZAR RESPONSIVE)
   ========================================= */
/* Evita que los márgenes/paddings estiren la pantalla */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: clip;
    width: 100%;
}

/* Evitar que imágenes, svgs o componentes se salgan de su caja */
img,
svg,
iframe,
form {
    max-width: 100%;
}

@media (max-width: 992px) {

    /* 1. Forzar que los layouts principales sean de 1 sola columna vertical */
    .dip-det-layout,
    .dip-logistics-box,
    .dip-stats-bar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 2. Corregir la barra blanca que se subía a la imagen */
    .dip-stats-bar {
        margin-top: 30px !important;
        border-left: 4px solid var(--yellow) !important;
    }

    /* 3. Forzar TODAS las grillas a 1 sola carta por fila */
    .dip-benefits-grid,
    .explore-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        /* 100% de ancho */
        gap: 20px !important;
    }

    /* 4. Asegurar que nadie exceda el ancho de la pantalla */
    .dip-main-content,
    .dip-sidebar,
    .logistics-col {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 5. Ajustar el contenedor general para que no toque los bordes del celular */
    .dip-det-layout {
        padding: 0 15px 60px !important;
    }
}