/* Enhanced Gallery Styles */

/* Gallery Section Divider */
.gallery-divider {
    margin: 3rem 0 2rem;
    text-align: center;
    position: relative;
}

.gallery-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #20b2aa, #87ceeb, #20b2aa, transparent);
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
}

.gallery-section-title {
    display: inline-block;
    background: white;
    padding: 0 2.5rem;
    position: relative;
    z-index: 1;
    color: #20b2aa;
    font-family: 'Fredoka', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(32, 178, 170, 0.2);
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.gallery-section-title i {
    margin-right: 0.5rem;
    color: #48d1cc;
    animation: iconBounce 1.5s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.gallery-section-subtitle {
    color: #6c757d;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    margin-top: 0.75rem;
    font-style: italic;
    font-weight: 500;
}

/* Premises Gallery Grid */
.premises-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    perspective: 1000px;
}

.premises-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out backwards;
}

.premises-item:nth-child(1) { animation-delay: 0.1s; }
.premises-item:nth-child(2) { animation-delay: 0.2s; }
.premises-item:nth-child(3) { animation-delay: 0.3s; }
.premises-item:nth-child(4) { animation-delay: 0.4s; }
.premises-item:nth-child(5) { animation-delay: 0.5s; }
.premises-item:nth-child(6) { animation-delay: 0.6s; }
.premises-item:nth-child(7) { animation-delay: 0.7s; }
.premises-item:nth-child(8) { animation-delay: 0.8s; }
.premises-item:nth-child(9) { animation-delay: 0.9s; }
.premises-item:nth-child(10) { animation-delay: 1s; }
.premises-item:nth-child(11) { animation-delay: 1.1s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premises-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(32, 178, 170, 0.3);
}

.premises-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.premises-item:hover .premises-image {
    transform: scale(1.1);
}

.premises-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(32, 178, 170, 0.95), transparent);
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.premises-item:hover .premises-overlay {
    transform: translateY(0);
}

.premises-caption {
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* View All Button */
.view-all-btn {
    display: inline-block;
    margin: 2rem auto 0;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #20b2aa, #48d1cc);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.view-all-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(32, 178, 170, 0.4);
    background: linear-gradient(135deg, #48d1cc, #20b2aa);
}

.view-all-btn i {
    margin-left: 0.5rem;
}

.btn-center {
    text-align: center;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 107, 53, 0.8);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(32, 178, 170, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0,0,0,0.7);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-family: 'Fredoka', cursive;
    font-size: 1.1rem;
    text-align: center;
    max-width: 80%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .premises-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .premises-image {
        height: 200px;
    }
    
    .gallery-section-title {
        font-size: 1.5rem;
        padding: 0 1rem;
    }
    
    .lightbox-nav,
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .premises-grid {
        grid-template-columns: 1fr;
    }
    
    .premises-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(32, 178, 170, 0.85), transparent);
    }
}
