/* ===========================================
   GALLERY STYLES - PUSTAKA ADAPTATION
   Adaptasi dari fakultas-website dengan tema green pustaka
   =========================================== */

/* Base Variables - Menggunakan tema pustaka */
:root {
    /* Menggunakan variables yang sudah ada di app.css */
    --gallery-primary: var(--primary-color);
    --gallery-secondary: var(--secondary-color);
    --gallery-accent: var(--accent-color);
    --gallery-light: var(--light-green);
    --gallery-very-light: var(--very-light-green);
    --gallery-gradient: var(--gradient-primary);
    --gallery-gradient-secondary: var(--gradient-secondary);
    
    /* Text colors untuk posts compatibility */
    --text-dark: #333333;
    --text-light: #6c757d;
}

/* ===========================================
   BREADCRUMB & PAGE HEADER
   =========================================== */

/* Breadcrumb - Mengikuti style dari posts */
.breadcrumb-section {
    background: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--gallery-primary);
}

.breadcrumb-item.active {
    color: var(--text-dark);
}

/* Page Header - Mengikuti style dari posts */
.page-header {
    background: linear-gradient(135deg, var(--gallery-primary), var(--gallery-secondary));
    color: white;
    padding: 2rem 0;
    margin-top: -1px; /* Overlap with navbar */
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.page-stats {
    text-align: right;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.stat-item i {
    color: var(--gallery-accent);
}

/* ===========================================
   GALLERY CONTROLS & FILTERS
   =========================================== */

.gallery-controls {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.controls-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Search & View Options */
.search-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.gallery-search-box input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 2.5rem;
    border: 2px solid var(--gallery-light);
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    z-index: 1;
}

.gallery-search-box input:focus {
    outline: none;
    border-color: var(--gallery-accent);
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.1);
    transform: scale(1.02);
}

.gallery-search-box .search-icon,
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 0.9rem;
    z-index: 2;
    pointer-events: none;
}

.gallery-search-box .search-clear,
.search-clear {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 2;
}

.gallery-search-box .search-clear:hover,
.search-clear:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: translateY(-50%) scale(1.1);
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gallery-light);
    background: white;
    color: var(--gallery-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-btn:hover,
.view-btn.active {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: white;
    transform: translateY(-2px);
}

/* Category Filters */
.category-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -0.5rem; /* Negative margin to allow full width scrolling */
}

