/* MODERN INCA TRAIL THEME - style.css */
:root {
    --primary: #2c5e2e;       /* Machu Picchu Green */
    --secondary: #d4a017;     /* Inca Gold */
    --accent: #e76f51;        /* Terracotta */
    --dark: #1a1a1a;
    --light: #f4f4f4;
    --text: #333;
    --white: #ffffff;
    --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Lato', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
}

/* --- Navigation --- */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover, nav a.active { color: var(--secondary); }

/* --- Hero Section --- */
.hero {
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 4rem 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

/* --- General Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.section { padding: 4rem 0; background: var(--white); }
.section-alt { padding: 4rem 0; background: #eef2f3; }

h2 { color: var(--primary); margin-bottom: 1.5rem; text-align: center; font-size: 2.2rem; }
h3 { color: var(--dark); margin-bottom: 1rem; font-size: 1.5rem; }

/* --- Components --- */
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn:hover { background: #1b3b1e; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Custom Grid Splits (Desktop) */
@media (min-width: 769px) {
    .grid-split-2-1 {
        grid-template-columns: 2fr 1.5fr;
        align-items: center;
    }
    .grid-split-1-1 {
        grid-template-columns: 1fr 1fr;
    }
    .grid-split-1-1-center {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    .grid-split-2-1-strict {
        grid-template-columns: 2fr 1fr;
    }
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
}

.card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* --- Timeline (Index) --- */
.timeline-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 4rem;
    gap: 2rem;
}
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-img { flex: 1; min-width: 300px; }
.timeline-img img { width: 100%; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.timeline-content { flex: 1; min-width: 300px; }
.timeline-date { color: var(--secondary); font-weight: bold; font-size: 1.2rem; text-transform: uppercase; }

/* --- Circuit Grid (Reserve Page) --- */
.circuit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 2rem 0;
}
.circuit-card img { width: 100%; border-radius: 5px; border: 1px solid #ddd; }
.circuit-card p { text-align: center; font-weight: bold; margin-top: 5px; }

/* --- Footer --- */
footer {
    background: var(--dark);
    color: #aaa;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}
footer a { color: var(--white); margin: 0 10px; }

/* --- Responsive Video --- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin-bottom: 2rem;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* --- Lightbox Styles --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Sit on top */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9); /* Black w/ opacity */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 85vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.2rem;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Indication that images are clickable */
.circuit-card img {
    cursor: zoom-in;
    transition: opacity 0.3s;
}

.circuit-card img:hover {
    opacity: 0.9;
}

/* --- Mobile Navigation Styles --- */
.menu-toggle {
    display: none; /* Hidden on desktop */
}

@media screen and (max-width: 768px) {
    /* Stack Grid Layouts */
    .grid-3,
    .grid-split-2-1,
    .grid-split-2-1-strict,
    .grid-split-1-1,
    .grid-split-1-1-center,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    /* Timeline Mobile Fix: Image on Top */
    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: column;
    }

    .timeline-img,
    .timeline-content {
        min-width: 100%;
    }

    /* Stack navigation items vertically */
    .nav-container ul {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: -100%; /* Hide off-screen by default */
        top: 60px; /* Push down below header */
        width: 100%;
        background-color: var(--white);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
    }

    /* Class added by JS to show menu */
    .nav-container ul.active {
        left: 0;
    }

    .nav-container ul li {
        margin: 15px 0;
    }

    /* Hamburger Icon Styling */
    .menu-toggle {
        display: block;
        cursor: pointer;
    }

    .menu-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: var(--dark);
    }

    /* Hamburger Animation to 'X' */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}