/* Gallery Page Specific Styles */

.gallery-section {
    padding: 80px 50px;
    background-color: #ffffff;
    min-height: calc(100vh - 200px);
}

body.dark-theme .gallery-section {
    background-color: #020617;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

body.dark-theme .gallery-header h1 {
    color: #e2e8f0;
}

.gallery-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

body.dark-theme .gallery-header p {
    color: #94a3b8;
}

/* Gallery Container */
.gallery-container {
    max-width: 1400px;
    margin: 0 auto 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
}

.gallery-item.show {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item.hide-left {
    opacity: 0;
    transform: translateX(-30px);
}

.gallery-item.hide-right {
    opacity: 0;
    transform: translateX(30px);
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item.show:hover {
    transform: translateY(-5px) scale(1.02);
}

body.dark-theme .gallery-item {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body.dark-theme .gallery-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Pagination Wrapper */
.gallery-pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Gallery Navigation Buttons */
.gallery-nav-btn {
    background-color: rgba(59, 130, 246, 0.9);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.gallery-nav-btn:hover:not(:disabled) {
    background-color: rgba(37, 99, 235, 1);
    transform: scale(1.1);
}

.gallery-nav-btn:disabled {
    background-color: rgba(148, 163, 184, 0.5);
    cursor: not-allowed;
    opacity: 0.5;
}

body.dark-theme .gallery-nav-btn {
    background-color: rgba(96, 165, 250, 0.9);
}

body.dark-theme .gallery-nav-btn:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 1);
}

body.dark-theme .gallery-nav-btn:disabled {
    background-color: rgba(71, 85, 105, 0.5);
}

/* Gallery Pagination */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-pagination .page-btn {
    background-color: #e2e8f0;
    color: #1e293b;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-pagination .page-btn:hover {
    background-color: #cbd5e1;
    transform: translateY(-2px);
}

.gallery-pagination .page-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

body.dark-theme .gallery-pagination .page-btn {
    background-color: #1e293b;
    color: #e2e8f0;
}

body.dark-theme .gallery-pagination .page-btn:hover {
    background-color: #334155;
}

body.dark-theme .gallery-pagination .page-btn.active {
    background-color: #3b82f6;
    color: #ffffff;
}

/* Image Modal */
.image-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal-overlay.active {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.close-modal-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background-color: transparent;
    color: #ffffff;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    transition: transform 0.3s;
    line-height: 1;
}

.close-modal-btn:hover {
    transform: scale(1.2);
}

.modal-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 20px;
}

.modal-nav-btn {
    background-color: rgba(59, 130, 246, 0.9);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav-btn:hover {
    background-color: rgba(37, 99, 235, 1);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 30px;
    }

    .gallery-header h1 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .gallery-pagination .page-btn {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .gallery-section {
        padding: 40px 20px;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-header p {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .gallery-pagination-wrapper {
        flex-direction: column;
        gap: 15px;
    }
}
