.page-title {
    color: #cd6129;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 3%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #cd6129, #5c8c64);
    border-radius: 2px;
}

.btn-outline-brown {
    color: rgb(109, 62, 47);
    border-color: rgb(109, 62, 47);
}
.btn-outline-brown:hover,
.btn-outline-brown:focus {
    color: #fff;
    background-color: rgb(109, 62, 47);
}
.btn-outline-brown.active {
    color: #fff;
    background-color: rgba(123, 84, 69, 0.89);
    border-color: rgba(109, 84, 76, 0.61);
}

.btn-outline-orange {
    color: #cd6129;
    border-color: rgba(205, 96, 41, 0.89);
    transition: all 0.2s ease;
}
.btn-outline-orange:hover,
.btn-outline-orange:focus {
    color: #fff;
    background-color: #5c8c64;
    border-color: rgba(58, 93, 64, 0.67);
}
 
.btn-primary {
    background-color: #6b3f2f;
    border-color: #5c3526;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #8b5f4f;
    border-color: #7b4f3f;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.media-card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.media-card-body {
    padding: 1.5rem;
}

.media-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.media-type-foto {
    background-color: #28a745;
    color: white;
}

.media-type-video {
    background-color: #dc3545;
    color: white;
}

.media-type-documento {
    background-color: #6f42c1;
    color: white;
}

.media-thumbnail {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video overlay for video thumbnails */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-thumbnail:hover .video-overlay {
    opacity: 1;
}

.video-overlay i {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.media-icon {
    font-size: 3rem;
    color: #6c757d;
}

.media-title {
    color: #2e3f32;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.media-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.media-date {
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.filter-buttons {
    margin-bottom: 2rem;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .page-title::after {
        left: 50%;
    }
    
    .filter-buttons .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-buttons .btn {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 576px) {
    .media-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .media-card-body {
        padding: 1rem;
    }
    
    .filter-buttons .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.media-item {
    transition: opacity 0.3s ease;
}

/* Loading animation */
.media-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.media-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Accessibility improvements */
.btn:focus {
    outline: 2px solid #cd6129;
    outline-offset: 2px;
}

.media-card:focus-within {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Print styles */
@media print {
    .filter-buttons {
        display: none;
    }
    
    .media-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .page-title::after {
        display: none;
    }
}
