/* ============================================
   FACILITY PAGE
   ============================================ */

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(180deg, #1a1d24 0%, #252a33 30%, #1e2229 70%, #1a1d24 100%);
    color: #e8eaed;
}

html.fac-lb-open { overflow: hidden; }

.facility-page h2 span,
.facility-page h1 span {
    color: var(--brand-light, #d65a4f);
}

/* ---------- Hero ---------- */
.fac-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 24px 80px;
    box-sizing: border-box;
}

.fac-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.fac-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(26, 29, 36, 0.35) 0%, rgba(26, 29, 36, 0.85) 75%),
        linear-gradient(180deg, rgba(26, 29, 36, 0.4) 0%, rgba(26, 29, 36, 0.2) 50%, #1a1d24 100%);
    z-index: 1;
}

.fac-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    text-align: center;
    animation: facFadeUp 0.9s ease both;
}

.fac-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(214, 90, 79, 0.6);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f3b3ac;
    background: rgba(180, 74, 63, 0.15);
    backdrop-filter: blur(4px);
}

.fac-hero h1 {
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.12;
    font-weight: 700;
    color: #fff;
    margin: 20px 0 18px;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.fac-hero p {
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.6;
    color: #d5d8dd;
    margin: 0 auto 32px;
    max-width: 620px;
}

.fac-hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.fac-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.fac-btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--brand-primary, #b44a3f), var(--brand-dark, #8b3a32));
    box-shadow: 0 4px 20px rgba(180, 74, 63, 0.4);
}

.fac-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(180, 74, 63, 0.55);
}

.fac-btn-ghost {
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
}

.fac-btn-ghost:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.16);
}

.fac-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
}

.fac-scroll span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: facScroll 1.8s infinite;
}

/* ---------- Sections ---------- */
.fac-section {
    padding: 90px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.fac-heading {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

.fac-heading h2,
.fac-tour-text h2,
.fac-cta h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 14px;
}

.fac-heading p {
    color: #aab0b9;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Highlight cards ---------- */
.fac-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.fac-card {
    padding: 30px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.fac-card:hover {
    transform: translateY(-6px);
    border-color: rgba(214, 90, 79, 0.5);
    background: rgba(180, 74, 63, 0.08);
}

.fac-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-primary, #b44a3f), var(--brand-dark, #8b3a32));
    margin-bottom: 18px;
}

.fac-card-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fac-card h3 {
    font-size: 19px;
    color: #fff;
    margin: 0 0 8px;
}

.fac-card p {
    font-size: 15px;
    line-height: 1.55;
    color: #aab0b9;
    margin: 0;
}

/* ---------- Gallery ---------- */
.fac-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    grid-auto-flow: dense;
    gap: 16px;
}

.fac-tile {
    position: relative;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    background: #111;
    font: inherit;
    text-align: left;
}

.fac-tile.is-tall,
.fac-tile.is-tall-lg { grid-row: span 2; }
.fac-tile.is-wide    { grid-column: span 2; }

.fac-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.fac-tile:hover img,
.fac-tile:focus-visible img {
    transform: scale(1.07);
}

.fac-tile:focus-visible {
    outline: 3px solid var(--brand-light, #d65a4f);
    outline-offset: 3px;
}

.fac-tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 50px 20px 18px;
    background: linear-gradient(180deg, transparent, rgba(10, 12, 16, 0.92));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transform: translateY(30%);
    opacity: 0.9;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.fac-tile-caption strong { font-size: 17px; font-weight: 600; }

.fac-tile-caption small {
    font-size: 14px;
    color: #c9ccd2;
    line-height: 1.45;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fac-tile:hover .fac-tile-caption,
.fac-tile:focus-visible .fac-tile-caption {
    transform: translateY(0);
    opacity: 1;
}

.fac-tile:hover .fac-tile-caption small,
.fac-tile:focus-visible .fac-tile-caption small {
    opacity: 1;
}

/* ---------- Tour ---------- */
.fac-tour-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: center;
}

.fac-tour-text p {
    color: #aab0b9;
    font-size: 17px;
    line-height: 1.7;
}

.fac-checklist {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
}

.fac-checklist li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    color: #e8eaed;
}

.fac-checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--brand-primary, #b44a3f)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.fac-tour-video video {
    width: 100%;
    border-radius: 18px;
    display: block;
    background: #000;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- CTA ---------- */
.fac-cta {
    text-align: center;
    margin: 20px auto 90px;
    max-width: 1100px;
    padding: 60px 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(214, 90, 79, 0.35), transparent 55%),
        linear-gradient(135deg, #2a2f39, #1e2229);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    width: calc(100% - 48px);
}

.fac-cta p {
    color: #c3c7ce;
    font-size: 17px;
    margin: 0 0 28px;
}

/* ---------- Lightbox ---------- */
.fac-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 10, 14, 0.94);
    padding: 24px;
    animation: facFade 0.25s ease;
}

.fac-lightbox[hidden] { display: none; }

.fac-lightbox figure {
    margin: 0;
    max-width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fac-lightbox img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.fac-lightbox figcaption {
    margin-top: 16px;
    text-align: center;
    color: #e8eaed;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fac-lightbox figcaption strong { font-size: 18px; }
.fac-lightbox figcaption span   { color: #aab0b9; font-size: 15px; }
.fac-lightbox figcaption em     { color: #888e98; font-size: 13px; font-style: normal; }

.fac-lb-close,
.fac-lb-nav {
    position: absolute;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background 0.2s ease;
}

.fac-lb-close:hover,
.fac-lb-nav:hover { background: var(--brand-primary, #b44a3f); }

.fac-lb-close {
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    font-size: 30px;
    line-height: 1;
}

.fac-lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 36px;
    line-height: 1;
}

.fac-lb-prev { left: 20px; }
.fac-lb-next { right: 20px; }

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.fac-cards .reveal:nth-child(2),
.fac-gallery .reveal:nth-child(3n+2) { transition-delay: 0.1s; }
.fac-cards .reveal:nth-child(3),
.fac-gallery .reveal:nth-child(3n)   { transition-delay: 0.2s; }
.fac-cards .reveal:nth-child(4)      { transition-delay: 0.3s; }

@keyframes facFadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
}

@keyframes facFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes facScroll {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .fac-cards { grid-template-columns: repeat(2, 1fr); }
    .fac-tour-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
    .fac-section { padding: 64px 18px; }
    .fac-hero { min-height: 88vh; }
    .fac-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 10px;
    }
    .fac-tile.is-tall-lg { grid-row: auto; }
    .fac-tile-caption { transform: none; padding: 36px 14px 12px; }
    .fac-tile-caption strong { font-size: 14px; }
    .fac-tile-caption small { display: none; }
    .fac-lb-nav { width: 42px; height: 42px; font-size: 28px; }
    .fac-lb-prev { left: 8px; }
    .fac-lb-next { right: 8px; }
}

@media (max-width: 520px) {
    .fac-cards { grid-template-columns: 1fr; }
    .fac-cta { width: calc(100% - 32px); padding: 44px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .fac-hero-content, .fac-scroll span { animation: none; }
}
