:root {
    --bg-color: #0d1310;
    --text-color: #e0e6e4;
    --accent-color: #4a8c6f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 80px;
    /* Space for fixed timeline */
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #6bc29b;
}

/* Hero Section */
.hero {
    height: 70vh;
    /* Shorter hero for more content visibility */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(13, 19, 16, 1)), url('images/IMG_7956.jpg') no-repeat center center/cover;
    position: relative;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.9);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 1.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 1.5s ease-out 0.5s backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Controls & Filters */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.filters-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 2rem auto;
    flex-wrap: wrap;
    max-width: 900px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 10px rgba(74, 140, 111, 0.4);
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.toggle-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.toggle-btn:hover,
.toggle-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* Map */
.map-hidden {
    display: none;
}

#map-container {
    height: 500px;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#map {
    height: 100%;
    width: 100%;
}

/* Timeline List */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(transparent, var(--accent-color), transparent);
    opacity: 0.3;
}

.entry {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transform: translateY(30px);
}

.entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-content {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 2rem;
    width: 45%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s, border-color 0.3s;
}

.entry-content.highlight {
    box-shadow: 0 0 20px var(--accent-color);
    border-color: var(--accent-color);
}

.entry:nth-child(odd) {
    flex-direction: row-reverse;
}

.entry:nth-child(odd) .entry-content {
    margin-left: 3rem;
    text-align: left;
}

.entry:nth-child(even) .entry-content {
    margin-right: 3rem;
    text-align: right;
}

/* .entry::after removed per user request */

.entry-date {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
    padding-top: 5px;
    /* Moved down slightly */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gps-coords {
    color: var(--accent-color);
    cursor: pointer;
    transition: color 0.2s;
    margin-left: 8px;
}

.gps-coords:hover {
    color: #6bc29b;
    text-decoration: underline;
}

.entry-img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    transition: transform 0.3s;
    cursor: pointer;
}

.entry-img:hover {
    transform: scale(1.02);
}

.entry-desc {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.factoid {
    background: rgba(74, 140, 111, 0.2);
    border-left: 3px solid var(--accent-color);
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: italic;
    color: #b0d4c5;
    text-align: left;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.entry:nth-child(even) .tags {
    justify-content: flex-end;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    position: relative;
    /* For tooltip positioning if updated */
}

.tag:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Visual Timeline Bar */
.visual-timeline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(13, 19, 16, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    overflow-x: auto;
}

.timeline-dot {
    height: 100%;
    /* Fill the bar */
    min-width: 20px;
    /* Wider hit area */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    margin-right: 5px;
    /* Adjust spacing */
}

/* The visual dot */
.timeline-dot::before {
    content: '';
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.2s;
}

.timeline-dot:hover::before,
.timeline-dot.active::before {
    background: var(--accent-color);
    transform: scale(1.4);
    /* Slightly larger on hover */
}

.timeline-card {
    position: absolute;
    bottom: 65px;
    /* Moved up above the taller hit area */
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    background: #1a2620;
    border: 1px solid var(--card-border);
    padding: 0.5rem;
    border-radius: 0.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 101;
    text-align: center;
}

.timeline-dot:hover .timeline-card {
    opacity: 1;
}

.timeline-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.timeline-card span {
    font-size: 0.7rem;
    color: #ccc;
    display: block;
    margin-top: 5px;
}


/* Info Tooltip */
.info-tooltip {
    position: fixed;
    background: #1f2e27;
    border: 1px solid var(--accent-color);
    color: #e0e6e4;
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    pointer-events: none;
    font-size: 0.9rem;
}

.info-tooltip i {
    color: var(--accent-color);
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .entry {
        flex-direction: column !important;
        align-items: flex-start;
        margin-left: 3rem;
    }

    .entry-content {
        width: 100%;
        margin: 0 !important;
        text-align: left !important;
    }

    .entry::after {
        left: 20px;
        transform: translateX(-50%);
    }

    .entry:nth-child(even) .tags {
        justify-content: flex-start;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .visual-timeline {
        justify-content: flex-start;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    animation: zoom 0.6s;
}

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

    to {
        transform: scale(1)
    }
}

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

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

/* Lightbox Navigation */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 3001;
    background-color: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {

    .prev,
    .next {
        font-size: 16px;
        padding: 12px;
        background-color: rgba(0, 0, 0, 0.1);
    }
}

footer {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    padding-bottom: 100px;
}

/* Update Hero Section */
header.hero-section {
    height: 80vh;
    /* Taller hero */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Use a nice gradient or image if available. Let's try a dark gradient + texture feel */
    background: radial-gradient(circle at center, #1a2a1a 0%, #0d120d 100%);
    position: relative;
    padding: 2rem;
    box-sizing: border-box;
}

.hero-content {
    max-width: 700px;
    z-index: 2;
    animation: fadeIn 1.5s ease-out;
}

header h1 {
    font-size: 4rem;
    /* Larger title */
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #e2e8f0, #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
    display: inline-block;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 3rem;
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-indicator {
    font-size: 0.9rem;
    color: #64748b;
    animation: bounce 2s infinite;
    cursor: pointer;
    /* Clickable */
    transition: color 0.3s;
}

.scroll-indicator:hover {
    color: #a7f3d0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Image Loader */
.image-wrapper {
    position: relative;
    min-height: 250px;
    background: #141f19;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

.loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    z-index: 1;
}

.entry-img {
    margin: 0;
    /* Wrapper handles margin */
    opacity: 0;
    transition: opacity 0.5s ease, filter 0.5s ease;
    /* Added filter transition */
    z-index: 2;
    position: relative;
    display: block;
    width: 100%;
    /* Ensure it fills wrapper */
}

.entry-img.loaded {
    opacity: 1;
}

.entry-img.blur {
    filter: blur(10px);
    transform: scale(1.02);
    /* Slight scale to hide blurry edges */
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Map specific loaders */
.map-popup-wrapper {
    min-height: 80px;
    /* Smaller height for map popups */
    width: 120px;
    margin: 0 auto 5px auto;
}

.small-loader {
    width: 20px;
    height: 20px;
    border-width: 2px;
}