/* gallery.css - Complete Organized Version with Floating Upload Button */

/* ===== GALLERY PAGE STYLES ===== */

/* Gallery Controls */
.gallery-controls {
    background: var(--light-gray);
    padding: 20px 0;
    margin-bottom: 30px;
    width: 100%;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--primary-blue);
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    min-width: 0;
}

.search-box button {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.search-box button:hover {
    background: var(--secondary-blue);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 5px 0;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 51, 102, 0.3);
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: flex-end;
}

.view-toggle-btn {
    background: var(--light-gray);
    border: 2px solid var(--light-gray);
    color: var(--dark-gray);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
}

.view-toggle-btn:hover {
    border-color: var(--primary-blue);
    background: white;
}

.view-toggle-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

.sort-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.sort-controls select {
    padding: 8px 15px;
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    background: white;
    color: var(--primary-blue);
    font-weight: 500;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 150px;
}

.sort-controls select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Gallery Container */
.gallery-container {
    min-height: 500px;
    padding: 20px 0 60px;
    width: 100%;
    position: relative;
}

.loading {
    text-align: center;
    padding: 60px 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Event Categories */
.event-category {
    margin-bottom: 60px;
    animation: fadeIn 0.5s ease-out;
    width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 100%);
}

.category-title {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    line-height: 1.3;
}

.category-date {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin-top: 10px;
}

.intro-message {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-red);
    margin-top: 20px;
}

.intro-message h4 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.intro-message p {
    margin: 0;
    line-height: 1.5;
}

/* Category Badge */
.category-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    backdrop-filter: blur(4px);
}

/* Event Stats */
.event-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0 30px 0;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-weight: 500;
    min-width: 120px;
    justify-content: center;
}

.stat-item i {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

/* ===== MEDIA GRIDS ===== */

/* Grid View Media - FIXED FOR 3 COLUMNS WITH 2 ROWS */
.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    width: 100%;
}

.media-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.media-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.media-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.media-item:hover .media-preview img {
    transform: scale(1.05);
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.media-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.media-info h4 {
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    min-height: 2.6em;
}

.media-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--light-gray);
}

.media-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--dark-gray);
    font-size: 0.9rem;
    font-weight: 500;
}

.media-stat i {
    color: var(--accent-red);
}

.download-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
    font-weight: 500;
}

.download-btn:hover {
    background: var(--secondary-blue);
    transform: translateY(-1px);
}

/* More Items Button */
.more-items-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    justify-self: center;
    font-family: inherit;
}

.more-items-btn:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.more-items-btn i {
    font-size: 1.1rem;
}

/* Compact View - FIXED FOR 3 COLUMNS WITH 2 ROWS */
.event-compact-view {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
    transition: transform 0.3s ease;
    width: 100%;
}

.event-compact-view:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.event-compact-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.event-compact-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.event-compact-title h3 {
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.event-compact-date {
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.event-compact-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
}

.event-compact-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.event-compact-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
}

.event-compact-content {
    padding: 15px 20px;
}

.event-compact-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Compact Media Grid - FIXED FOR 3 COLUMNS WITH 2 ROWS */
.compact-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.compact-media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
    background: #f5f5f5;
    height: 120px;
}

.compact-media-item:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.compact-media-preview {
    width: 100%;
    height: 100%;
    position: relative;
}

.compact-media-preview img,
.compact-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    display: block;
}

.compact-media-item:hover .compact-media-preview img {
    transform: scale(1.1);
}

.compact-video-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.compact-media-count {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 51, 102, 0.9);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(4px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--dark-gray);
    width: 100%;
}

.empty-state i {
    font-size: 4rem;
    color: var(--light-gray);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state button.filter-btn {
    margin-top: 15px;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
    font-size: 1rem;
}

.empty-state button.filter-btn:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

/* ===== ADMIN FLOATING BUTTON ===== */
.admin-float-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-red);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown when admin logs in */
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}

.admin-float-btn.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: floatIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-float-btn:hover {
    background: var(--light-red);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.4);
}

