/* ============================================================ */
/* PAGE HEADER                                                  */
/* ============================================================ */
.page-header {
    position: relative;
    background-color: var(--ink);
    padding: 180px 0 80px;
    text-align: center;
    color: var(--surface);
    overflow: hidden; /* Keeps the pattern contained */
}

/* The Organic Tree Branch Pattern */
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Organic branches and leaves drawn in Gold */
    background-image: url("data:image/svg+xml,%3Csvg width='400' height='400' viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C5A059' stroke-width='1.5' stroke-opacity='0.15'%3E%3Cpath d='M-50,450 C100,250 200,100 450,-50'/%3E%3Cpath d='M100,300 C150,250 250,250 300,150'/%3E%3Cpath d='M200,200 C150,150 50,150 -50,100'/%3E%3Cpath d='M250,200 C300,150 400,150 450,100'/%3E%3Cpath d='M50,150 C100,100 150,50 200,-50'/%3E%3Cpath d='M300,300 C350,250 450,200 450,150'/%3E%3C/g%3E%3Cg fill='%23C5A059' fill-opacity='0.12'%3E%3Cpath d='M150,250 Q160,240 170,250 Q160,260 150,250 Z'/%3E%3Cpath d='M200,200 Q210,190 220,200 Q210,210 200,200 Z'/%3E%3Cpath d='M100,150 Q110,140 120,150 Q110,160 100,150 Z'/%3E%3Cpath d='M300,150 Q310,140 320,150 Q310,160 300,150 Z'/%3E%3Cpath d='M250,250 Q260,240 270,250 Q260,260 250,250 Z'/%3E%3Cpath d='M350,250 Q360,240 370,250 Q360,260 350,250 Z'/%3E%3Cpath d='M150,100 Q160,90 170,100 Q160,110 150,100 Z'/%3E%3Cpath d='M50,200 Q60,190 70,200 Q60,210 50,200 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 400px 400px;
    
    /* This mask fades the pattern out in the middle so text is readable */
    mask-image: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,1) 100%);
    -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,1) 100%);
    
    z-index: 0;
    pointer-events: none;
}

/* A subtle gradient to give depth */
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.4) 0%, rgba(17, 24, 39, 0.9) 100%);
    z-index: 0;
    pointer-events: none;
}

/* Ensure the text sits above the pattern */
.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--surface);
    margin-bottom: 1rem;
    font-size: clamp(2.5rem, 6vw, 4rem);
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}
/* ============================================================ */
/* UNIQUE ABOUT PAGE LAYOUT                                     */
/* ============================================================ */

/* 1. The Manifesto (Massive overlapping text) */
.manifesto-section {
    background: var(--bg);
    padding: 8rem 0 10rem;
    overflow: hidden;
}
.manifesto-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    align-items: center;
    position: relative;
}
.manifesto-text {
    background: var(--surface);
    padding: 5rem;
    position: relative;
    z-index: 2;
    margin-right: -100px; /* Overlaps the image */
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}
.manifesto-text h2 {
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}
.manifesto-text h2 em {
    font-style: normal;
    color: var(--gold);
}
.manifesto-text p {
    font-size: 1.1rem;
    color: var(--ink-light);
    margin-bottom: 2rem;
}
.manifesto-image {
    position: relative;
    height: 700px;
    z-index: 1;
}
.manifesto-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Vision & Mission (Asymmetrical layout) */
.vm-section {
    background: var(--surface);
    padding: 8rem 0;
}
.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}
.vm-block {
    padding-top: 3rem;
    border-top: 2px solid var(--ink);
}
.vm-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
    margin-bottom: 1rem;
    line-height: 1;
}
.vm-lead {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-light);
    margin-bottom: 0.5rem;
}
.vm-block h3 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}
.vm-block p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ink-light);
    margin-bottom: 1.5rem;
}

