/* Clean Minimal Gallery Design - Professional & Elegant */

/* ============== VARIABLES ============== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg-color: #ffffff;
    --bg-alt: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-light: rgba(37, 99, 235, 0.08);
    --shadow-medium: rgba(37, 99, 235, 0.15);
    --shadow-colored: rgba(124, 58, 237, 0.2);
    --hover-color: #f8fafc;
    --card-gradient: linear-gradient(145deg, #ffffff, #f1f5f9);
    
    /* Additional variables needed for lightbox */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --blur-sm: blur(4px);
    --blur-md: blur(8px);
    --blur-lg: blur(16px);
}

[data-theme="dark"] {
    --primary-color: #ffffff;
    --text-color: #e5e5e5;
    --text-light: #b5b5b5;
    --text-muted: #888888;
    --bg-color: #1a1a1a;
    --bg-alt: #252525;
    --border-color: #333333;
    --border-light: #404040;
    --shadow-light: rgba(255, 255, 255, 0.05);
    --shadow-medium: rgba(255, 255, 255, 0.1);
    --hover-color: #252525;
    
    /* Dark theme shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8), 0 10px 10px -5px rgba(0, 0, 0, 0.6);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}

/* ============== RESET & BASE ============== */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    padding: 0;
}

/* ============== CONTAINER ============== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============== HERO SECTION ============== */
.hero-section {
    background: var(--bg-gradient);
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    background: linear-gradient(45deg, #ffffff, #f0f9ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(255,255,255,0.3);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
    font-weight: 400;
    text-shadow: 0 1px 10px rgba(0,0,0,0.2);
}

/* ============== HEADER ============== */
.header {
    background: var(--bg-color);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ============== SIMPLE NAVIGATION ============== */
.simple-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--hover-color);
}

.nav-link.active {
    color: var(--primary-color);
    background: var(--hover-color);
    font-weight: 600;
}

.search-box {
    display: flex;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .simple-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-input {
        flex: 1;
    }
}

.search-wrapper {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.2s ease;
    flex: 1;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* ============== STATS BAR ============== */
.stats-bar {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 3rem;
    background: var(--border-color);
}

/* ============== GALLERY GRID ============== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

/* ============== GALLERY CARDS ============== */
.gallery-card {
    background: var(--card-gradient);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.gallery-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px var(--shadow-colored), 0 12px 24px var(--shadow-medium);
    border-color: var(--accent-color);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* ============== CARD IMAGE ============== */
.card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--hover-color);
}

.gallery-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-thumbnail {
    transform: scale(1.05);
}

/* ============== CARD OVERLAY ============== */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .card-overlay {
    opacity: 1;
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    backdrop-filter: blur(10px);
}

.badge.trending {
    background: linear-gradient(135deg, var(--danger-color), #ff6b6b);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.badge.large {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.gallery-stats {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============== CARD CONTENT ============== */
.card-content {
    padding: 2rem;
    background: var(--bg-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
    flex-shrink: 0;
}

.card-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 1rem 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.rating-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    color: #ddd;
    font-size: 1rem;
}

.star.filled {
    color: #fbbf24;
}

.rating-text {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.explore-text {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.gallery-card:hover .explore-text {
    color: var(--primary-color);
}

/* ============== PLACEHOLDER IMAGE ============== */
.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--hover-color);
    color: var(--text-muted);
    gap: 1rem;
}

.placeholder-image span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ============== PAGINATION ============== */
.pagination-wrapper {
    margin: 4rem 0;
    text-align: center;
}

.pagination-info {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.page-ellipsis {
    padding: 0.75rem 0.5rem;
    color: var(--text-muted);
}

.page-jump {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
    background: var(--bg-color);
    color: var(--text-color);
}

.page-go {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.page-go:hover {
    opacity: 0.9;
}

/* ============== FOOTER ============== */
.footer {
    background: var(--hover-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin: 0 0 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin: 0.5rem 0;
}

.footer-section a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-section p {
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============== RESPONSIVE DESIGN ============== */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 2.5rem;
    }
    
    .nav-items {
        gap: 0.75rem;
    }
    
    .nav-item {
        min-width: 100px;
        padding: 0.875rem 1.25rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .main-navigation {
        padding: 1rem;
    }
    
    .nav-items {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .nav-item {
        min-width: 80px;
        padding: 0.75rem 1rem;
        flex: 1 1 calc(33.333% - 0.5rem);
        max-width: calc(33.333% - 0.5rem);
    }
    
    .nav-icon {
        font-size: 1.5rem;
    }
    
    .nav-text {
        font-size: 0.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .stats-content {
        justify-content: center;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .main-navigation {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .nav-items {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .nav-item {
        flex-direction: row;
        justify-content: flex-start;
        min-width: 100%;
        max-width: 100%;
        padding: 1rem 1.5rem;
        text-align: left;
    }
    
    .nav-icon {
        font-size: 1.25rem;
        margin-right: 0.5rem;
    }
    
    .nav-text {
        font-size: 0.9rem;
        text-align: left;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-meta {
        text-align: left;
        flex-direction: row;
        gap: 1rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* ============== THEME TOGGLE ============== */
.theme-toggle {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    width: 60px;
    height: 32px;
    transition: all 0.2s ease;
}

.theme-toggle-slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: transform 0.2s ease;
    transform: translateX(2px);
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(26px);
}

.theme-toggle-icon {
    font-size: 0.8rem;
    z-index: 1;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

[data-theme="dark"] .theme-toggle-icon.moon,
[data-theme="light"] .theme-toggle-icon.sun {
    opacity: 1;
}

/* ============== ACCESSIBILITY ============== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ============== PRINT STYLES ============== */
@media print {
    .gallery-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .card-overlay,
    .card-actions,
    .theme-toggle,
    
    .hero-section,
    .header,
    .stats-bar {
        border-bottom: 1px solid #ccc;
    }
}