.admin-float-btn:active {
    transform: scale(0.95);
}

.admin-float-btn.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(204, 0, 0, 0.5), 0 0 20px rgba(204, 0, 0, 0.3);
    }
    100% {
        box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
    }
}

/* Tooltip for admin button */
.admin-float-btn::after {
    content: 'Upload Gallery Content';
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.admin-float-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.admin-float-btn::before {
    content: '';
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.admin-float-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== UPLOAD GALLERY MODAL ===== */
#adminUploadModal .modal-content {
    max-width: 700px;
    width: 90%;
}

#adminUploadModal .modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

#adminUploadModal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

#adminUploadModal .modal-body {
    padding: 25px;
}

/* Upload Form Styles */
#uploadForm .form-group {
    margin-bottom: 25px;
}

#uploadForm .form-group:last-child {
    margin-bottom: 0;
}

#uploadForm label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

#uploadForm label.required::after {
    content: ' *';
    color: var(--accent-red);
}

#uploadForm input[type="text"],
#uploadForm input[type="date"],
#uploadForm select,
#uploadForm textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#uploadForm input[type="text"]:focus,
#uploadForm input[type="date"]:focus,
#uploadForm select:focus,
#uploadForm textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

#uploadForm select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23003366' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

#uploadForm textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* File Upload Area */
.file-upload-area {
    border: 3px dashed var(--primary-blue);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light-gray);
    position: relative;
    margin-top: 10px;
}

.file-upload-area:hover {
    background: rgba(0, 51, 102, 0.05);
    border-color: var(--secondary-blue);
}

.file-upload-area.drag-over {
    background: rgba(0, 51, 102, 0.1);
    border-color: var(--secondary-blue);
    transform: scale(1.02);
}

.file-upload-area i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 15px;
    opacity: 0.7;
}

.file-upload-area p {
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 500;
}

.file-info {
    color: #666;
    font-size: 0.9rem;
    opacity: 0.8;
}

#mediaFiles {
    display: none;
}

/* File Preview */
#filePreview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.file-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 100px;
    background: var(--light-gray);
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.file-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1rem;
}

.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(204, 0, 0, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.file-preview-item:hover .remove-file {
    opacity: 1;
    transform: scale(1);
}

.remove-file:hover {
    background: rgba(204, 0, 0, 1);
    transform: scale(1.1) !important;
}

/* Checkbox Styles */
#uploadForm .form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
}

#uploadForm .form-group label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

#uploadForm .form-group label:not(:first-of-type) {
    margin-top: 15px;
}

/* Upload Progress */
.upload-progress {
    margin-top: 20px;
    width: 100%;
    display: none;
}

.progress-bar {
    height: 10px;
    background: var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.9rem;
    color: var(--dark-gray);
    text-align: center;
    display: block;
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.form-actions .submit-btn {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
}

.form-actions .submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.3);
}

.form-actions .submit-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.form-actions .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-actions .submit-btn i {
    font-size: 1.2rem;
}

.form-actions .cancel-btn {
    background: var(--light-gray);
    color: var(--dark-gray);
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
    text-align: center;
}

.form-actions .cancel-btn:hover {
    background: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== SLIDEABLE MODAL STYLES - FIXED ===== */
.slideable-modal {
    background: rgba(0, 0, 0, 0.95);
    display: none;
}

.slideable-modal .modal-content {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 0;
    padding: 0;
    border: none;
    position: relative;
    margin: 0;
}

.slideable-modal .modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    padding: 15px 20px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

.slideable-modal .modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
}

.slideable-modal .close-modal {
    color: white;
    font-size: 2rem;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0;
    position: relative;
    z-index: 101;
}

.slideable-modal .close-modal:hover {
    background: rgba(0,0,0,0.7);
    transform: rotate(90deg);
}

.slideable-modal .modal-body {
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* SLIDER CONTAINER - CRITICAL FIX */
.slideable-slider-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.slideable-slider {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.slideable-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 100px;
    flex-shrink: 0;
    position: relative;
}

.slideable-slide .slide-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.slideable-slide .spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
    margin-bottom: 15px;
}

