.gallery-header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/raman-hall.jpg');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    text-align: center;
    color: white;
}

.gallery-container {
    padding: 0 0 40px;
}

.tabs-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background-color: white;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab-btn:hover {
    border-color: #0792df;
    color: #06b5d8d4;
}

.tab-btn.active {
    background-color: #06b5d8d4;
    color: white;
    border-color: #0792df;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
}

.photo-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(71 71 71 / 57%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay i {
    color: white;
    font-size: 40px;
}

/* Modal Styles */
.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.photo-modal.active {
    display: flex;
}

.modal-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 80vh;
    display: inline-block;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    -webkit-font-smoothing: antialiased;
    display: block;
    transition: fadeIn 2s ease-in-out;
}

/* .modal-image.fade-out {
      opacity: 0;
    } */

@keyframes fadeIn {
    from {
        transition-duration: 1s;
    }

    to {
        transition-duration: 2s;
    }
}

/* .modal-image.fade-in {
      animation: fadeIn 1s ease-in-out;
    } */

.modal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 5px;
    pointer-events: none;
}

.modal-controls>button {
    pointer-events: all;
}

.modal-btn {
    background-color: rgba(22 22 22 / 49%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.modal-btn:hover {
    background-color: rgba(22 22 22 / 80%);
    transform: scale(1.15);
}

.modal-btn.close-btn {
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    bottom: 20px;
    right: 20px;
    top: -50px;
    right: 0;
    border-radius: 50%;
    padding: 6px 10px;
    width: 40px;
    height: 40px;
    z-index: 10000;
    font-size: 20px;
}

.modal-btn.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-counter {
    color: white;
    font-size: 15px;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 10px;
    border-radius: 6px;
    position: absolute;
    left: 0;
    top: -50px;
    text-align: center;
    pointer-events: all;
}

.no-photos {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-photos i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #d4a574;
}

@media (max-width: 768px) {
    .tabs-wrapper {
        overflow-x: auto;
        padding: 15px 10px;
    }

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

    .photo-item img {
        height: 220px;
    }

    .modal-content-wrapper {
        max-width: 95%;
        max-height: 85vh;
    }

    .modal-image {
        max-height: 70vh;
    }

    .modal-btn {
        width: 45px;
        height: 45px;
        padding: 10px 14px;
        font-size: 20px;
    }

    .modal-counter {
        font-size: 13px;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .photo-item img {
        height: 180px;
    }

    .modal-content-wrapper {
        max-width: 98%;
        max-height: 85vh;
    }

    .modal-image {
        max-height: 65vh;
    }

    .modal-btn {
        width: 40px;
        height: 40px;
        padding: 8px 12px;
        font-size: 18px;
    }

    .modal-counter {
        font-size: 12px;
        padding: 8px 10px;
    }

    .modal-controls {
        padding: 15px;
    }
}