.filter-scroll {
    display: flex;
    gap: 0.5rem;
    min-width: max-content;
    padding: 0 0.5rem; /* Add padding to prevent clipping on sides */
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.category-filters::-webkit-scrollbar {
    height: 6px;
}

.category-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.category-filters::-webkit-scrollbar-thumb {
    background: var(--gallery-accent);
    border-radius: 10px;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--gallery-light);
    background: white;
    color: var(--gallery-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: white;
    transform: translateY(-2px);
}

.category-btn .count {
    background: rgba(62, 180, 137, 0.1);
    color: var(--gallery-primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-btn.active .count,
.category-btn:hover .count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Sort & Filter Info */
.sort-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-options label {
    font-weight: 500;
    color: var(--gallery-primary);
    font-size: 0.9rem;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gallery-light);
    border-radius: 15px;
    background: white;
    color: var(--gallery-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-options select:focus {
    outline: none;
    border-color: var(--gallery-accent);
    box-shadow: 0 0 0 3px rgba(62, 180, 137, 0.1);
}

.filter-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-results {
    font-size: 0.9rem;
    color: var(--text-light);
}

.reset-filters-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: 1px solid var(--text-light);
    color: var(--text-light);
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-btn:hover {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: white;
}

/* ===========================================
   FEATURED ALBUMS SECTION
   =========================================== */

.featured-albums {
    background: white;
    padding: 4rem 0;
    position: relative;
}

/* Section Header - konsisten dengan posts */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    color: var(--gallery-primary);
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h3 i {
    color: var(--gallery-accent);
}

.results-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

.featured-view-btn {
    text-align: center;
    margin-bottom: 3rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.featured-album {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.featured-album:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(27, 78, 59, 0.15);
}

.featured-album::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.8s ease;
    z-index: 1;
    pointer-events: none;
}

.featured-album:hover::before {
    left: 100%;
}

.featured-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-album:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gallery-gradient);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.featured-stats {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.featured-stats span {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.featured-stats span:hover {
    background: var(--gallery-accent);
    transform: scale(1.05);
}

/* Featured Type Badge */
.featured-type {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--gallery-accent);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
    z-index: 2;
}

/* Enhanced Featured Content */
.featured-content {
    padding: 1.5rem;
}

.featured-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gallery-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.featured-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced Featured Meta Information */
.featured-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.featured-date-views {
    display: flex;
    gap: 1rem;
}

.featured-date,
.featured-views {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.featured-date i,
.featured-views i {
    color: var(--gallery-accent);
}

/* Featured Categories */
.featured-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.featured-category-tag {
    background: rgba(62, 180, 137, 0.1);
    color: var(--gallery-accent);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-category-tag:hover {
    background: var(--gallery-accent);
    color: white;
    transform: translateY(-1px);
}

.featured-category-more {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.7rem;
}

/* Featured Location */
.featured-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.featured-location i {
    color: var(--gallery-accent);
}

/* Enhanced Featured Actions */
.featured-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.featured-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.featured-like-btn,
.featured-share-btn {
    background: none;
    border: 1px solid var(--gallery-light);
    color: var(--gallery-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.featured-like-btn:hover,
.featured-share-btn:hover {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: white;
    transform: translateY(-1px);
}

.featured-like-btn.liked {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.featured-like-btn.liked i {
    animation: likeHeartBeat 0.6s ease;
}

.featured-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ===========================================
   ALBUMS SECTION
   =========================================== */

.albums-section {
    background: #f8f9fa;
    padding: 3rem 0;
    min-height: 400px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem 0;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 20px;
    margin: 2rem 0;
}

.loading-spinner {
    font-size: 2rem;
    color: var(--gallery-accent);
    margin-bottom: 1rem;
    background: var(--gallery-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    transition: all 0.5s ease;
}

/* List view override */
.albums-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.albums-grid.list-view .album-card {
    display: flex;
    max-height: 200px;
    margin-bottom: 0;
}

.albums-grid.list-view .album-image {
    width: 300px;
    flex-shrink: 0;
}

.albums-grid.list-view .album-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

/* Album Card */
.album-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(27, 78, 59, 0.15);
}

.album-card:active {
    transform: translateY(-4px);
}

.album-card:focus-within {
    outline: 3px solid rgba(62, 180, 137, 0.3);
    outline-offset: 2px;
}

.album-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.album-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.album-card:hover .album-thumbnail {
    transform: scale(1.05);
}

.album-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 78, 59, 0.6);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-card:hover .album-overlay {
    opacity: 1;
}

.album-stats {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.album-stats span {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.preview-btn {
    background: var(--gallery-accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    text-decoration: none !important; /* Menghapus underline */
}

.preview-btn:hover {
    background: var(--gallery-primary);
    transform: scale(1.05);
    text-decoration: none !important; /* Menghapus underline saat hover */
}

.preview-btn:focus,
.preview-btn:visited,
.preview-btn:active {
    text-decoration: none !important; /* Menghapus underline untuk semua state */
    color: white; /* Mempertahankan warna putih */
}

/* Efek lingkaran overlay pada button - Ripple Effect */
.preview-btn::before {
    content: '';                           /* Membuat pseudo-element kosong */
    position: absolute;                    /* Posisi absolut di dalam button */
    top: 50%;                             /* Posisi vertikal tengah button */
    left: 50%;                            /* Posisi horizontal tengah button */
    width: 0;                             /* Awalnya tidak terlihat */
    height: 0;                            /* Awalnya tidak terlihat */
    background: rgba(255,255,255,0.3);    /* Lingkaran putih transparan */
    border-radius: 50%;                   /* Membuat bentuk lingkaran sempurna */
    transform: translate(-50%, -50%);     /* Centering sempurna dari titik tengah */
    transition: width 0.3s ease, height 0.3s ease; /* Animasi smooth untuk perbesaran */
}

/* Saat hover: lingkaran membesar dari tengah - seperti ripple di air */
.preview-btn:hover::before {
    width: 100px;                         /* Lingkaran membesar horizontal */
    height: 100px;                        /* Lingkaran membesar vertikal */
}

.album-type {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gallery-gradient);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}

.album-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.album-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gallery-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.album-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.album-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.album-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-tag {
    background: rgba(62, 180, 137, 0.1);
    color: var(--gallery-accent);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: var(--gallery-accent);
    color: white;
}

.category-more {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.7rem;
}

.album-location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.album-location i {
    color: var(--gallery-accent);
}

.album-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.back-to-gallery {
    background: transparent;
    color: var(--gallery-primary);
    border: 2px solid var(--gallery-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.album-link {
    background: var(--gallery-accent);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.album-link:hover {
    background: var(--gallery-primary);
    color: white;
    transform: translateY(-2px);
}

.back-to-gallery:hover {
    background: var(--gallery-primary);
    color: white;
    border-color: var(--gallery-primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(27, 78, 59, 0.3);
}

.album-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.like-btn,
.share-btn {
    background: none;
    border: 1px solid var(--gallery-light);
    color: var(--gallery-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.like-btn:hover,
.share-btn:hover {
    background: var(--gallery-accent);
    border-color: var(--gallery-accent);
    color: white;
    transform: translateY(-1px);
}

.like-btn.liked {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Like animation */
.like-btn.like-animation {
    animation: likeHeartBeat 0.6s ease;
}

@keyframes likeHeartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

/* Count update animation */
.like-count.count-update {
    animation: countUpdate 0.3s ease;
}

@keyframes countUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Loading state for buttons */
.like-btn:disabled,
.share-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===========================================
   GALLERY STATS SECTION
   =========================================== */

.gallery-stats {
    background: white;
    padding: 3rem 0;
    border-top: 1px solid #eee;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(62, 180, 137, 0.05), rgba(27, 78, 59, 0.05));
    border-radius: 20px;
    border: 1px solid rgba(62, 180, 137, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-grid .stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gallery-gradient);
    opacity: 0.1;
    transition: left 0.5s ease;
}

.stats-grid .stat-item:hover::before {
    left: 0;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(62, 180, 137, 0.15);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--gallery-accent);
    margin-bottom: 1rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gallery-primary);
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.stat-number {
    background: var(--gallery-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===========================================
   LOAD MORE & EMPTY STATES
   =========================================== */

.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    background: var(--gallery-gradient);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gallery-gradient-secondary);
    transition: left 0.3s ease;
}

.load-more-btn:hover::before {
    left: 0;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62, 180, 137, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.load-more-btn:disabled::before {
    display: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    border: 2px dashed var(--gallery-light);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(62, 180, 137, 0.05) 10px,
        rgba(62, 180, 137, 0.05) 20px
    );
    animation: moveStripes 20s linear infinite;
}

@keyframes moveStripes {
    0% { transform: translateX(0); }
    100% { transform: translateX(40px); }
}

.empty-state i {
    font-size: 4rem;
    color: var(--gallery-light);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.empty-state h3 {
    color: var(--gallery-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 1200px) {
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 2.5rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .gallery-controls {
        padding: 1.5rem 0;
        margin-bottom: 1rem;
    }
    
    .controls-card {
        padding: 1.5rem;
    }
    
    .controls-wrapper {
        gap: 1rem;
    }
    
    .search-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gallery-search-box {
        max-width: none;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .sort-filter-section {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .albums-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .albums-grid.list-view .album-card {
        flex-direction: column;
        max-height: none;
    }
    
    .albums-grid.list-view .album-image {
        width: 100%;
        height: 200px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .album-details {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .category-filters {
        justify-content: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .album-card {
        margin-bottom: 1rem;
    }
    
    .featured-album {
        margin-bottom: 1rem;
    }
}

/* ===========================================
   ACCESSIBILITY & FOCUS STYLES
   =========================================== */

.album-card:focus-within {
    outline: 3px solid rgba(62, 180, 137, 0.3);
    outline-offset: 2px;
}

.preview-btn:focus,
.category-btn:focus,
.load-more-btn:focus {
    outline: 3px solid rgba(62, 180, 137, 0.3);
    outline-offset: 2px;
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    .gallery-controls,
    .album-actions,
    .load-more-section {
        display: none !important;
    }
    
    .album-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .albums-grid {
        display: block;
    }
    
    .page-header {
        background: none !important;
        color: black !important;
        padding: 1rem 0;
    }
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.toast.toast-success {
    border-left: 4px solid #10b981;
}

.toast.toast-error {
    border-left: 4px solid #ef4444;
}

.toast.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-content i {
    font-size: 1.2rem;
}

.toast-content i.fa-check-circle {
    color: #10b981;
}

.toast-content i.fa-exclamation-circle {
    color: #ef4444;
}

.toast-content i.fa-info-circle {
    color: #3b82f6;
}

.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #333;
}