.slideable-slide .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
}

.slideable-slide .error-state i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.slideable-slide .error-state p {
    font-size: 1rem;
    margin: 0;
}

.slideable-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    background: #000;
    pointer-events: auto;
}

.slideable-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 100;
    opacity: 0.7;
    pointer-events: auto;
}

.slideable-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.slideable-prev {
    left: 20px;
}

.slideable-next {
    right: 20px;
}

.slideable-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 90;
}

.slideable-info.hidden {
    transform: translateY(100%);
}

.slideable-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

.slideable-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    flex-wrap: wrap;
}

.slideable-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.slideable-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 100;
    backdrop-filter: blur(4px);
}

/* Controls Bar */
.slideable-controls {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 25px;
    z-index: 100;
}

.slideable-control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    pointer-events: auto;
}

.slideable-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.slideable-control-btn:active {
    transform: scale(0.95);
}

/* Thumbnail Strip - FIXED POSITIONING */
.slideable-thumbnails {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    padding: 10px;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    max-height: 80px;
    z-index: 90;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) rgba(255, 255, 255, 0.1);
}

.slideable-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.slideable-thumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.slideable-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
    pointer-events: auto;
}

.thumbnail-item:hover {
    opacity: 0.8;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: white;
    transform: scale(1.05);
}

.thumbnail-item img,
.thumbnail-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.5);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* ===== OTHER MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: var(--primary-blue);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.close-modal:hover {
    color: var(--light-red);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--light-gray);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

/* Image Detail Modal */
.image-modal .modal-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    width: 90%;
}

.image-modal .modal-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    padding: 0;
    height: 600px;
    max-height: 70vh;
}

.image-container {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
}

.image-container img,
.image-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-details {
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid var(--light-gray);
    height: 100%;
    box-sizing: border-box;
}

.image-details h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.image-meta span {
    background: var(--light-gray);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.image-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
    flex: 1;
    min-width: 100px;
}

.download-btn {
    background: var(--primary-blue);
    color: white;
}

.download-btn:hover {
    background: var(--secondary-blue);
    transform: translateY(-2px);
}

.like-btn {
    background: #ffeaea;
    color: var(--accent-red);
    border: 1px solid #ffcccc;
}

.like-btn:hover {
    background: #ffd6d6;
    transform: translateY(-2px);
}

.like-btn.liked {
    background: var(--accent-red);
    color: white;
    border-color: var(--accent-red);
}

.like-btn.liked i {
    font-weight: 900;
}

.share-btn {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.share-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.comments-section {
    margin-top: 30px;
    border-top: 1px solid var(--light-gray);
    padding-top: 20px;
}

.comments-section h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.comments-list {
    max-height: 200px;
    overflow-y: auto;
    margin: 15px 0;
    padding-right: 10px;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 3px;
}

.comment-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.comment-text {
    color: var(--dark-gray);
    line-height: 1.4;
    font-size: 0.95rem;
    margin: 5px 0;
}

.comment-date {
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.add-comment {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.add-comment input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    box-sizing: border-box;
}

.add-comment input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.add-comment button {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    flex-shrink: 0;
}

.add-comment button:hover {
    background: var(--secondary-blue);
}

/* ===== FOOTER STYLES ===== */
footer {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-red), var(--light-red));
}

footer .container {
    position: relative;
    z-index: 1;
}

/* Footer Links */
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 8px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.footer-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-links a:hover::before {
    left: 100%;
}

.footer-links a i {
    font-size: 1rem;
}

/* Contact Section */
.footer-section {
    text-align: center;
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent-red);
}

.footer-section h4 {
    font-size: 1.3rem;
    margin: 0 0 20px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
    display: inline-block;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-red);
    border-radius: 2px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.contact-info p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    padding: 10px 0;
    font-size: 1rem;
    line-height: 1.4;
    transition: transform 0.3s ease;
    flex-wrap: wrap;
}

