/* ===== ESTILOS PARA AUDIOVISUALES ===== */

/* ARCHIVE AUDIOVISUALES */
.audiovisual-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.audiovisual-archive-header {
    text-align: center;
    margin-bottom: 3rem;
}

.audiovisual-archive-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 3px solid #112B00;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.audiovisual-archive-description {
    max-width: 600px;
    margin: 1rem auto;
    color: #666;
    line-height: 1.6;
}

.audiovisual-archive-count {
    max-width: 600px;
    margin: 1rem auto;
    color: #666;
}

/* BUSCADOR AUDIOVISUALES */
.audiovisual-search-form {
    max-width: 500px;
    margin: 2rem auto 0;
}

.audiovisual-search-container {
    display: flex;
}

.audiovisual-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    border-right: none;
    font-size: 1rem;
    outline: none;
}

.audiovisual-search-input:focus {
    border-color: #112B00;
}

.audiovisual-search-button {
    background: #112B00;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.audiovisual-search-button:hover {
    background: #0A1F00;
}

/* LAYOUT PRINCIPAL AUDIOVISUALES */
.audiovisual-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* GRID DE VIDEOS */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.video-card {
    background: rgba(17, 43, 0, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(17, 43, 0, 0.1);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* MINIATURA DE VIDEO */
.video-thumbnail-wrapper {
    margin-bottom: 1.2rem;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background: #000;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #112B00 0%, #1a3d00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-direction: column;
}

.video-thumbnail-placeholder span {
    font-size: 2.5rem;
}

.video-thumbnail-placeholder small {
    font-size: 0.8rem;
    margin-top: 10px;
}

/* OVERLAY DE PLAY */
.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 43, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.video-card:hover .play-button {
    transform: scale(1);
}

.play-icon {
    font-size: 1.2rem;
    color: #112B00;
    margin-left: 2px;
}

/* CONTENIDO DE LA TARJETA DE VIDEO */
.video-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.video-title {
    margin: 0 0 0.8rem 0;
    font-size: 1.2rem;
    line-height: 1.3;
    flex-shrink: 0;
}

.video-title a {
    color: #333;
    text-decoration: none;
}

.video-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex: 1;
}

/* ETIQUETAS DE VIDEO */
.video-tags {
    margin-bottom: 1rem;
}

.video-tag {
    background: rgba(17, 43, 0, 0.1);
    color: #112B00;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(17, 43, 0, 0.2);
}

/* META INFORMATION DE VIDEO */
.video-meta {
    margin-top: auto;
}

.video-meta-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.video-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #666;
    flex-wrap: wrap;
}

.video-button {
    background: #112B00;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-button:hover {
    background: #0A1F00;
    color: white;
}

/* SIDEBAR AUDIOVISUALES */
.audiovisual-sidebar {
    background: rgba(17, 43, 0, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(17, 43, 0, 0.1);
}

.audiovisual-sidebar-section {
    margin-bottom: 2rem;
}

.audiovisual-sidebar-title {
    color: #112B00;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audiovisual-sidebar-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* ESTADÍSTICAS AUDIOVISUALES */
.audiovisual-stats-container {
    text-align: center;
}

.audiovisual-stats-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #112B00;
    margin-bottom: 0.3rem;
}

.audiovisual-stats-label {
    font-size: 0.8rem;
    color: #666;
}

/* LISTA DE VIDEOS RECIENTES */
.audiovisual-recent-videos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.audiovisual-recent-video-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(17, 43, 0, 0.1);
}

.audiovisual-recent-video-link {
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
    display: block;
    transition: color 0.3s;
}

.audiovisual-recent-video-link:hover {
    color: #112B00;
}

.audiovisual-recent-video-title {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: bold;
}

.audiovisual-recent-video-date {
    color: #666;
    font-size: 0.8rem;
}

/* NUEVOS ESTILOS PARA ETIQUETAS EN SIDEBAR */
.audiovisual-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.audiovisual-tag-item {
    background: rgba(17, 43, 0, 0.1);
    color: #112B00;
    padding: 6px 10px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.8rem;
    border: 1px solid rgba(17, 43, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.audiovisual-tag-item:hover {
    background: rgba(17, 43, 0, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(17, 43, 0, 0.15);
}

.audiovisual-tag-name {
    font-weight: 500;
}

.audiovisual-tag-count {
    background: rgba(17, 43, 0, 0.3);
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.audiovisual-no-tags {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* ETIQUETAS DE VIDEO - ACTUALIZADO PARA MÚLTIPLES ETIQUETAS */
.video-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.video-tag {
    background: rgba(17, 43, 0, 0.1);
    color: #112B00;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(17, 43, 0, 0.2);
    white-space: nowrap;
}

/* ESTADO VACÍO AUDIOVISUALES */
.audiovisual-empty {
    text-align: center;
    padding: 4rem;
    background: rgba(17, 43, 0, 0.05);
    border-radius: 12px;
    grid-column: 1 / -1;
}

.audiovisual-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.audiovisual-empty-title {
    color: #666;
    margin-bottom: 1rem;
}

.audiovisual-empty-description {
    color: #888;
    margin-bottom: 1.5rem;
}

.audiovisual-empty-button {
    display: inline-block;
    background: #112B00;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.audiovisual-empty-button:hover {
    background: #0A1F00;
    color: white;
}

/* PAGINACIÓN AUDIOVISUALES */
.audiovisual-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

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

/* TABLETS (768px - 1024px) */
@media (max-width: 1024px) {
    .audiovisual-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .audiovisual-archive-wrapper {
        padding: 1.5rem;
    }
}

/* MÓVILES GRANDES (576px - 768px) */
@media (max-width: 768px) {
    .audiovisual-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .audiovisual-sidebar {
        order: 2; /* Sidebar abajo en móvil */
        margin-bottom: 1rem;
    }
    
    .audiovisuales-main {
        order: 1; /* Contenido principal arriba en móvil */
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .audiovisual-archive-wrapper {
        padding: 1rem;
    }
    
    .audiovisual-archive-title {
        font-size: 2rem;
    }
    
    .video-card {
        padding: 1.2rem;
    }
    
    .audiovisual-sidebar-section {
        margin-bottom: 1.5rem;
    }
    
    /* Ajustes responsive para etiquetas */
    .audiovisual-tags-cloud {
        gap: 0.4rem;
    }
    
    .audiovisual-tag-item {
        padding: 5px 8px;
        font-size: 0.75rem;
    }
}

/* MÓVILES PEQUEÑOS (hasta 576px) */
@media (max-width: 576px) {
    .audiovisual-archive-wrapper {
        padding: 0.8rem;
    }
    
    .audiovisual-archive-title {
        font-size: 1.8rem;
        border-bottom: 2px solid #112B00;
    }
    
    .video-card {
        padding: 1rem;
    }
    
    .video-thumbnail-wrapper {
        margin-bottom: 1rem;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
    
    .video-meta-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .video-button {
        align-self: stretch;
        justify-content: center;
    }
    
    .audiovisual-sidebar {
        padding: 1.2rem;
        order: 2; /* Aseguramos que sidebar quede abajo */
    }
    
    .audiovisual-sidebar-title {
        font-size: 1rem;
    }
    
    .audiovisual-recent-video-title {
        font-size: 0.85rem;
    }
    
    .audiovisual-tag-item {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
}