/* ========================================
   ESTILOS PRINCIPALES - DOCUMENTOS DE TRABAJO
   ======================================== */

.dt-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    min-height: 500px;
}

/* ========================================
   MENÚ LATERAL
   ======================================== */

.dt-menu-lateral {
    flex: 0 0 280px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dt-menu-lateral h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #be3919;
    padding-bottom: 10px;
    font-size: 18px;
}

#dt-menu-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dt-menu-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dt-menu-item:hover {
    background: #e8e8e8;
    transform: translateX(5px);
}

.dt-menu-item.activo {
    background: #be3919;
    color: white;
    border-left-color: #ff9800;
}

.dt-menu-item small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #999;
}

.dt-menu-item.activo small {
    color: rgba(255,255,255,0.8);
}

/* ========================================
   CONTENIDO PRINCIPAL
   ======================================== */

.dt-contenido-principal {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ========================================
   TÍTULO DEL DOCUMENTO
   ======================================== */

.dt-titulo-documento {
    font-size: 28px;
    color: #be3919;
    margin: 0 0 20px 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* ========================================
   BLOQUES DE RECURSOS (Verticales)
   ======================================== */

.dt-recurso-bloque {
    margin: 25px 0;
    width: 100%;
    text-align: center;
}

.dt-recurso-bloque img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dt-recurso-bloque iframe {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
}

/* ========================================
   VISOR PDF
   ======================================== */

.dt-recurso-bloque .dt-pdf-viewer {
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* ========================================
   VISOR POWERBI
   ======================================== */

.dt-recurso-bloque .dt-powerbi-viewer {
    height: 500px;
    border: none;
    border-radius: 8px;
}

/* ========================================
   CONTENEDOR INSTAGRAM (Centrado)
   ======================================== */

.dt-instagram-wrapper {
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    overflow-x: auto;
}

.dt-instagram-wrapper .instagram-media {
    margin: 0 auto !important;
    min-width: 280px !important;
    max-width: 100% !important;
    width: auto !important;
}

.dt-recurso-1 .dt-instagram-wrapper {
    justify-content: center;
}

/* ========================================
   TEXTO PRINCIPAL
   ======================================== */

.dt-texto-bloque {
    margin: 20px 0 30px;
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

.dt-texto-bloque p {
    margin-bottom: 15px;
}

/* ========================================
   PAGINACIÓN
   ======================================== */

.dt-paginacion {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.dt-paginacion button {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dt-paginacion button:hover:not(:disabled) {
    background: #be3919;
    color: white;
    border-color: #be3919;
}

.dt-paginacion button.activo {
    background: #be3919;
    color: white;
    border-color: #be3919;
}

.dt-paginacion button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dt-paginacion span {
    padding: 8px 12px;
    color: #666;
}

/* ========================================
   LOADING
   ======================================== */

.dt-loading {
    text-align: center;
    padding: 50px;
    color: #666;
}

.dt-loading:before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #be3919;
    border-radius: 50%;
    animation: dt-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes dt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   ERROR
   ======================================== */

.error {
    color: #d32f2f;
    text-align: center;
    padding: 20px;
}

/* ========================================
   CARRUSEL DE DOCUMENTOS RECIENTES
   ======================================== */

.dt-carrusel-container {
    position: relative;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 50px;
    overflow: hidden;
}

.dt-carrusel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.dt-carrusel-item {
    flex: 0 0 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.dt-carrusel-item.activo {
    display: flex;
    animation: dt-fade-in 0.5s ease;
}

@keyframes dt-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dt-carrusel-link {
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.dt-carrusel-imagen {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #f5f5f5;
}

.dt-carrusel-imagen img {
    width: 100%;
    height: 100%;
    max-height: 450px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dt-carrusel-imagen img:hover {
    transform: scale(1.02);
}

.dt-carrusel-imagen.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: #999;
    font-size: 18px;
}

.dt-carrusel-imagen.placeholder span {
    font-size: 48px;
}

.dt-carrusel-titulo {
    padding: 15px 20px;
    width: 100%;
}

.dt-carrusel-titulo h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.dt-carrusel-fecha {
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    color: #999;
    background: #f5f5f5;
    padding: 4px 15px;
    border-radius: 20px;
}

/* Botones del carrusel */
.dt-carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 115, 170, 0.8);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.dt-carrusel-btn:hover {
    background: rgba(0, 115, 170, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.dt-carrusel-btn.prev {
    left: 0;
}

.dt-carrusel-btn.next {
    right: 0;
}

/* Indicadores del carrusel */
.dt-carrusel-indicadores {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.dt-carrusel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dt-carrusel-dot:hover {
    background: #bbb;
    transform: scale(1.2);
}

.dt-carrusel-dot.activo {
    background: #be3919;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(0, 115, 170, 0.3);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Tablets y móviles */
@media (max-width: 768px) {
    .dt-container {
        flex-direction: column;
    }
    
    .dt-menu-lateral {
        flex: auto;
    }
    
    .dt-titulo-documento {
        font-size: 22px;
    }
    
    .dt-recurso-bloque .dt-pdf-viewer {
        height: 400px;
    }
    
    .dt-recurso-bloque .dt-powerbi-viewer {
        height: 350px;
    }
    
    .dt-instagram-wrapper .instagram-media {
        min-width: 250px !important;
    }
    
    .dt-carrusel-container {
        padding: 0 15px;
    }
    
    .dt-carrusel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .dt-carrusel-titulo h3 {
        font-size: 18px;
    }
    
    .dt-carrusel-imagen {
        max-height: 250px;
    }
    
    .dt-carrusel-imagen img {
        max-height: 250px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .dt-titulo-documento {
        font-size: 18px;
    }
    
    .dt-recurso-bloque .dt-pdf-viewer {
        height: 300px;
    }
    
    .dt-recurso-bloque .dt-powerbi-viewer {
        height: 280px;
    }
    
    .dt-carrusel-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .dt-carrusel-titulo h3 {
        font-size: 16px;
    }
    
    .dt-carrusel-imagen {
        max-height: 200px;
    }
    
    .dt-carrusel-imagen img {
        max-height: 200px;
    }
    
    .dt-carrusel-container {
        padding: 0 10px;
    }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
    .dt-carrusel-container {
        max-width: 1000px;
    }
}