/* ============================================================ */
/* UNIQUE STAFF PAGE LAYOUT (Sharp Editorial Grid)              */
/* ============================================================ */
.staff-section {
    background: var(--bg);
    padding: 8rem 0;
}
.staff-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 3rem; 
}
.staff-card { 
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}
.staff-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}
.staff-image { 
    width: 100%; 
    height: 400px; 
    overflow: hidden; 
    position: relative;
}
.staff-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s var(--ease-out);
    filter: grayscale(100%); /* Black and white by default */
}
.staff-card:hover .staff-image img {
    transform: scale(1.05);
    filter: grayscale(0%); /* Color on hover */
}
.staff-info {
    padding: 2rem;
    position: relative;
    background: var(--surface);
}
.staff-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    width: 40px;
    height: 3px;
    background: var(--gold);
}
.staff-card h3 { 
    font-family: var(--font-display); 
    font-size: 1.4rem; 
    color: var(--ink); 
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}
.staff-card p { 
    font-family: var(--font-sans);
    font-size: 0.9rem; 
    color: var(--ink-light); 
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================ */
/* RESPONSIVE                                                   */
/* ============================================================ */
@media (max-width: 1100px) {
    .manifesto-grid { grid-template-columns: 1fr; gap: 0; }
    .manifesto-text { margin-right: 0; padding: 3rem; box-shadow: none; border: 1px solid var(--border); }
    .manifesto-image { height: 400px; }
    .vm-grid { grid-template-columns: 1fr; gap: 3rem; }
}
/* ============================================================ */
/* POLISHED INTERACTIVE STAFF SHOWCASE                          */
/* ============================================================ */

.staff-showcase-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
    background: var(--ink);
}

.staff-slide {
    position: absolute;
    inset: 0;
    display: flex;
    opacity: 0;
    visibility: hidden;
    /* Transition for the whole slide */
    transition: opacity 0.6s ease, visibility 0.6s ease;
    z-index: 1;
}

.staff-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* --- Left Side: Text Panel --- */
.staff-text-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 8rem 8rem 10vw;
    color: var(--surface);
    position: relative;
    z-index: 2;
    
    /* Animation for text content */
    transform: translateX(-30px);
    opacity: 0;
    transition: all 0.8s var(--ease-out) 0.2s;
}

.staff-slide.active .staff-text-panel {
    transform: translateX(0);
    opacity: 1;
}

.staff-role {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 1rem;
    display: block;
}

.staff-name {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: var(--surface);
}

.staff-divider {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin-bottom: 2rem;
}

.staff-bio {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    max-width: 500px;
    color: rgba(255, 255, 255, 0.85); /* Better contrast */
}

.staff-details {
    margin-bottom: 3rem;
}

.staff-details h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.staff-details p {
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.staff-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: var(--surface);
    border: none;
    border-bottom: 1px solid var(--gold);
    padding-bottom: 5px;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.staff-next-btn:hover {
    gap: 18px;
    color: var(--gold);
}

.staff-next-btn::after {
    content: '→';
    font-size: 1.2rem;
    color: var(--gold);
}

/* --- Right Side: Visual Panel --- */
.staff-visual-panel {
    width: 50%;
    position: relative;
    background: #1f2937;
    overflow: hidden;
}

.staff-visual-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    
    /* Animation for image */
    transform: scale(1.05);
    opacity: 0.8;
    transition: all 1.2s var(--ease-out);
}

.staff-slide.active .staff-visual-panel img {
    transform: scale(1);
    opacity: 1;
}

