/* ==================== VARIABLES ==================== */
:root {
    --primary-blue: #0a2463;
    --secondary-blue: #1e3a8a;
    --accent-gold: #d4af37;
    --light-gold: #f4e4b3;
    --dark-navy: #05192d;
    --light-navy: #1a365d;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --text-dark: #212529;
    --text-light: #495057;
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ==================== GALLERY HERO ==================== */
.gallery-hero {
    background: linear-gradient(135deg, var(--dark-navy), var(--primary-blue));
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none" opacity="0.1"><path d="M0,0 L100,0 L100,100 Z" fill="white"/></svg>') no-repeat;
    background-size: cover;
    opacity: 0.1;
}

.gallery-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.gallery-hero-text {
    max-width: 600px;
}

.gallery-hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--white);
}

.gallery-hero-subtitle {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.gallery-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.gallery-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    border-top: 3px solid var(--accent-gold);
    min-width: 120px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--light-gray);
}

.gallery-hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-hero-image i {
    font-size: 12rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ==================== GALLERY CONTROLS ==================== */
.gallery-controls {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.gallery-filters {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-title {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
}

.gallery-view-options {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.view-title {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.view-buttons {
    display: flex;
    gap: 5px;
    background: var(--light-gray);
    padding: 5px;
    border-radius: var(--border-radius);
}

.view-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--medium-gray);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.view-btn:hover,
.view-btn.active {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-search {
    display: flex;
    width: 250px;
}

.gallery-search-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--white);
    color: var(--text-dark);
}

.gallery-search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.gallery-search-btn {
    background: var(--accent-gold);
    color: var(--dark-navy);
    border: none;
    padding: 0 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.gallery-search-btn:hover {
    background: var(--light-gold);
}

/* ==================== GALLERY CONTAINER ==================== */
.gallery-container {
    margin-bottom: 40px;
    transition: var(--transition);
}

/* حالت شبکه‌ای (پیش‌فرض) */
.gallery-container.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* حالت نامنظم (ماسونری) */
.gallery-container.masonry-view {
    columns: 320px;
    column-gap: 25px;
}

.gallery-container.masonry-view .gallery-item {
    break-inside: avoid;
    margin-bottom: 25px;
}

/* حالت لیستی */
.gallery-container.list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-container.list-view .gallery-item {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    height: auto;
    min-height: 200px;
}

.gallery-container.list-view .gallery-carousel {
    height: 200px;
}

/* ==================== گالری چند تصویری ==================== */
.gallery-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 440px;
    position: relative;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

/* کاروسل داخلی هر آیتم */
.gallery-carousel {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: var(--dark-navy);
}

.gallery-carousel-slide {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-carousel-slide.active {
    opacity: 1;
}

.gallery-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-carousel-slide.active img {
    transform: scale(1.05);
}

/* دکمه‌های ناوبری کاروسل */
.gallery-carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-carousel-nav {
    opacity: 1;
}

.gallery-carousel-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-blue);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-carousel-btn:hover {
    background: var(--white);
    transform: scale(1.1);
}

/* نشانگرهای اسلاید */
.gallery-carousel-dots {
    position: absolute;
    bottom: 15px;
    right: 50%;
    transform: translateX(50%);
    display: flex;
    gap: 8px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-carousel-dots {
    opacity: 1;
}

.gallery-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.gallery-carousel-dot.active {
    background: var(--accent-gold);
    transform: scale(1.2);
}

/* شمارنده تصاویر */
.gallery-image-counter {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(10, 36, 99, 0.9);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-image-counter i {
    font-size: 0.7rem;
}

/* محتوای اطلاعات آیتم */
.gallery-info {
    padding: 20px;
}

.gallery-category {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--dark-navy);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.gallery-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--primary-blue);
}

.gallery-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.6;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-date {
    font-size: 0.85rem;
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* آیکون بزرگنمایی */
.gallery-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.2rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-zoom {
    opacity: 1;
    transform: scale(1);
}

/* ==================== LOAD MORE BUTTON ==================== */
.gallery-load-more {
    text-align: center;
    margin-top: 40px;
}

.gallery-load-more .btn {
    padding: 12px 40px;
    font-size: 1.1rem;
}

/* ==================== ALBUMS SECTION ==================== */
.albums-section {
    background: var(--off-white);
    padding: 80px 0;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.album-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.album-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

.album-cover {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.album-card:hover .album-cover img {
    transform: scale(1.1);
}

.album-count {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(10, 36, 99, 0.9);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.album-content {
    padding: 25px;
}

.album-title {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.album-description {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.album-view-btn {
    color: var(--accent-gold);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.album-view-btn:hover {
    color: var(--primary-blue);
}

/* ==================== FEATURED IMAGES ==================== */
.featured-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.featured-image {
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.1);
}

/* ==================== LIGHTBOX MODAL ==================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.lightbox-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 800px;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-prev {
    right: 20px;
}

.lightbox-next {
    left: 20px;
}

.lightbox-image-container {
    max-height: 70vh;
    overflow: hidden;
}

.lightbox-image-container img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-caption {
    padding: 20px;
    background: var(--white);
    border-top: 1px solid var(--light-gray);
}

.lightbox-caption h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.lightbox-caption p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.lightbox-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.lightbox-category {
    background: var(--light-gray);
    color: var(--primary-blue);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.lightbox-counter {
    font-weight: 600;
    color: var(--dark-gray);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .gallery-container.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .gallery-container.masonry-view {
        columns: 300px;
    }
}

@media (max-width: 992px) {
    .gallery-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .gallery-hero-image i {
        font-size: 8rem;
    }
    
    .gallery-stats {
        justify-content: center;
    }
    
    .gallery-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gallery-filters,
    .gallery-view-options {
        width: 100%;
    }
    
    .gallery-search {
        width: 100%;
    }
    
    .gallery-container.list-view .gallery-item {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    .gallery-hero-title {
        font-size: 2.2rem;
    }
    
    .gallery-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .gallery-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .gallery-stat {
        width: 200px;
    }
    
    .gallery-container.grid-view {
        grid-template-columns: 1fr;
    }
    
    .gallery-container.masonry-view {
        columns: 1;
    }
    
    .gallery-container.list-view .gallery-item {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .gallery-container.list-view .gallery-carousel {
        height: 250px;
    }
    
    .albums-grid {
        grid-template-columns: 1fr;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
        width: 95%;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        padding: 60px 0;
    }
    
    .gallery-hero-title {
        font-size: 1.8rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .view-buttons {
        margin: 0 auto;
    }
    
    .gallery-search {
        width: 100%;
    }
    
    .gallery-item {
        height: 300px;
    }
    
    .gallery-carousel {
        height: 200px;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item.fade-in {
    animation: slideInUp 0.6s ease forwards;
}
/* ==================== HAMBURGER MENU FIX ==================== */
@media (max-width: 992px) {
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        
        width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        padding: 15px;
        border-radius: 0;
        border-bottom: 1px solid var(--light-gray);
        justify-content: flex-end;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
        z-index: 1001;
    }
    
    .menu-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .menu-backdrop.active {
        display: block;
    }
    
    /* تنظیم padding برای محتوای اصلی زیر هدر */
    .hero-banner {
        margin-top: 60px;
    }
    
    .content-wrapper {
        margin-top: 30px;
    }
}