/* --- GLOBAL VARIABLES & FONTS --- */
:root {
    --bg-color: #fcfcfc;
    --text-color: #333;
    --font-header: 'Montserrat', sans-serif; 
    --font-body: 'Montserrat', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    
    --nav-color-light: #fff;
    --nav-color-dark: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }

/* --- NAVIGATION (SHARED) --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Hamburger checkbox — always hidden */
.nav-toggle { display: none; }

/* Hamburger icon — hidden on desktop, shown on mobile */
.nav-hamburger {
    display: none;
    cursor: pointer;
    line-height: 1;
    z-index: 101;
    user-select: none;
}
.nav-hamburger::before { content: '☰'; font-size: 1.4rem; }
.nav-toggle:checked + .nav-hamburger::before { content: '✕'; }

/* Nav links container */
.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
}

/* Nav modifiers */
nav.nav-light a {
    color: white;
    mix-blend-mode: overlay;
    border-bottom: 1px solid transparent;
    padding-bottom: 3px;
}
nav.nav-light a.active { mix-blend-mode: normal; opacity: 1; border-bottom: 1px solid rgba(255,255,255,0.7); }
nav.nav-light a:hover { opacity: 1; mix-blend-mode: normal; border-bottom-color: rgba(255,255,255,0.6); }

nav.nav-dark {
    position: relative;
    padding-top: 3rem;
    padding-bottom: 0;
}
nav.nav-dark a {
    color: var(--nav-color-dark);
    border-bottom: 1px solid transparent;
}
nav.nav-dark a.active { border-bottom: 1px solid var(--text-color); }
nav.nav-dark a:hover { opacity: 0.6; }


/* --- HERO SECTION (BASE STYLES used by Home) --- */
.hero {
    height: 100vh;
    width: 100%;
    /* Default image (Mountain) for Homepage */
    background-image: url('images/background/background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 20px;
    padding-bottom: 25vh;
    color: white;
    position: relative;
}

/* Base Overlay */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.2);
    z-index: 1;
}

/* --- HERO MODIFIERS --- */
.hero.apply-hero {
    background-image: url('images/background/cacti.jpg');
    background-position: center bottom;
    justify-content: center;
    padding-bottom: 20px;
}

.hero.apply-hero::after {
    background: rgba(0,0,0,0.5);
}