/* Color Themes (Optional: just changes the background tint) */
.theme-navy { background-color: #111827; }
.theme-gold { background-color: #1a1c23; } /* Keep it dark for contrast, gold is just accent */
.theme-slate { background-color: #0f172a; }
.theme-warm { background-color: #1c1917; }

/* --- Mobile Optimization --- */
@media (max-width: 1100px) {
    .staff-showcase-wrapper { 
        height: auto; 
        min-height: 100vh; 
        background: #0f172a;
    }
    
    .staff-slide { 
        position: relative; 
        flex-direction: column-reverse; /* Image on top, text below */
        display: none; 
        padding-bottom: 4rem;
    }
    
    .staff-slide.active { 
        display: flex; 
        animation: fadeIn 0.6s ease; 
    }
    
    .staff-text-panel { 
        width: 100%; 
        padding: 3rem 2rem; 
        transform: translateY(20px); 
        transition: all 0.8s var(--ease-out) 0.2s;
    }
    
    .staff-slide.active .staff-text-panel {
        transform: translateY(0);
    }

    .staff-visual-panel { 
        width: 100%; 
        height: 45vh; /* Takes up top half of phone */
    }
    
    .staff-visual-panel img {
        object-position: center 20%; /* Adjust focus for mobile */
    }

    .staff-details { margin-bottom: 2rem; }
    
    /* Ensure the header doesn't cover the text on mobile */
    .staff-showcase-wrapper {
        padding-top: 80px; 
    }
}
/* ============================================================ */
/* FACILITIES PAGE                                              */
/* ============================================================ */
.facilities-grid-main {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 8rem;
}

.facility-box {
    background: var(--surface);
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: all 0.4s var(--ease-out);
}

.facility-box:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    transform: translateY(-5px);
    border-color: var(--gold);
}

.facility-box .icon-wrapper {
    width: 60px;
    height: 60px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--gold);
}

.facility-box .icon-wrapper svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.facility-box h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.facility-box p {
    font-size: 0.95rem;
    color: var(--ink-light);
    line-height: 1.6;
}

/* Detailed Alternating Rows */
.facility-detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    margin-bottom: 8rem;
}
.facility-detail-row:nth-child(even) .detail-text { order: 2; }
.facility-detail-row:nth-child(even) .detail-media { order: 1; }
.detail-text h2 { font-size: 2.5rem; margin-bottom: 1.5rem; }
.detail-text p { font-size: 1.1rem; line-height: 1.7; color: var(--ink-light); }
.detail-media { height: 500px; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; box-shadow: -15px 15px 0 var(--border); }
.facility-detail-row:nth-child(even) .detail-media img { box-shadow: 15px 15px 0 var(--border); }

/* ============================================================ */
/* GALLERY PAGE                                                 */
/* ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--border);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1100px) {
    .facilities-grid-main { grid-template-columns: 1fr 1fr; }
    .facility-detail-row { grid-template-columns: 1fr; gap: 3rem; margin-bottom: 5rem; }
    .facility-detail-row:nth-child(even) .detail-text { order: 1; }
    .facility-detail-row:nth-child(even) .detail-media { order: 2; }
    .detail-media { height: 350px; }
    .detail-media img { box-shadow: none !important; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    .facilities-grid-main { grid-template-columns: 1fr; gap: 1.5rem; }
}
/* ============================================================ */
/* NEWS PAGE                                                    */
/* ============================================================ */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.news-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--gold);
}

.news-item:hover img {
    transform: scale(1.03);
}

.news-image {
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.news-content {
    padding-right: 2rem;
}

.news-date {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    margin-bottom: 1rem;
}

.news-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--ink);
    margin-bottom: 1rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.news-excerpt {
    font-size: 1rem;
    color: var(--ink-light);
    line-height: 1.6;
}

/* ============================================================ */
/* 404 ERROR PAGE                                               */
/* ============================================================ */
.error-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg);
    padding-top: 80px; /* Offset for header */
}

.error-content h1 {
    font-family: var(--font-display);
    font-size: clamp(8rem, 20vw, 15rem);
    color: var(--gold);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.1rem;
    color: var(--ink-light);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-inline: auto;
}

/* ============================================================ */
/* TERMS & CONDITIONS PAGE                                      */
/* ============================================================ */
.legal-section {
    padding: 6rem 0;
    background: var(--surface);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--ink);
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.legal-content p {
    font-size: 1rem;
    color: var(--ink-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.legal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.legal-content li {
    font-size: 1rem;
    color: var(--ink-light);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1100px) {
    .news-item {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 3rem;
    }
    .news-image {
        height: 250px;
    }
    .news-content {
        padding-right: 0;
    }
    .news-title {
        font-size: 1.5rem;
    }
}