/* Gallery Section */
.gallery-section {
    padding: 80px 20px;
    /* background: #f9f9f9; */
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
    animation: revealHeader 0.8s ease forwards;
}

@keyframes revealHeader {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-title {
    font-family: var(--heading-font);
    font-size: 42px;
    font-weight: 600;
    color: #000;
    margin: 0 0 15px 0;
}

.gallery-subtitle {
    font-family: var(--text-font);
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: revealFilters 0.8s ease 0.2s forwards;
}

@keyframes revealFilters {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-btn {
    padding: 12px 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-family: var(--text-font);
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Gallery Item */
.gallery-item {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    animation: revealItem 0.6s ease forwards;
}

.gallery-item:nth-child(1) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
    animation-delay: 0.2s;
}

.gallery-item:nth-child(3) {
    animation-delay: 0.3s;
}

.gallery-item:nth-child(4) {
    animation-delay: 0.4s;
}

.gallery-item:nth-child(5) {
    animation-delay: 0.5s;
}

.gallery-item:nth-child(6) {
    animation-delay: 0.6s;
}

.gallery-item:nth-child(7) {
    animation-delay: 0.7s;
}

.gallery-item:nth-child(8) {
    animation-delay: 0.8s;
}

.gallery-item:nth-child(9) {
    animation-delay: 0.9s;
}

.gallery-item:nth-child(10) {
    animation-delay: 1s;
}

.gallery-item:nth-child(11) {
    animation-delay: 1.1s;
}

.gallery-item:nth-child(12) {
    animation-delay: 1.2s;
}

@keyframes revealItem {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gallery-item.hide {
    display: none;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-image:hover img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-image:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-image:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 5px 0;
}

.overlay-content p {
    font-family: var(--text-font);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Image Modal / Lightbox */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 8px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #fff;
    font-size: 45px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    font-size: 30px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    z-index: 10000;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: var(--text-font);
    font-size: 16px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 30px;
    max-width: 80%;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .gallery-container {
        padding: 0 40px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }

    .gallery-image {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        padding: 0 30px;
    }

    .gallery-section {
        padding: 60px 20px;
    }

    .gallery-title {
        font-size: 32px;
    }

    .gallery-subtitle {
        font-size: 14px;
    }

    .gallery-filters {
        gap: 10px;
        margin-bottom: 40px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-image {
        height: 250px;
    }

    .overlay-content h3 {
        font-size: 18px;
    }

    .overlay-content p {
        font-size: 13px;
    }

    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 35px;
        width: 40px;
        height: 40px;
    }

    .modal-nav {
        font-size: 24px;
        padding: 15px 12px;
    }

    .modal-prev {
        left: 15px;
    }

    .modal-next {
        right: 15px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }

    .modal-caption {
        bottom: 20px;
        font-size: 14px;
        padding: 12px 20px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        padding: 0 20px;
    }

    .gallery-section {
        padding: 50px 15px;
    }

    .gallery-title {
        font-size: 28px;
    }

    .gallery-header {
        margin-bottom: 35px;
    }

    .gallery-filters {
        margin-bottom: 30px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .gallery-image {
        height: 220px;
    }

    .gallery-overlay {
        padding: 20px;
    }
}