/* Enhanced gallery.css with horizontal slide effect */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1rem;
    padding: 1rem 0;
    overflow: hidden; /* Ensures content doesn't overflow during animations */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0); /* Starting position */
}

.gallery-item:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Horizontal slide animation when clicked */
.gallery-item.clicked {
    animation: slideInHorizontal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInHorizontal {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    touch-action: none; /* Prevents scrolling on touch devices */
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    aspect-ratio: 1/1;
    transition: background 0.3s ease;
    z-index: 1001;
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-btn:hover, .lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Footer Styles - Align with styles.css */
footer {
    color: white;
    padding: 40px 0 20px;
    background-image: url('../images/footer-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Mobile-Specific Enhancements */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .lightbox-btn {
        padding: 0.7rem;
    }
}

/* Existing styles remain unchanged, adding new styles for social media icons */
.social-media-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
    list-style: none;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light);
    color: var(--primary);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
    animation: socialPulse 0.5s ease-in-out;
}

.social-link.facebook:hover {
    background-color: #3b5998;
    color: white;
}

.social-link.tiktok:hover {
    background-color: #000000;
    color: white;
}

.social-link.instagram:hover {
    background-color: #E1306C;
    color: white;
}

.social-link.linkedin:hover {
    background-color: #0A66C2;
    color: white;
}

.social-link.youtube:hover {
    background-color: #FF0000;
    color: white;
}

/* Ensure touch devices don't trigger hover effects */
@media (hover: none) and (pointer: coarse) {
    .social-link:hover {
        transform: none;
        box-shadow: none;
        background-color: var(--light);
        color: var(--primary);
    }
}

/* Responsive adjustments for social media icons */
@media (max-width: 768px) {
    .social-media-list {
        gap: 10px;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .social-media-list {
        gap: 8px;
    }

    .social-link {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }

    .gallery-item {
        aspect-ratio: 4/5;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Lightbox Buttons */
.lightbox-btn {
    padding: 15px;
    min-width: 48px;
    min-height: 48px;
    font-size: 24px;
}

.lightbox-close {
    font-size: 28px;
    padding: 10px;
    min-width: 48px;
    min-height: 48px;
}

@media (max-width: 768px) {
    .lightbox-btn {
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        font-size: 20px;
    }

    .lightbox-close {
        font-size: 24px;
        top: 0.5rem;
        right: 0.5rem;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    #lightbox-image {
        max-height: 70vh;
    }

    .lightbox-caption {
        font-size: 1rem;
        padding: 0.5rem;
    }
}