/* Media Gallery Styles */
.media-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #ffffff;
    min-height: 100vh;
}

/* Header Styles */
.media-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.media-gallery-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Media Filters */
.media-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    border-color: #059669;
    color: #059669;
}

.filter-btn.active {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.filter-btn .count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    min-width: 20px;
    text-align: center;
}

/* View Options */
.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    border-color: #059669;
    color: #059669;
}

.view-btn.active {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

/* Media Sections */
.media-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.section-header i {
    font-size: 1.5rem;
    color: #059669;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Media Grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Media Items */
.media-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.media-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #059669;
}

/* Media Preview */
.media-preview {
    position: relative;
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.media-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-preview,
.video-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.pdf-preview i,
.video-preview i {
    font-size: 4rem;
    color: #dc2626;
}

.video-preview i {
    color: #059669;
}

/* Media Overlay */
.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-action-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.25rem;
}

.media-action-btn:hover {
    background: #059669;
    color: #ffffff;
    transform: scale(1.1);
}

/* Media Info */
.media-info {
    padding: 1.5rem;
}

.media-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.media-meta {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Delete Button */
.delete-btn {
    background: #dc2626;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.delete-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.delete-btn i {
    font-size: 0.875rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #ffffff;
    margin: 15% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Compact View */
.media-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.media-grid.compact .media-preview {
    height: 150px;
}

.media-grid.compact .media-info {
    padding: 1rem;
}

.media-grid.compact .media-name {
    font-size: 0.875rem;
}

.media-grid.compact .media-meta {
    font-size: 0.75rem;
}

.media-grid.compact .delete-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-gallery-container {
        padding: 1rem;
    }
    
    .media-gallery-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .media-gallery-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .media-filters,
    .view-options {
        justify-content: center;
    }
    
    .filter-btn,
    .view-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn,
    .view-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
}





