/*** Gallery Styles ***/
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    gap: 15px;
    padding: 15px;
}

.gallery-item-tall {
    grid-row: span 2;
}

.gallery-item-wide {
    grid-column: span 2;
}

.gallery-item-small {
    grid-row: span 1;
    grid-column: span 1;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-auto-rows: 180px;
    }
    
    .gallery-item-wide {
        grid-column: auto;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    
    .gallery-item-tall {
        grid-row: auto;
    }
    
    .gallery-item-wide {
        grid-column: auto;
    }
}

.gallery-box {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-box:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay i {
    color: #fff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-box:hover .gallery-overlay {
    opacity: 1;
}

.gallery-box:hover .gallery-overlay i {
    transform: translateY(0);
}

/*** Instagram Grid ***/
.insta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
}

.insta-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 300px;
}

.insta-story {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.insta-story img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.insta-story:hover img {
    transform: scale(1.1);
}

.insta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.insta-story:hover .insta-overlay {
    opacity: 1;
}

.story-text {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.insta-story:hover .story-text {
    transform: translateY(0);
}

.story-text {
    color: #fff;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .insta-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .insta-item {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .insta-grid {
        grid-template-columns: 1fr;
    }
    
    .insta-item {
        height: 300px;
    }
}
