/* Gallery Specific Styles */
.body {
    margin: 0;
    background-color: var(--background-color);
}
.gallery-main {
    padding: 2rem 5dvw;
    background-color: var(--background-color);
    min-height: 100dvh;
}

.gallery-header {
    text-align: center;
    padding: 2rem 0;
}

.gallery-title-main {
    font-family: "Philosopher", sans-serif;
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 400;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gallery-subtitle {
    font-family: "Alumni Sans Pinstripe", sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--secondary-color);
    font-weight: 600;
}

.gallery-container {
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-auto-rows: 250px;
    margin-bottom: 3rem;
    gap: .1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    /* border-radius: 12px; */
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-footer {
    text-align: center;
    padding: 2rem 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-family: "Alumni Sans Pinstripe", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(77, 123, 64, 0.3);
}

.back-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 123, 64, 0.4);
}

/* Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 20000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 95vw;
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zoomIn 0.3s ease;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.close-modal:hover {    
    transform: scale(1.1);
}

.modal-info {
    display: none;
}

.modal-nav {
    position: fixed;
    top: 50%;
    width: 100vw;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1000;
}

.nav-btn {    
    background-color: transparent;
    border-color: transparent;
    color: white;
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: scale(1.2);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-auto-rows: 200px;
    }
    
    .gallery-item.wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .gallery-main {
        padding: 1rem 3dvw;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-auto-rows: 180px;
        gap: 0.8rem;
    }
    
    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .gallery-header {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }
    
    .modal-nav {
        padding: 0 15px;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .close-modal {
        top: 15px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 150px;
        gap: 0.5rem;
    }
    
    .gallery-main {
        padding: 1rem 2dvw;
    }
    
    .modal-nav {
        padding: 0 10px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.8rem;
    }
}
