/* ==========================================
   Interactive Facility Gallery Styles
   ========================================== */

/* Main Viewer Container */
.featured-image-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem auto;
    text-align: center;
    background: #ffffff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* Enforces a stable frame so the layout doesn't jump */
.featured-image-container img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.25s ease-in-out;
}

/* Featured Caption */
#mainCaption {
    margin-top: 1rem;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
}

/* 3-Column Thumbnail Grid */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Thumbnail Styling & Hover State */
.thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    border: 3px solid transparent;
    transition: all 0.2s ease-in-out;
    opacity: 0.85;
}

.thumb:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* Active / Locked Thumbnail Border Highlight */
.thumb.active-thumb {
    opacity: 1;
    border-color: #0d9488; /* Primary Teal Accent */
    box-shadow: 0 0 12px rgba(13, 148, 136, 0.35);
}

/* ==========================================
   Responsive Adjustments (Mobile & Tablet)
   ========================================== */
@media (max-width: 768px) {
    .featured-image-container img {
        height: 280px; /* Scaled down height for phones */
    }

    .thumbnail-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 0.75rem;
    }

    .thumb {
        height: 100px;
    }
}