/* ===== Facilities Page Styles ===== */

/* Page Header */
.page-header {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 4rem;
    margin-top: 72px;
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.95) 0%, rgba(13, 148, 136, 0.9) 100%);
    z-index: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.page-header p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Introduction Section */
.facilities-intro {
    padding: 4rem 0;
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text);
    text-align: center;
}

/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--light);
}

.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-caption h4 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.gallery-caption p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* Gallery Item Loading State */
.gallery-item {
    background: linear-gradient(90deg, var(--light) 0%, #e2e8f0 50%, var(--light) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.gallery-item.loaded {
    animation: none;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Trust Section */
.trust-section {
    padding: 5rem 0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.trust-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--white);
    border: 1px solid var(--light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.trust-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.trust-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.15) 0%, rgba(13, 148, 136, 0.15) 100%);
    border-radius: 50%;
    color: var(--primary);
}

.trust-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.trust-card p {
    font-size: 0.938rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
}

.lightbox-caption {
    color: var(--white);
    font-size: 1.125rem;
    text-align: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 1rem;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-close svg,
.lightbox-nav svg {
    display: block;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-nav {
        padding: 0.75rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }
}

/* Animation delays for gallery items */
.gallery-item:nth-child(1) { animation-delay: 0s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.3s; }
.gallery-item:nth-child(5) { animation-delay: 0.4s; }
.gallery-item:nth-child(6) { animation-delay: 0.5s; }
.gallery-item:nth-child(7) { animation-delay: 0.6s; }
.gallery-item:nth-child(8) { animation-delay: 0.7s; }
.gallery-item:nth-child(9) { animation-delay: 0.8s; }
.gallery-item:nth-child(10) { animation-delay: 0.9s; }
.gallery-item:nth-child(11) { animation-delay: 1s; }