.contact-info p:hover {
    transform: translateX(5px);
}

.contact-info i {
    color: var(--accent-red);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Copyright */
footer > .container > p:first-child {
    text-align: center;
    font-size: 1rem;
    margin: 0 0 10px;
    opacity: 0.9;
    position: relative;
    padding-top: 15px;
}

footer > .container > p:first-child::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Social Links */
.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-red);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.social-link i {
    position: relative;
    z-index: 1;
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(204, 0, 0, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--light-red);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.4);
}

/* Quick Navigation */
.quick-nav {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 998;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.nav-arrow:hover {
    background: var(--secondary-blue);
    transform: translateY(-3px) scale(1.1);
}

.nav-arrow.home {
    background: var(--accent-red);
}

.nav-arrow.home:hover {
    background: var(--light-red);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1200px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compact-media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .category-title {
        font-size: 1.8rem;
    }
    
    .event-compact-title h3 {
        font-size: 1.2rem;
    }
    
    .image-modal .modal-body {
        grid-template-columns: 1fr;
        height: 80vh;
    }
    
    .image-container {
        height: 60%;
    }
    
    .image-details {
        height: 40%;
        border-left: none;
        border-top: 1px solid var(--light-gray);
    }
}

@media (max-width: 768px) {
    .filter-buttons {
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .view-toggle {
        justify-content: center;
    }
    
    .sort-controls {
        justify-content: center;
    }
    
    .event-stats {
        justify-content: center;
    }
    
    .stat-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .category-header {
        padding: 20px;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .media-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .compact-media-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .compact-media-item {
        height: 100px;
    }
    
    .event-compact-header {
        padding: 12px 15px;
    }
    
    .event-compact-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .event-compact-title h3 {
        min-width: auto;
    }
    
    .slideable-modal .modal-content {
        width: 95%;
        height: 95vh;
    }
    
    .slideable-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    .admin-float-btn {
        bottom: 80px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-btn,
    .cancel-btn {
        width: 100%;
    }
    
    /* Footer adjustments */
    footer {
        padding: 30px 0 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }
    
    .footer-links a {
        width: 100%;
        max-width: 250px;
        justify-content: center;
        padding: 10px 20px;
    }
    
    .footer-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .contact-info p {
        flex-direction: column;
        text-align: center;
        gap: 5px;
        padding: 8px 0;
    }
    
    .contact-info i {
        font-size: 1.3rem;
    }
    
    .footer-social {
        margin: 20px 0;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .quick-nav {
        bottom: 20px;
        left: 20px;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .search-box {
        max-width: 100%;
    }
    
    .category-title {
        font-size: 1.4rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .compact-media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .compact-media-item {
        height: 90px;
    }
    
    .slideable-controls {
        bottom: 60px;
    }
    
    .slideable-control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .slideable-info {
        padding: 15px;
    }
    
    .slideable-info h4 {
        font-size: 1rem;
    }
    
    .slideable-meta {
        font-size: 0.8rem;
        gap: 10px;
    }
    
    .view-toggle {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-toggle-btn {
        text-align: center;
        justify-content: center;
    }
    
    .event-compact-stats {
        justify-content: center;
    }
    
    .modal {
        padding: 10px;
    }
    
    /* Footer adjustments */
    .footer-section {
        padding: 15px;
    }
    
    .footer-section h4 {
        font-size: 1.2rem;
    }
    
    .contact-info p {
        font-size: 0.95rem;
    }
    
    .footer-links a {
        font-size: 1rem;
    }
    
    footer > .container > p:first-child {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .event-stats {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stat-item {
        width: 100%;
        max-width: none;
        justify-content: flex-start;
    }
    
    .media-item {
        height: 280px;
    }
    
    .media-preview {
        height: 180px;
    }
    
    .compact-media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .compact-media-item {
        height: 80px;
    }
    
    .slideable-thumbnails {
        max-height: 60px;
        padding: 8px;
    }
    
    .thumbnail-item {
        width: 40px;
        height: 40px;
    }
    
    .admin-float-btn {
        bottom: 70px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .quick-nav {
        bottom: 15px;
        left: 15px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .media-item:hover,
    .event-compact-view:hover,
    .compact-media-item:hover {
        transform: none !important;
    }
    
    .filter-btn:hover,
    .view-toggle-btn:hover,
    .download-btn:hover,
    .submit-btn:hover,
    .cancel-btn:hover,
    .action-btn:hover,
    .nav-arrow:hover,
    .social-link:hover,
    .back-to-top:hover,
    .admin-float-btn:hover {
        transform: none !important;
    }
    
    .slideable-nav,
    .slideable-control-btn,
    .close-modal,
    .remove-file {
        min-height: 44px;
        min-width: 44px;
    }
    
    .thumbnail-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .filter-btn,
    .view-toggle-btn {
        padding: 12px 20px;
    }
    
    .download-btn {
        padding: 8px 15px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .gallery-controls,
    .admin-float-btn,
    .modal,
    .download-btn,
    .view-toggle,
    .quick-nav,
    .back-to-top,
    footer,
    .slideable-nav,
    .slideable-controls {
        display: none !important;
    }
    
    .media-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        break-inside: avoid;
    }
    
    .media-item {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .compact-media-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .event-category {
        page-break-inside: avoid;
    }
    
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    .category-header {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .intro-message {
        border: 1px solid #ddd !important;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --primary-blue: #00008B;
        --secondary-blue: #000066;
        --accent-red: #B30000;
        --light-red: #FF3333;
        --light-gray: #F0F0F0;
        --dark-gray: #333333;
    }
}

/* Focus styles for accessibility */
.filter-btn:focus,
.view-toggle-btn:focus,
.download-btn:focus,
.submit-btn:focus,
.cancel-btn:focus,
.action-btn:focus,
.search-box input:focus,
.search-box button:focus,
.slideable-nav:focus,
.slideable-control-btn:focus,
.close-modal:focus,
.add-comment input:focus,
.add-comment button:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.nav-arrow:focus,
.back-to-top:focus,
.admin-float-btn:focus {
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
}

/* Skip to content for screen readers */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-red);
    color: white;
    padding: 8px;
    z-index: 9999;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .filter-btn,
    .view-toggle-btn,
    .download-btn,
    .submit-btn,
    .cancel-btn,
    .action-btn,
    .search-box button,
    .slideable-nav,
    .slideable-control-btn,
    .close-modal,
    .remove-file,
    .add-comment button,
    .nav-arrow,
    .back-to-top,
    .admin-float-btn,
    .social-link,
    .footer-links a {
        border: 2px solid ButtonText;
    }
    
    .filter-btn.active {
        background-color: Highlight;
        color: HighlightText;
    }
    
    .media-item,
    .event-compact-view {
        border: 1px solid CanvasText;
    }
}

/* ===== SLIDER FIXES - CRITICAL ===== */
.slideable-slide video {
    pointer-events: auto !important;
    cursor: pointer;
}

.slideable-slide video::-webkit-media-controls {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.slideable-slider-container {
    -webkit-overflow-scrolling: touch;
}

/* Ensure slider has proper dimensions */
.slideable-modal .modal-body {
    display: block;
    position: relative;
}

.slideable-slider {
    height: calc(100% - 80px);
    align-items: center;
}

/* Fix for video controls */
.slideable-media[controls] {
    cursor: default;
}

/* Fix for iOS touch scrolling */
.slideable-thumbnails {
    -webkit-overflow-scrolling: touch;
}

/* Prevent modal from affecting body scroll */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ===== ADMIN FLOATING BUTTON Z-INDEX FIX ===== */
.admin-float-btn {
    z-index: 1001; /* Higher than back-to-top and quick-nav */
}

.back-to-top {
    z-index: 1000; /* Lower than admin button */
}

.quick-nav {
    z-index: 999; /* Lowest of the floating buttons */
}