/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5f4f;
    --secondary-color: #4a7c6b;
    --accent-color: #8ba888;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --text-color: #333;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.nav-menu a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Subtype Navigation */
.subtype-nav {
    background-color: var(--primary-color);
    padding: 0.75rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 57px; /* Height of main navbar */
    z-index: 99;
}

.subtype-nav .container {
    max-width: 100%;
    padding: 0 2rem;
}

.subtype-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0;
    margin: 0;
}

.subtype-list li {
    white-space: nowrap;
}

.subtype-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.subtype-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.subtype-list a.active {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 600;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 8rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-align: center;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--white);
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.profile-images {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0 3rem;
}

.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 4px solid var(--primary-color);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image.placeholder {
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
}

.placeholder-text {
    color: #999;
    font-style: italic;
    text-align: center;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-highlights {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.about-highlights h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.about-highlights ul {
    list-style: none;
}

.about-highlights li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.about-highlights li:last-child {
    border-bottom: none;
}

/* Adventures Section */
.adventures {
    padding: 2rem 0 5rem 0;
    background-color: var(--light-color);
}

.adventures h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-align: center;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    color: #666;
}

/* Generic content grid - works for all tabs */
.content-grid,
.adventures-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Generic content card - works for all tabs */
.content-card,
.adventure-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.content-card:hover,
.adventure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.adventure-cover-photo {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.adventure-map {
    width: 100%;
    height: 500px;
}

.adventure-placeholder {
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    opacity: 0.6;
}

.card-content {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.adventure-category-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.adventure-category-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
}

.adventure-date {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.adventure-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.adventure-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #666;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
    font-style: italic;
}

.no-adventures {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* Adventure Detail Modal */
.adventure-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.adventure-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background-color: var(--white);
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--white);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.modal-close:hover {
    background-color: var(--light-color);
}

.modal-header-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background-color: #000;
}

.modal-body {
    padding: 2rem;
}

.modal-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.modal-date {
    color: #888;
    margin-bottom: 1rem;
}

.modal-description {
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.modal-map {
    width: 100%;
    height: 400px;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.modal-youtube {
    margin: 2rem 0;
}

.modal-youtube h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.modal-youtube a {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-youtube a:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.youtube-thumbnail {
    width: 100%;
    height: auto;
    display: block;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: rgba(255, 0, 0, 0.8);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.youtube-play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent white;
}

.modal-youtube a:hover .youtube-play-button {
    background-color: rgba(255, 0, 0, 1);
}

.custom-gpx-marker {
    background: none;
    border: none;
    font-size: 24px;
    text-align: center;
    line-height: 30px;
}

.map-download-footer {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
}

.map-download-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.map-download-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.map-download-btn:hover {
    background-color: var(--secondary-color);
}

.modal-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.modal-photos h3 {
    grid-column: 1 / -1;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.modal-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-photo:hover {
    transform: scale(1.05);
}

/* Lightbox for full-size image viewing */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    color: #333;
}

.lightbox-close:hover {
    background-color: white;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    z-index: 10001;
}

.lightbox-nav:hover {
    background-color: white;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--white);
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    margin: 1rem 0;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

    .tagline {
        font-size: 1.2rem;
    }

    .profile-images {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .adventures-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0;
    }

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

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }
}

/* Home Page Photo Grid - Admin Interface */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.photo-item {
    position: relative;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    height: 250px;
    width: 100%;
    min-width: 0;
}

.photo-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.photo-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 79, 0.3);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(255, 0, 0, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-item .remove-btn:hover {
    background-color: rgba(255, 0, 0, 1);
}

.photo-item .selected-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: #4CAF50;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
}
