/* ============================================
   GALLERY PAGE STYLES
   ============================================ */

.gallery-page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 6rem 0 4rem;
    margin-top: 70px;
    text-align: center;
}

.gallery-page-hero h1 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gallery-page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 3rem 0;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
}

.filter-btn:hover {
    background: var(--primary);
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    group: "gallery";
}

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

.gallery-item:hover .gallery-item-image {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.gallery-item-icon {
    color: #fff;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-icon {
    opacity: 1;
}

.gallery-item-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 1;
}

.gallery-item:hover .gallery-item-label {
    transform: translateY(0);
}

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    font-family: 'Playfair Display', serif;
}

.gallery-item-category {
    font-size: 0.85rem;
    opacity: 0.8;
    margin: 0;
}

/* Modal styles */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    position: relative;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.gallery-modal-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.gallery-modal-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    color: #fff;
}

.gallery-modal-title {
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    font-family: 'Playfair Display', serif;
}

.gallery-modal-desc {
    margin: 0;
    opacity: 0.9;
    line-height: 1.6;
}

.gallery-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.gallery-modal-close:hover {
    color: var(--primary);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-modal-arrow {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
}

.gallery-modal-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .gallery-page-hero h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .gallery-modal-content {
        padding: 0;
    }

    .gallery-modal-image {
        margin-bottom: 1rem;
    }

    .gallery-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
