/* --- Variables & Base --- */
:root {
    --primary: #00b35f;
    --dark-bg: #0f0f0f;
    --font-main: 'Montserrat', sans-serif;
    color-scheme: dark;
}

body {
    font-family: var(--font-main);
    overflow-x: hidden;
    background-color: var(--dark-bg) !important;
    color: #fff !important;
}

/* Force dark theme globally */
html {
    background-color: var(--dark-bg);
}

h1, h2, h3, h4, h5, h6, p {
    color: #fff !important;
}

.lead {
    color: #adb5bd !important;
}

.text-white {
    color: #fff !important;
}

.text-secondary {
    color: #adb5bd !important;
}

.text-success {
    color: var(--primary) !important;
}

.btn-light {
    background-color: #f8f9fa !important;
    color: #000 !important;
}

.btn-success {
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* Force dark mode on all backgrounds */
.bg-light {
    background-color: #1a1a1a !important;
}

.bg-white {
    background-color: var(--dark-bg) !important;
}



.fw-black { font-weight: 900; }

/* --- Navbar --- */
#mainNav {
    padding: 20px 0;
    transition: all 0.4s ease;
    background: transparent;
}

#mainNav.scrolled {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar-collapse {
    background: transparent;
}

.navbar-nav {
    align-items: center;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

/* Mobile navbar */
@media (max-width: 991.98px) {
    /* Navbar transparente par défaut, devient noire au scroll */
    #mainNav {
        background: transparent !important;
    }

    /* Fond noir après scroll */
    #mainNav.scrolled {
        background: rgba(0, 0, 0, 0.95) !important;
    }
}

.nav-link {
    color: #fff !important;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* --- Offcanvas Mobile Menu --- */
.offcanvas {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    width: 320px !important;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.offcanvas-body {
    padding: 2rem 1.5rem;
}

.offcanvas .nav-item {
    margin-bottom: 0.5rem;
}

.offcanvas .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
    background: rgba(0, 179, 95, 0.1);
    color: var(--primary) !important;
}

.offcanvas .btn-outline-success {
    border-width: 2px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 8px;
}

.offcanvas .btn-outline-success:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 179, 95, 0.3);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* --- Adventure Cards --- */
.adventure-card {
    background: #1a1a1a;
    border: 1px solid #333;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.adventure-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

/* --- Image Styling --- */
.img-frame {
    position: relative;
    padding: 15px;
}

.img-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-top: 5px solid var(--primary);
    border-left: 5px solid var(--primary);
}

.grayscale-hover {
    filter: grayscale(100%);
    transition: filter 0.5s ease;
}

.grayscale-hover:hover {
    filter: grayscale(0%);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: "";
    width: 4px;
    height: 8px;
    background: #fff;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, 15px);
    }
}

.img-invert {
    filter: invert(1);
}

/* Sponsor logos */
.sponsor-logo {
    transition: all 0.3s ease;
    opacity: 0.6;
    filter: grayscale(100%);
}

.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* --- Page & Article Templates --- */
.post-page {
    line-height: 1.8;
    font-family: 'Inter', sans-serif;
}

.post-page h1, .post-page h2, .post-page h3, .post-page h4, .post-page h5, .post-page h6 {
    font-family: var(--font-main);
}

.page-header {
    height: 400px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), #0f0f0f);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
}

.page-header.with-image {
    height: 100vh;
    position: relative;
    overflow: hidden;
    --parallax-offset: 0px;
}

.page-header.with-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(15,15,15,0.7)), var(--header-bg-image);
    background-size: cover;
    background-position: center top;
    transform: translateY(var(--parallax-offset));
    will-change: transform;
    z-index: 0;
    animation: backgroundZoom 15s ease-out forwards;
}

@keyframes backgroundZoom {
    0% {
        transform: translateY(var(--parallax-offset)) scale(1);
    }
    100% {
        transform: translateY(var(--parallax-offset)) scale(1.15);
    }
}

.page-header.with-image > * {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

.breadcrumb-item a {
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary) !important;
}

.content-block {
    font-size: 1.1rem;
}

.content-block h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.content-block h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.content-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.content-block blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #adb5bd;
}

.content-block ul, .content-block ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-block li {
    margin: 0.5rem 0;
}

.article-tags .badge {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
}

.article-meta {
    font-size: 0.95rem;
}

.article-meta i {
    margin-right: 0.25rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
}

/* Pillar cards for features */
.pillar-card {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.pillar-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 179, 95, 0.2);
}

.pillar-card .icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 179, 95, 0.1);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--primary);
}

.pillar-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.pillar-card p {
    color: #adb5bd;
    margin: 0;
}

/* Team member cards */
.team-member-card {
    background: #1a1a1a;
    border: 1px solid #333;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.team-member-card:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.team-member-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.team-member-card:hover img {
    filter: grayscale(0%);
}

.team-member-card .card-body {
    padding: 1.5rem;
}

.team-member-card h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.team-member-card .text-success {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* --- Bio Modal --- */
.modal-content {
    border-width: 2px;
}

.modal-header {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}

.modal-body {
    background: #0f0f0f;
    line-height: 1.8;
}

.modal-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

.bio-content p {
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.bio-content .adventure-item {
    padding-left: 1rem;
    border-left: 3px solid var(--primary);
}

.bio-content .adventure-item h4 {
    color: #fff;
}

.bio-content .mission-card {
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bio-content .mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 179, 95, 0.2);
}

.bio-content .mission-card p {
    flex-grow: 1;
}

/* Mobile fixes */
@media (max-width: 768px) {
    .display-1 {
        font-size: 2.5rem;
    }
    .hero-section {
        height: 90vh;
    }
    .sponsor-logo {
        height: 40px !important;
    }
    .page-header {
        height: 300px;
        margin-top: 60px;
    }
    .page-header.with-image {
        height: 80vh;
        margin-top: 0;
    }
    .display-3 {
        font-size: 2rem;
    }
    .content-block {
        font-size: 1rem;
    }

    /* Reduce logo size on mobile to prevent burger menu wrapping */
    .navbar-brand img {
        height: 22px !important;
    }
}