/* --- HERO CONTENT & CREDIT --- */
.hero-content {
    z-index: 2;
    max-width: 900px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.photo-credit {
    position: absolute;
    bottom: 25px;
    right: 30px;
    z-index: 2;
    color: rgba(255, 255, 255, 0.6);
    font-family: var(--font-body);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 400;
}

h1 {
    font-family: var(--font-header);
    font-size: 5rem;
    font-weight: 200;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.subheader {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,0.6);
    padding-top: 1.5rem;
    display: inline-block;
}

/* --- CTA BUTTONS --- */
/* Primary filled version: most dominant CTA (white bg, dark text) */
.cta-button-primary {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 1.8rem 4.5rem;
    background: white;
    color: #333;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}
.cta-button-primary:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* White version: for hero/dark-overlay pages (Apply) */
.cta-button {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 1.4rem 3.5rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: white;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}
.cta-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Dark version: for white-background pages (Book) */
.cta-button-dark {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 1.4rem 3.5rem;
    border: 1px solid #555;
    color: #555;
    margin: 2rem 0;
    transition: all 0.3s ease;
}
.cta-button-dark:hover {
    background: #333;
    color: white;
    border-color: #333;
}

/* --- APPLY PAGE CONTENT SPECIFIC --- */
.apply-container {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.apply-intro {
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.insta-link {
    font-size: 2.8rem;
    font-weight: 200;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
    margin: 20px 0;
    display: inline-block;
}

.insta-link:hover {
    border-bottom: 2px solid rgba(255,255,255, 1);
    transform: scale(1.02);
}

/* --- CONTENT SECTIONS --- */
.content-section {
    padding: 6rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* --- TESTIMONIALS --- */
.testimonial {
    margin-bottom: 5rem;
    text-align: center;
}

.quote {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-style: italic;
    color: #444;
    margin-bottom: 1.5rem;
}

.author {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

hr.divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    width: 50px;
    margin: 4rem auto;
}

/* --- ABOUT PAGE STYLES --- */
.about-container {
    max-width: 720px;
    margin: 2rem auto 8rem auto;
    padding: 0 2rem;
}

.about-title {
    font-family: var(--font-header);
    font-size: 3rem;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: -1px;
    text-align: center;
    margin-bottom: 4rem;
    color: #222;
}

.text-block {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 300;
    color: #444;
    margin-bottom: 2rem;
    text-align: justify;
    line-height: 1.8;
}

.about-container > .text-block:first-of-type::first-letter {
    font-size: 3.5rem;
    float: left;
    line-height: 0.8;
    padding-right: 10px;
    padding-top: 5px;
    font-family: var(--font-header);
}

/* Style for individual images */
.about-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 3rem auto;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* 2-column grid for photo sections */
.image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

/* All images in grids: square crop */
.image-grid .about-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin: 0;
    display: block;
}


/* --- FAQ PAGE --- */
.faq-item { margin-bottom: 3rem; }

.faq-question {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #222;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.faq-answer {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 300;
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.faq-list {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 300;
    color: #444;
    line-height: 1.8;
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.faq-list li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.faq-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #aaa;
}

/* --- PEOPLE PAGE --- */
.person-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 0 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* --- HOUSE RULES PAGE --- */
.rule-section { margin-bottom: 2.5rem; }

.rule-heading {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #222;
    margin-bottom: 0.75rem;
}

.rule-body {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 300;
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.rule-list {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 300;
    color: #444;
    line-height: 1.8;
    list-style: none;
    padding-left: 0;
    margin-top: 0.5rem;
}

.rule-list li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.25rem;
}

.rule-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #aaa;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 1px solid #e8e8e8;
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #bbb;
}

/* --- MOBILE QUERIES --- */
@media (max-width: 768px) {

    /* --- Hamburger Navigation --- */
    nav {
        padding: 1.2rem 1.5rem;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0;
    }

    .nav-hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 1.5rem;
        padding: 1rem 0 0.5rem;
    }

    .nav-toggle:checked ~ .nav-links {
        display: flex;
    }

    /* Light nav (hero pages): dark background when menu is open */
    nav.nav-light {
        background: rgba(0, 0, 0, 0.75);
        backdrop-filter: blur(4px);
    }
    nav.nav-light .nav-hamburger { color: white; }
    nav.nav-light a { mix-blend-mode: normal; }

    /* Dark nav (content pages): sticky with background */
    nav.nav-dark {
        position: sticky;
        top: 0;
        padding-top: 1.2rem;
        background: var(--bg-color);
        border-bottom: 1px solid #e8e8e8;
        z-index: 100;
    }
    nav.nav-dark .nav-hamburger { color: #333; }

    /* --- Typography --- */
    h1 { font-size: 2.8rem; letter-spacing: -1px; }
    .subheader { font-size: 0.6rem; letter-spacing: 2px; }
    .quote { font-size: 1.3rem; }
    .about-title { font-size: 2.2rem; margin-bottom: 2rem; }
    .text-block { font-size: 1.1rem; text-align: left; }
    .faq-answer { font-size: 1.1rem; }
    .rule-body { font-size: 1.1rem; }

    /* --- Images --- */
    .about-image { margin: 2rem auto; width: 100%; }
    .photo-credit { bottom: 15px; right: 20px; font-size: 0.55rem; }
    .image-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* --- Apply / Instagram --- */
    .insta-link { font-size: 1.4rem; border-width: 1px; }
    .cta-button-primary { padding: 1.4rem 2.5rem; font-size: 0.85rem; }
    .cta-button { padding: 1.1rem 2rem; font-size: 0.75rem; }
    .cta-button-dark { padding: 1.1rem 2rem; font-size: 0.75rem; }

    /* --- Content sections --- */
    .content-section { padding: 4rem 1.5rem; }
    .about-container { padding: 0 1.5rem; }
}

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4rem 5rem;
    box-sizing: border-box;
}

.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 2px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.2s;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    color: #fff;
}

.lightbox-close {
    top: 1.2rem;
    right: 1.5rem;
    font-size: 2.2rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

/* --- CURRENT RESIDENTS INTRO --- */
.residents-intro {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 2rem;
}

.residents-intro .text-block {
    text-align: left;
}

.residents-intro .text-block:first-of-type::first-letter {
    font-size: inherit;
    float: none;
    padding: 0;
    font-family: inherit;
}

/* --- CAROUSEL --- */
.carousel {
    position: relative;
    max-width: 540px;
    margin: 2rem auto 5rem;
    padding: 0 1rem;
}

.carousel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    background: #f0efec;
}

.carousel-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    flex: 0 0 100%;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
    cursor: zoom-in;
}

/* Prev / next arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.carousel-btn:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.carousel-prev { left: -20px; }
.carousel-next { right: -20px; }

/* Counter */
.carousel-counter {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
    margin-top: 1.3rem;
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #d5d5d5;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}
.carousel-dot.active {
    background: #555;
    transform: scale(1.25);
}

@media (max-width: 768px) {
    .carousel { padding: 0; margin: 1.5rem auto 4rem; }
    .carousel-prev { left: 8px; }
    .carousel-next { right: 8px; }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        background: rgba(255, 255, 255, 0.8);
    }
    .residents-intro { padding: 0 1.5rem; }
}