/* Estilos específicos para la página de visualización de contenido */
.page-title {
    color: var(--text-dark);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 600;
}

/* Video Styles */
.video-wrapper {
    position: relative;
}

#videoPlayer {
    border-radius: 8px;
    background: #000;
    max-height: 60vh;
    width: 100%;
}

.video-controls {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 1rem;
}

.volume-control {
    width: 120px;
}

.progress-container {
    margin-top: 1rem;
}

.progress {
    height: 8px;
    border-radius: 4px;
    cursor: pointer;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 4px;
    transition: width 0.1s linear;
}

.video-progress:hover,
.ppt-progress:hover {
    height: 12px;
}

.time-display {
    font-size: 0.85rem;
}

/* Presentation Styles */
.ppt-slide {
    max-height: 60vh;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.slide-container {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-navigation {
    display: flex;
    align-items: center;
}

#slideJump {
    text-align: center;
    width: 70px;
}

/* Rotate suggestion for mobile */
.rotate-suggestion {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.rotate-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: rotateAnimation 2s infinite ease-in-out;
}

.rotate-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.rotate-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
}

.rotate-button {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.rotate-button:hover {
    transform: scale(1.1);
    background: #0b5ed7;
}

@keyframes rotateAnimation {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

/* Landscape orientation styles */
@media (orientation: landscape) and (max-height: 600px) {
    #videoPlayer, .ppt-slide {
        max-height: 80vh;
    }

    .container {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .rotate-suggestion {
        display: none !important;
    }

    .rotate-button {
        display: none !important;
    }
}

/* Responsive Design para ver.php */
@media (max-width: 768px) and (orientation: portrait) {
    #videoPlayer, .ppt-slide {
        max-height: 40vh;
    }

    .video-controls .d-flex {
        flex-direction: column;
        align-items: center;
    }

    .btn-control {
        width: 100%;
        max-width: 280px;
        margin-bottom: 0.5rem;
    }

    .volume-control {
        width: 100%;
        max-width: 200px;
        margin-top: 0.5rem;
    }

    .ppt-controls .d-flex {
        flex-direction: column;
    }

    .slide-navigation {
        margin-top: 0.5rem;
        justify-content: center;
    }

    /* Show rotate button on mobile portrait */
    .rotate-button {
        display: block;
    }
}

@media (max-width: 576px) and (orientation: portrait) {
    .page-title {
        font-size: 1.4rem;
    }

    #videoPlayer, .ppt-slide {
        max-height: 35vh;
    }

    .btn-control .btn-text {
        display: none;
    }

    .btn-control {
        padding: 0.5rem;
        min-width: 44px;
    }

    #slideJump {
        width: 60px;
    }
}

/* Fullscreen styles */
:-webkit-full-screen {
    width: 100%;
    height: 100%;
}

:-moz-full-screen {
    width: 100%;
    height: 100%;
}

:-ms-fullscreen {
    width: 100%;
    height: 100%;
}

:fullscreen {
    width: 100%;
    height: 100%;
}

/* Header Styles */
header {
    background-color: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

header img {
    max-height: 80px;
    height: auto;
    width: auto;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}

.header-title {
    color: var(--text-dark);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin: 0.5rem 0 0 0;
}

footer {
    background-color: #212529;
    color: var(--text-light);
    margin-top: auto;
}

/* Responsive improvements */
@media (min-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .header-title {
        margin: 0;
    }

    .container {
        max-width: 90%;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 0.75rem 1rem;
    }

    .list-group-item {
        padding: 0.5rem 1rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Estilos para el iframe de presentación */
.iframe-container {
    position: relative;
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#presentationIframe {
    border: none;
    display: block;
    min-height: 500px;
}

.presentation-controls {
    background: rgba(255, 255, 255, 0.95);
}

.presentation-wrapper {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: hidden;
}

/* Loading state para iframe */
.iframe-loading {
    position: relative;
}

.iframe-loading::after {
    content: "Cargando presentación...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 500;
}

/* Responsive para iframe */
@media (max-width: 768px) {
    #presentationIframe {
        min-height: 400px;
        height: 60vh !important;
    }
    
    .presentation-controls .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .viewer-info, .controls-buttons {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    #presentationIframe {
        min-height: 300px;
        height: 50vh !important;
    }
}

/* ===== NUEVOS ESTILOS PARA GOOGLE FORMS ===== */

/* Estilos para Google Forms */
.evaluation-wrapper {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    overflow: hidden;
}

#googleFormIframe {
    border: none;
    display: block;


}

.evaluation-controls {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #dee2e6;
}

.evaluation-info {
    flex: 1;
}

/* Estilos para PDF Viewer */
.pdf-viewer-wrapper {
    max-height: 70vh;
    overflow: auto;
    background: #525659; /* Fondo tipo Google PDF */
    padding: 20px;
}

#pdfCanvas {
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin: 0 auto;
    display: block;
}

.pdf-controls-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6;
}

.pdf-loading {
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Mejoras responsive para controles PDF y Forms */
@media (max-width: 768px) {
    #googleFormIframe {
        min-height: 500px;
        height: 70vh !important;
    }
    
    .evaluation-controls .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .evaluation-info, .controls-buttons {
        width: 100%;
        text-align: center;
    }
    
    .pdf-controls-bar {
        position: relative;
    }
    
    .pdf-controls-bar .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pdf-nav-buttons, .pdf-zoom-buttons, .pdf-display-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    #googleFormIframe {
        min-height: 400px;
        height: 60vh !important;
    }
    
    .pdf-controls-bar .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Estados de carga mejorados */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Mejoras de accesibilidad */
.btn:focus, .progress:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Colores específicos para evaluaciones */
.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
}

/* Efectos hover para botones de evaluación */
.evaluation-controls .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}