/* Basic Reset and Natural Color Palette */
:root {
    --primary-color: #6B8E23;   /* Olive Green - for main accents, headers */
    --secondary-color: #8B4513; /* Saddle Brown / Terracotta - for subtle accents, borders */
    --text-dark: #36454F;       /* Charcoal Grey - for main body text */
    --text-light: #FDF5E6;      /* Old Lace / Cream - for text on dark backgrounds */
    --background-light: #F5F5DC;/* Beige / Cream - for general background */
    --background-card: #FFFFFF; /* Pure white for content cards */
    --border-soft: #D3D3C6;     /* Light Grey-Green - for soft borders */
    --accent-gold: #CD853F;     /* Peru / Earthy Orange-Brown - for highlight elements */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Lora', serif; 
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--background-light);
}

/* Header Styling (with Hills background) */
header {
    background-image: url('../images/hills.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    color: var(--text-light);
    padding: 120px 20px 100px; /* Reduced top padding for fixed nav clearance */
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden; 
    
    /* Overlay for better text contrast */
    box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.35); 
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.8em;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

header p {
    font-size: 1.4em;
    opacity: 0.95;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* General Section Styling */
.content-section {
    max-width: 1000px;
    margin: 60px auto; 
    padding: 20px 30px;
    background-color: var(--background-card); 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-size: 2.5em;
    margin-bottom: 35px;
    border-bottom: 2px solid var(--accent-gold); 
    padding-bottom: 15px;
    position: relative;
    letter-spacing: 0.5px;
}

h2::after { 
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

h3 {
    color: var(--secondary-color);
    margin-top: 0;
    font-size: 1.6em;
    font-family: 'Playfair Display', serif;
    margin-bottom: 15px;
}

hr {
    border: none;
    height: 2px;
    background-image: linear-gradient(to right, transparent, var(--border-soft), transparent);
    margin: 80px 0; 
}


/* --- NEW JASON MESSAGE SECTION STYLING --- */

.jason-message-section {
    /* No max-width, no padding, no background to remove the "white box" effect */
    margin: 60px auto; 
    padding: 0;
    width: 100%;
}

.jason-content-grid {
    max-width: 1100px; /* Set max width for the content itself */
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    /* Create two columns: Text (2 parts) and Image (1 part) */
    grid-template-columns: 2fr 1fr; 
    gap: 50px;
    align-items: start; /* Align content at the top */
    text-align: left;
}

/* Override the general H2 style for this specific section header */
.jason-content-grid h2 {
    text-align: left;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 2.5em;
    color: var(--text-dark); /* Use dark text color */
}

.jason-content-grid h2::after {
    content: none; /* Remove the underline accent */
}

.jason-content-grid img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); /* Add subtle shadow to image */
}

/* --- UNIT CARD STYLING (Unchanged) --- */
#unit-cards {
    background: none; 
    box-shadow: none;
}

.card-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.unit-card {
    flex: 0 0 450px; 
    background-color: var(--background-card);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-5px);
}

.unit-header-box {
    width: 100%;
    height: 300px; 
    background-color: var(--primary-color);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    text-transform: uppercase;
}

.unit-description {
    padding: 0 30px;
    margin-bottom: 25px;
    border-top: 1px solid var(--border-soft);
    padding-top: 20px;
}

.unit-description ul {
    list-style: none;
    padding: 10px 0;
    text-align: left;
}
.unit-description li {
    padding: 4px 0;
    color: var(--text-dark);
}

/* EXPLORE Button Styling */
.explore-button-container {
    padding: 0 30px 30px;
}

.explore-button {
    display: block;
    width: 100%;
    padding: 15px 0;
    background-color: var(--accent-gold); 
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.explore-button:hover {
    background-color: #b47a32;
}

/* --- BACK BUTTON STYLING (Unchanged) --- */
.back-button-container {
    text-align: center;
    margin: 30px auto 0; 
    max-width: 1000px;
}

.back-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color); 
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background-color: #55781a; 
}


/* --- GALLERY STYLES (Unchanged) --- */
/* Default Gallery (used for Full Gallery) */
.full-gallery { 
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.full-gallery .gallery-item {
    cursor: pointer;
}

.full-gallery .gallery-item img {
    width: 100%;
    height: 300px; 
    object-fit: cover;
    display: block;
}

/* SMALL GALLERY STYLES (Used on overview pages) */
.photo-gallery-5 { 
    max-width: 800px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; 
    grid-template-rows: repeat(2, 1fr); 
    gap: 8px; 
    height: 400px; 
}

.photo-gallery-5 figure {
    margin: 0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    cursor: pointer; 
}

.photo-gallery-5 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Image 1: Takes up both rows on the first column */
.photo-gallery-5 figure:nth-child(1) {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
}

/* Image 2 (top middle) and 3 (top right) */
.photo-gallery-5 figure:nth-child(2) {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
}
.photo-gallery-5 figure:nth-child(3) {
    grid-row: 1 / 2;
    grid-column: 3 / 4;
}

/* Image 4 (bottom middle) and 5 (bottom right) */
.photo-gallery-5 figure:nth-child(4) {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
}

.photo-gallery-5 figure:nth-child(5) {
    grid-row: 2 / 3;
    grid-column: 3 / 4;
    position: relative;
}

/* Show all photos button style (mimicking the reference image) */
.show-all-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: white;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    font-size: 0.8em;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-decoration: none;
    z-index: 10;
}


