/* ========================================= */
/* 1. GLOBAL RESET & VARIABLES */
/* ========================================= */
:root {
    --color-background: #FFFFFF;
    --color-text-dark: #333333;
    --color-text-light: #666666;
    --color-accent: #f4f4f4;
    
    /* Font Variables - Matches your Google Fonts imports */
    --font-heading: 'Raleway', sans-serif; 
    --font-body: 'Merriweather', serif;
}

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

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s, opacity 0.3s;
}

/* ========================================= */
/* 2. UTILITIES & LAYOUT */
/* ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Header (Used on Travel & Projects pages) */
.section-header {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5em;
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 4px solid #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Utility for White Pages */
.nav-dark a {
    color: #333 !important;
}
.nav-dark a::after {
    background-color: #333 !important;
}

/* Animation: Simple Fade In */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}
.visible {
    opacity: 1;
}

/* ========================================= */
/* 3. TRAVEL PAGE: DASHBOARD STYLES */
/* ========================================= */

/* --- Featured Hero (The Highlighted Trip) --- */
.featured-hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    color: white;
    overflow: hidden;
    margin-bottom: 60px;
}

.featured-bg {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background-size: cover; 
    background-position: center;
    filter: brightness(0.7); 
    z-index: 1;
    transition: transform 5s ease; /* Subtle zoom effect */
}

.featured-hero:hover .featured-bg { 
    transform: scale(1.02); 
}

.featured-content {
    position: relative; 
    z-index: 2;
    padding: 60px; 
    max-width: 900px;
    /* Readability Fix: Shadow behind text */
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.8); 
}

.featured-label {
    font-family: var(--font-heading); 
    font-weight: 700; 
    letter-spacing: 2px;
    font-size: 0.9em; 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    display: block;
    color: #f0f0f0;
}

/* Clickable Title Style */
.featured-title-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    display: inline-block;
}

.featured-title-link:hover {
    opacity: 0.9;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

/* --- Upcoming Trips Grid --- */
.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; 
    margin-bottom: 80px;
}

.upcoming-card {
    position: relative; 
    height: 350px; 
    overflow: hidden; 
    cursor: default;
    border-radius: 4px;
}

.upcoming-card img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    filter: brightness(0.6); 
    transition: 0.4s ease;
}

.upcoming-text {
    position: absolute; 
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%);
    text-align: center; 
    color: white; 
    width: 85%;
    z-index: 2;
}

/* Hover Effects for Upcoming */
.upcoming-desc {
    display: none; /* Hidden by default */
    font-family: var(--font-body); 
    font-size: 0.95em; 
    margin-top: 15px;
    line-height: 1.4;
}

.upcoming-card:hover img { 
    filter: brightness(0.3); /* Darken image to read text */
    transform: scale(1.05);
}
.upcoming-card:hover .upcoming-desc { 
    display: block; /* Reveal text */
}

/* --- Past Trips (Masonry Grid) --- */
.past-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px; 
    padding-bottom: 100px;
}

.trip-card {
    cursor: pointer; 
    transition: transform 0.3s;
}

.trip-card:hover { 
    transform: translateY(-5px); 
}

.trip-thumb {
    width: 100%; 
    height: 450px; /* Tall portrait aspect ratio */
    object-fit: cover; 
    margin-bottom: 15px;
    border-radius: 4px;
}

.trip-meta {
    font-family: var(--font-heading); 
    font-size: 0.8em; 
    color: #888; 
    letter-spacing: 1px;
    text-transform: uppercase;
}

.trip-title {
    font-family: var(--font-body); 
    font-size: 1.4em; 
    font-weight: 700; 
    margin: 5px 0;
}

/* ========================================= */
/* 4. TRAVEL PAGE: STORY DETAIL MODE */
/* ========================================= */
#view-detail { 
    display: none; /* Hidden by default, toggled by JS */
}

.story-hero {
    height: 60vh; 
    position: relative; 
    margin-bottom: 60px;
}

.story-container {
    max-width: 800px; 
    margin: 0 auto; 
    padding: 0 20px 100px 20px;
}

/* Dynamic Block Styles */
.story-block-text {
    font-family: var(--font-body); 
    font-size: 1.1em; 
    line-height: 1.8;
    color: #444; 
    margin-bottom: 40px;
}

.story-block-photo img {
    width: 100%; 
    height: auto; 
    margin-bottom: 40px; 
    display: block;
    border-radius: 2px;
}

.story-block-map iframe {
    width: 100%; 
    border: none; 
    margin-bottom: 40px;
    min-height: 450px;
}

.story-block-gallery {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px; 
    margin-bottom: 40px;
}

.story-block-gallery img {
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    cursor: pointer;
    transition: opacity 0.2s;
}

.story-block-gallery img:hover {
    opacity: 0.8;
}

/* ========================================= */
/* 5. PROJECTS PAGE STYLES */
/* ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    padding-bottom: 100px;
}

.project-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.project-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-family: var(--font-body);
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.project-blurb {
    font-family: var(--font-heading);
    font-size: 0.95em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #333;
    text-decoration: none;
    align-self: flex-start;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.project-link:hover {
    border-color: #333;
}

/* ========================================= */
/* 6. MOBILE RESPONSIVE RULES */
/* ========================================= */
@media (max-width: 768px) {
    .featured-content { 
        padding: 30px; 
    }
    
    .featured-hero { 
        height: 60vh; 
    }
    
    /* Turn Grids into Single Columns */
    .upcoming-grid, 
    .past-grid, 
    .projects-grid { 
        grid-template-columns: 1fr; 
    }
    
    .story-block-gallery { 
        grid-template-columns: 1fr 1fr; /* 2 columns on mobile */
    }
    
    .section-header {
        font-size: 1.2em;
    }
}