/* --- Imports: Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Philosopher:ital,wght@0,400;0,700;1,400&display=swap');

/* --- CSS Variables & Reset --- */
:root {
    --color-bg-body: #1a241a;
    --color-bg-parchment: #f0ece2; /* Still used for fallback */
    --color-text-dark: #2b3a29;
    --color-text-light: #f3f8f3; /* Brighter white for better contrast */
    --color-accent: #6b8e65; 
    
    --font-heading: 'Cinzel Decorative', cursive;
    --font-body: 'Philosopher', sans-serif;
    
    --container-width: 1100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-body);
    color: var(--color-text-dark);
    font-family: var(--font-body);
    line-height: 1.6;
    /* FIX 1: Smaller font size on mobile to prevent wrapping issues */
    font-size: 16px; 
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    font-weight: 700;
    line-height: 1.3;
}

h1.page-title {
    text-align: center;
    font-size: 2rem; /* Smaller on mobile */
    margin-bottom: 1.5rem;
    color: var(--color-bg-parchment);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding: 0 10px; /* Prevent edge touching */
}

h3 {
    font-size: 1.4rem; /* Adjusted for mobile width */
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.02);
}

/* --- Layout Containers --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    /* FIX 2: Reduce side padding on mobile to give text more room */
    padding: 0 15px; 
}

/* --- Navigation --- */
header {
    background-color: rgba(18, 28, 18, 0.98);
    padding: 0.8rem 0;
    border-bottom: 3px solid var(--color-accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem; /* Smaller gap on mobile */
}

nav li a {
    text-decoration: none;
    color: var(--color-text-light);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.9rem; /* Smaller nav text on mobile */
    letter-spacing: 1px;
    padding: 0.3rem;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

nav li a:hover, nav li a.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}

/* --- Page Structure --- */
main {
    padding: 2rem 0; /* Less vertical padding on mobile */
}

/* --- Content Box (The blurred background container) --- */
.content-box {
    position: relative;
    /* FIX 3: Drastically reduced padding inside the box for mobile */
    padding: 1.5rem 1.2rem; 
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-light); 
    overflow: hidden;
    z-index: 1; 
}

.content-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: inherit; 
    background-size: cover;
    background-position: center;
    filter: blur(12px) brightness(0.25); /* Darkened slightly more for contrast */
    transform: scale(1.1);
}

.content-box h3, 
.content-box h1, 
.content-box strong {
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
}

/* Grid layout */
.two-col-grid {
    display: flex; /* Flex is easier for stacking on mobile */
    flex-direction: column; /* Stack vertically */
    gap: 2rem;
}

/* Reorder so Image is ON TOP on mobile (optional, usually looks better) */
.two-col-grid .image-block {
    order: -1; 
}
.two-col-grid .text-block {
    order: 1;
}

/* --- Hero Section (Home) FIXED for Mobile --- */
.hero-section {
    position: relative;
    /* Changed from 'height: 80vh' to 'min-height' and 'auto'.
       This allows the section to stretch if the text is long. */
    min-height: 100vh; 
    height: auto;
    
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    
    /* ADDED: Top padding protects the text from the Sticky Header.
       Bottom padding ensures text doesn't hit the screen edge. */
    padding: 120px 20px 60px 20px;
}

.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.6);
}

.hero-content {
    text-align: center;
    color: var(--color-text-light);
    max-width: 100%; /* Ensure it fits width-wise */
    width: 800px;
    padding: 1.5rem;
    
    /* Background style for Home Page (Dark overlay, not blurred image) */
    background: rgba(0,0,0,0.6); 
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(3px);
}

.hero-content h2 {
    /* Decreased font size for mobile so "MOUNTAINS" fits better */
    font-size: 1.8rem; 
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1rem; /* Slightly smaller body text for mobile */
    margin-bottom: 1rem;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-accent);
    font-family: var(--font-heading);
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* --- LIGHTBOX (Popup) --- */
#lightbox-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#lightbox-modal.show {
    display: flex;
    opacity: 1;
}

#lightbox-img {
    max-width: 95%;
    max-height: 80vh;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    border: 2px solid var(--color-text-light);
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    font-family: sans-serif;
    line-height: 1;
}

/* ========================================= */
/* --- DESKTOP / TABLET OVERRIDES (min-width: 768px) --- */
/* ========================================= */
@media (min-width: 768px) {
    body {
        font-size: 18px; /* Restore larger font for desktop */
    }

    .container {
        padding: 0 20px;
    }

    .content-box {
        padding: 3rem; /* Restore spacious padding for desktop */
    }

    .two-col-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns side-by-side */
        gap: 3rem;
    }
    .hero-section {
        height: 100vh; 
        padding: 0; /* Remove the mobile padding */
    }

    .hero-content h2 {
        font-size: 3.5rem; /* Big title for Desktop */
    }
    
    .hero-content p {
        font-size: 1.3rem;

    }
    
    /* Remove the mobile reordering */
    .two-col-grid .image-block { order: 0; }
    .two-col-grid .text-block { order: 0; }

    nav ul {
        gap: 2rem;
    }
    
    nav li a {
        font-size: 1.1rem;
    }

    h1.page-title {
        font-size: 2.5rem;
    }
    
    h3 {
        font-size: 1.8rem;
    }

    .hero-content {
        padding: 2rem;
    }

    .hero-content h2 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }
}