/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #f5f5f0;
    color: #2d2d2d;
}

/* ===== Splash Screen ===== */
.splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('photos/splash_art.jpg') center/cover no-repeat;
    transition: opacity 0.6s ease;
}

.splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
}

.splash-content {
    position: relative;
    text-align: center;
    animation: splashPulse 2.5s ease-in-out infinite;
}

.splash-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 3px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}

.splash-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.splash-hint {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@media (max-width: 768px) {
    .splash-title {
        font-size: 2.4rem;
    }
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    height: 72px;
    padding: 0 24px;
    background: linear-gradient(135deg, #1a365d 0%, #2d5a8e 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.header-logo {
    height: 72px;
    flex-shrink: 0;
}

.header-logo img {
    height: 100%;
    width: auto;
    object-fit: cover;
    display: block;
}

.header-title {
    flex: 1;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}



/* ===== Main Layout ===== */
.main-layout {
    display: flex;
    margin-top: 72px;
    min-height: calc(100vh - 72px);
}

/* ===== Side Navigation ===== */
.sidenav {
    position: fixed;
    top: 72px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: #ffffff;
    border-right: 1px solid #e0ddd5;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    transition: width 0.3s ease;
    overflow-x: hidden;
}

.sidenav.collapsed {
    width: 64px;
}

/* Collapse toggle button */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 24px;
    margin-bottom: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.nav-toggle:hover {
    color: #1a365d;
}

.toggle-icon {
    font-size: 1.4rem;
}

.sidenav.collapsed .nav-toggle {
    padding: 10px 0;
    justify-content: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    text-decoration: none;
    color: #555;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: #f0efe8;
    color: #1a365d;
}

.nav-link.active {
    background: #eef2f8;
    color: #1a365d;
    border-left-color: #2d5a8e;
    font-weight: 600;
}

.nav-icon {
    font-size: 1.3rem;
    width: 28px;
    text-align: center;
}

.nav-text {
    font-size: 1.05rem;
    white-space: nowrap;
}

/* Arrow for expandable groups */
.nav-arrow {
    margin-left: auto;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    color: #999;
}

.nav-group.open > .nav-link .nav-arrow {
    transform: rotate(90deg);
}

/* Sub-navigation */
.nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-group.open .nav-sub {
    max-height: 200px;
}

.sub-link {
    padding-left: 48px !important;
    font-size: 0.92rem;
}

.sub-link .nav-icon {
    font-size: 1.1rem;
    width: 24px;
}

/* Collapsed state hides text, arrow, and sub-items */
.sidenav.collapsed .nav-text,
.sidenav.collapsed .nav-arrow {
    display: none;
}

.sidenav.collapsed .nav-sub {
    max-height: 0 !important;
}

.sidenav.collapsed .nav-link {
    justify-content: center;
    padding: 14px 0;
    gap: 0;
}

.sidenav.collapsed .nav-icon {
    width: auto;
}

/* ===== Content Area ===== */
.content {
    margin-left: 220px;
    flex: 1;
    padding: 40px 48px;
    transition: margin-left 0.3s ease;
}

.content.shifted {
    margin-left: 64px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #1a365d;
    margin-bottom: 12px;
}

.page > p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    max-width: 720px;
    margin-bottom: 32px;
}

/* ===== Cards ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e6df;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: #1a365d;
    margin-bottom: 10px;
}

.card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* ===== Trek Map ===== */
.trek-map-wrap {
    max-width: 820px;
}

.trek-map {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #c8c4ba;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    background: #e8eee0;
}

/* Stop points */
.trek-stop,
.trek-stop-w2 {
    cursor: pointer;
}

.stop-ring {
    fill: rgba(255, 255, 255, 0.4);
    stroke: #4a5d42;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.stop-dot {
    fill: #4a5d42;
    stroke: #fff;
    stroke-width: 2.5;
    transition: fill 0.3s ease;
}

.trek-stop:hover .stop-ring,
.trek-stop-w2:hover .stop-ring {
    fill: rgba(26, 54, 93, 0.2);
    stroke: #1a365d;
    r: 24;
}

.trek-stop:hover .stop-dot,
.trek-stop-w2:hover .stop-dot {
    fill: #1a365d;
}

/* Visited stops */
.trek-stop.visited .stop-ring,
.trek-stop-w2.visited .stop-ring {
    fill: rgba(192, 57, 43, 0.15);
    stroke: #c0392b;
}

.trek-stop.visited .stop-dot,
.trek-stop-w2.visited .stop-dot {
    fill: #c0392b;
}

.stop-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    fill: #2d2d2d;
    text-anchor: middle;
}

.stop-sublabel {
    font-size: 11px;
    font-weight: 400;
    fill: #777;
}

.stop-tag {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    fill: #2d8a4e;
    text-anchor: middle;
    letter-spacing: 1px;
}

.alt-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    fill: #777;
}

.river-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-style: italic;
    fill: #5a90b0;
    letter-spacing: 2px;
}

/* Trail lines (paths) */
.trail-line {
    stroke: transparent;
    stroke-width: 4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.6s ease, stroke-dashoffset 0.8s ease;
}

.trail-line.visible {
    stroke: #c0392b;
    stroke-width: 4;
}

.trail-path-shadow {
    pointer-events: none;
}

/* Map legend */
.map-legend {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: #777;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid;
}

.legend-dot.unvisited {
    background: #6b7c63;
    border-color: #6b7c63;
}

.legend-dot.visited {
    background: #c0392b;
    border-color: #c0392b;
}

.legend-line {
    width: 24px;
    height: 3px;
    background: #c0392b;
    border-radius: 2px;
}

/* ===== Day Detail View ===== */
.day-detail {
    max-width: 720px;
    animation: fadeIn 0.3s ease;
}

.day-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    margin-bottom: 24px;
    background: #1a365d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.day-back:hover {
    background: #2d5a8e;
}

.day-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #1a365d;
    margin-bottom: 10px;
}

.day-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
    padding: 8px 14px;
    background: #f5f4ef;
    border-radius: 8px;
    border-left: 3px solid #2d5a8e;
}

.day-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 16px;
}

.day-content img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.day-content video,
.day-video {
    width: 100%;
    max-height: 420px;
    border-radius: 10px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #000;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidenav {
        width: 64px;
        padding: 12px 0;
    }

    .nav-text,
    .nav-arrow {
        display: none;
    }

    .nav-sub {
        max-height: 0 !important;
    }

    .nav-link {
        justify-content: center;
        padding: 14px 0;
    }

    .nav-icon {
        width: auto;
    }

    .nav-toggle {
        padding: 10px 0;
    }

    .content {
        margin-left: 64px;
        padding: 24px 20px;
    }

    .header-title {
        font-size: 1.6rem;
    }
}