/* --- LIGHTBOX STYLING (Unchanged) --- */

/* The Modal (Lightbox) Background: Full black screen */
.lightbox {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 1); 
    
    /* ADDED FIX: Prevents this overlay from capturing clicks when it's supposed to be invisible */
    pointer-events: none; 
    
    /* NEW: Use flexbox to easily center content */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* When lightbox is open, allow clicks */
.lightbox[style*="display: flex"] {
    pointer-events: auto;
}

/* Modal Content (The Image) */
.lightbox-content {
    /* Maximize image size while staying within viewport bounds */
    max-width: 90vw;
    max-height: 90vh; 
    width: auto;
    height: auto;
    object-fit: contain; 
    transition: 0.3s;
    margin: 0;
    padding: 0;
}

/* Caption Text - Can be removed if not needed, but keeping for completeness */
#caption {
    display: none; 
}

/* The Close Button: Larger and more prominent in the corner */
.close-lightbox {
    position: fixed; 
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: 300; 
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #ccc;
}

/* Next & previous buttons: Large arrows */
.prev, .next {
    cursor: pointer;
    position: fixed; 
    top: 50%;
    width: auto;
    padding: 20px;
    margin-top: -50px;
    color: white;
    font-weight: 100; 
    font-size: 60px; 
    transition: 0.6s ease;
    user-select: none;
    background: none; 
    border: none;
    opacity: 0.6;
}

/* Position the "next button" to the right */
.next {
    right: 20px;
}

/* Position the "prev button" to the left */
.prev {
    left: 20px;
}

/* On hover, increase opacity of arrows */
.prev:hover, .next:hover {
    opacity: 1;
}

/* --- NAVIGATION STYLING (MATCHING EXAMPLE) --- */

.navbar {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    background-color: var(--primary-color); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); 
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    padding: 10px 15px; 
    transition: background-color 0.3s ease; 
    border-radius: 4px;
}

.nav-links a:hover {
    color: var(--text-dark); 
    background-color: var(--background-light); 
}

/* --- BURGER MENU STYLING (Mobile) --- */

.burger {
    display: none; 
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.burger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.nav-links.active {
    transform: translateX(0%);
}

/* ADDED KEYFRAMES for staggered animation (used in script.js) */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* --- ENQUIRY FORM STYLING --- */

.enquiry-box {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-card); 
    border-radius: 8px;
}

.enquiry-box p {
    margin-bottom: 20px;
    text-align: center;
}

.enquiry-box form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.enquiry-box input[type="text"],
.enquiry-box input[type="email"],
.enquiry-box textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1em;
    color: var(--text-dark);
    transition: border-color 0.3s ease;
    /* NEW: Subtle inner shadow for visual depth */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); 
}

.enquiry-box input:focus,
.enquiry-box textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    /* NEW: Remove inner shadow on focus for flat look */
    box-shadow: none; 
}

.enquiry-box textarea {
    resize: vertical;
}

.enquiry-box button[type="submit"] {
    display: block;
    width: 100%;
    padding: 15px 0;
    background-color: var(--accent-gold); 
    color: var(--text-light);
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.enquiry-box button[type="submit"]:hover {
    background-color: #b47a32;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); 
}

.enquiry-box .note {
    font-size: 0.85em;
    color: var(--secondary-color);
    margin-top: 15px;
    font-style: italic;
}


/* --- Responsive adjustments --- */
@media (max-width: 950px) {
    /* Card layout */
    .card-container {
        gap: 20px;
    }
    .unit-card {
        flex: 0 0 45%;
    }
    .unit-card h3 {
        font-size: 1.8em;
    }

    /* Jason message section responsive changes */
    .jason-content-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    .jason-text-block {
        order: 2;
    }
    .jason-image-block {
        order: 1;
        margin-bottom: 20px;
    }
    .jason-content-grid h2 {
        text-align: center;
        margin-top: 20px;
    }
    
    /* Gallery adjustment */
    .photo-gallery-5 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }
    .photo-gallery-5 figure {
        grid-row: auto;
        grid-column: auto;
        height: 200px;
    }
    .photo-gallery-5 figure:nth-child(1) {
        height: 300px;
    }
    
    /* Lightbox adjustment for small screens */
    .prev, .next {
        font-size: 40px;
        padding: 10px;
        margin-top: -30px;
    }
    .close-lightbox {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
    
    header {
        padding-top: 80px; /* Reduced padding for better aesthetic on mobile */
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 70%;
        background-color: var(--primary-color); 
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.4);
        padding: 0;
    }

    .nav-links li {
        opacity: 0; 
        margin: 20px 0;
    }

    .nav-links a {
        color: var(--text-light);
        font-size: 1.8em;
    }

    .burger {
        display: block;
        z-index: 1001; 
        background-color: transparent !important; 
    }
    
    .burger div {
        background-color: var(--text-light) !important; 
    }

    /* Animation for burger menu */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}
@media (max-width: 650px) {
    .card-container {
        gap: 30px;
    }
    .unit-card {
        flex: 0 0 90%; 
    }
    .unit-header-box {
        height: 250px;
    }
}