:root {
    --primary-bg: #0a0f18;
    --secondary-bg: #1A202C;
    --accent-color: #39D3BB;
    --text-primary: #E2E8F0;
    --text-secondary: #A0AEC0;
    --text-on-accent: #0D1117;
    --border-color: #2D3748;
    --header-bg: #1A202C;
    --footer-bg: #1A202C;
    --glass-bg: rgba(26, 32, 44, 0.6);
    --accent-color-rgb: 57, 211, 187;
    --primary-bg-rgb: 10, 15, 24; /* FIXED: Added this missing variable */

    --font-primary: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-headings: 'Montserrat', var(--font-primary);
}

/* =================================================================== */
/* 1. GENERAL & BASE STYLES
/* =================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 16px;
}

main {
    flex-grow: 1;
}

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

a:hover {
    color: #69D2E7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--text-primary);
    margin-bottom: 0.75em;
    line-height: 1.3;
}


h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }

p {
    margin-bottom: 1.2em;
    color: var(--text-secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style-position: inside;
    padding-left: 0;
}

/* General Container for content sections */
.content-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* =================================================================== */
/* 2. LAYOUT: HEADER & FOOTER
/* =================================================================== */

/* --- Header --- */
header {
    background-color: var(--header-bg);
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header nav {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

header nav h1 {
    margin: 0;
}

header nav h1 a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.logo-accent {
    color: var(--accent-color);
}

header nav .nav-links {
    list-style: none;
    display: flex;
    gap: 1.8rem;
}

header nav .nav-links li a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

header nav .nav-links li a:hover,
header nav .nav-links li a.active {
    color: var(--accent-color);
}

/* --- Mobile Nav (Hamburger) --- */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle .hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    position: relative;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.nav-toggle .hamburger-icon::before,
.nav-toggle .hamburger-icon::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    position: absolute;
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out, bottom 0.3s ease-in-out;
}

.nav-toggle .hamburger-icon::before { top: -8px; }
.nav-toggle .hamburger-icon::after { bottom: -8px; }
.nav-toggle[aria-expanded="true"] .hamburger-icon { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger-icon::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] .hamburger-icon::after { transform: rotate(-45deg); bottom: 0; }

/* --- Footer --- */
footer {
    background-color: var(--footer-bg);
    color: var(--text-secondary);
    padding: 3rem 2rem 2rem;
    font-size: 0.95rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem auto;
    text-align: left;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-column p {
    margin-bottom: 0.8em;
    line-height: 1.6;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.6em;
}

.footer-column ul li a,
.footer-column p a {
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-column ul li a:hover,
.footer-column p a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.social-links a {
    margin-right: 0.8rem;
    font-size: 1rem;
    display: inline-block;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
}

/* =================================================================== */
/* 3. PAGE-SPECIFIC SECTIONS
/* =================================================================== */

/* --- Hero Section --- */
.hero {
    background: linear-gradient(-45deg, #0D1117, #1A202C, #0a0f18, #39D3BB);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-primary);
    padding: 100px 20px 80px;
    text-align: center;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero h2.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    max-width: 900px;
    letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.hero p.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    line-height: 1.6;
    font-weight: 400;
}

/* --- Mission & OKR Section --- */
.mission.content-section {
    max-width: 900px;
    margin: 6rem auto 0 auto;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    padding: 3rem 2.5rem 2rem 2.5rem;
    border-bottom: none;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    text-align: center;
}

.mission h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.mission h3 + p + h3 {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin-top: 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.mission p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
}

.okr-section {
    max-width: 900px;
    margin: 0 auto 6rem auto;
    padding: 3rem 2.5rem;
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.okr-objective-block {
    margin-bottom: 4rem;
}
.okr-objective-block:last-child {
    margin-bottom: 0;
}

.okr-container {
    max-width: 900px;
    margin: 0 auto;
}

.okr-main-title {
    color: var(--accent-color);
    font-family: var(--font-headings);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.okr-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 50px;
}

.kr-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 25px;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: rgba(var(--primary-bg-rgb), 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.kr-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 20px rgba(var(--accent-color-rgb), 0.1);
}

.kr-item:last-child {
    margin-bottom: 0;
}

.kr-identifier {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    line-height: 1;
    background-color: rgba(var(--accent-color-rgb), 0.1);
}

.kr-details {
    width: 100%;
}

.kr-description {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.kr-status,
.kr-due-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 4px 0;
}

.progress-bar-container {
    width: 100%;
    background-color: rgba(var(--accent-color-rgb), 0.2);
    height: 5px;
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

/* --- Venture Detail Page --- */
.venture-detail-page {
    padding-bottom: 3rem;
}

.venture-hero-section {
    position: relative;
    margin-bottom: 100px;
    line-height: 0;
}

.venture-cover-image {
    width: 100%;
    height: 35vh;
    max-height: 400px;
    min-height: 250px;
    overflow: hidden;
    background-color: var(--secondary-bg);
}

.venture-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.venture-profile-section-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px;
}

.venture-logo-container {
    position: absolute;
    bottom: 0;
    left: 20px;
    transform: translateY(40%);
    background-color: var(--primary-bg);
    z-index: 10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 16px;
}

.venture-logo {
    width: 160px;
    height: 160px;
    display: block;
    object-fit: cover;
    background-color: #f0f2f5;
    padding: 0;
    border-radius: 0;
}

.venture-logo-placeholder {
    width: 160px;
    height: 160px;
    background-color: var(--secondary-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    font-weight: bold;
    border-radius: 10px;
}

.venture-main-content {
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.venture-info h1 {
    font-size: 3rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.venture-oneliner {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.venture-meta-1 {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
}

.venture-meta {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    justify-content: space-between; /* Pushes info to the left and button to the right */
    align-items: center; /* Vertically aligns the text and the button */
    gap: 1.5rem; /* Provides space if they wrap */
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

/* This new container will group the text-based details */
.venture-meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem; /* The spacing for Date, Time, Location */
}

.venture-meta-details span {
    font-size: 1.1rem;
    color: var(--text-primary);
    opacity: 0.9;
}


.venture-meta span {
    font-size: 1.1rem; /* Slightly larger text */
    color: var(--text-primary);
    opacity: 0.9;
}
.venture-meta span strong {
    color: var(--text-primary);
}
.venture-meta a {
    color: var(--accent-color);
    font-weight: 500;
}

.venture-meta .cta-button {
    font-size: 1rem; /* Adjust button size to fit better */
    padding: 0.7rem 1.5rem;
}


.venture-structured-content {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.content-block {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.venture-structured-content .content-block:last-child {
    border-bottom: none;
}

/* === NEW STYLES FOR VENTURE CONTACT BLOCK   === */
/* ============================================== */

.venture-contact-block {
    margin-top: 3rem;
    padding: 2.5rem;
    background-color: var(--primary-bg); /* Use the darkest bg for contrast */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: center;
}

.venture-contact-block h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.venture-contact-block .cta-button {
    margin-top: 1rem;
}

.content-block h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.content-block .content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.content-block .content-body p {
    margin-bottom: 1em;
}

.content-block .content-body ul,
.content-block .content-body ol {
    list-style-position: outside;
    padding-left: 1.5rem;
    margin-bottom: 1em;
}

/* =================================================================== */
/* 4. REUSABLE COMPONENTS
/* =================================================================== */

/* --- Buttons --- */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--text-on-accent);
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.2);
}

.cta-button:hover {
    background-color: #2CBBA5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-color-rgb), 0.3);
}

.cta-button.secondary-cta {
    background-color: var(--secondary-bg);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    box-shadow: none;
}

.cta-button.secondary-cta:hover {
    background-color: var(--accent-color);
    color: var(--text-on-accent);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.2);
}

/* --- Venture/Event Cards --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.card {
    background-color: var(--secondary-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease; /* Use 'all' for smoother transitions */
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color); /* Add a subtle border */
}

.card:hover {
    transform: translateY(-8px); /* More pronounced lift */
    box-shadow: 0 12px 30px rgba(var(--accent-color-rgb), 0.2); /* Brighter glow */
    border-color: rgba(var(--accent-color-rgb), 0.5); /* Highlight border on hover */
}


/* --- 1. Add more space around the entire section (title and cards) --- */
.page-content-section {
    padding: 80px 40px; /* Increased vertical and horizontal padding for more "margin" */
    max-width: 1300px; /* Allow the grid to be a bit wider on large screens */
    margin: 0 auto;
}

/* --- 2. Add more space specifically below the title --- */
.page-content-section h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem; /* INCREASED: Creates more space between title and cards */
    color: var(--text-primary);
}


.event-card {
    padding: 0;
    position: relative; /* For the stretched link */
}

.event-card-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background-color: var(--secondary-bg);
}

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

.event-card-img-placeholder {
    background-color: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-card-img-placeholder span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- 3. Lighten the Image Overlay and Style Title --- */
.event-card-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    /* Use a lighter gradient to show more of the image */
    background: linear-gradient(to top, rgba(10, 15, 24, 0.85) 0%, rgba(10, 15, 24, 0.7) 40%, transparent 100%);
}

.event-card-title-overlay h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.6rem; /* Slightly larger title */
    font-weight: 700; /* Bolder */
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6); /* Add text shadow for legibility */
}

/* --- 4. Fix Readability and Layout of Card Content --- */
.event-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 110px; /* FIXED: Ensures all cards have a consistent minimum height */
}

.event-card-content p {
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    opacity: 0.9; /* Slightly brighter for even better readability */
}

.event-detail-page .venture-info h1 {
    color: var(--accent-color);
}

.stretched-link-cover::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    background-color: rgba(0,0,0,0);
}

/* --- Join Modal --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--secondary-bg);
    margin: 15% auto;
    padding: 3rem;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-content h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.close-button {
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s;
}

.close-button:hover,
.close-button:focus {
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 1rem;
}

#membership-form .form-input::placeholder {
    color: var(--text-secondary);
}

#membership-form .cta-button {
    width: 100%;
    margin-top: 1rem;
}

.form-errors {
    color: #f87171;
    text-align: left;
    margin-bottom: 1rem;
}

.form-errors ul {
    list-style: none;
    padding: 0;
}

/* =================================================================== */
/* 5. RESPONSIVE STYLES
/* =================================================================== */

@media (max-width: 1100px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    header nav h1 a { font-size: 1.5rem; }
    .hero h2.hero-title { font-size: 3.5rem; }
    .hero p.hero-subtitle { font-size: 1.2rem; }
    .cta-button { padding: 0.8rem 1.8rem; font-size: 1rem; }
    .content-section, .mission.content-section, .okr-section { padding: 3rem 1.5rem; }
    
    
    .venture-meta {
        flex-direction: column; /* Stack the text block and button vertically */
        align-items: stretch;   /* Make them both full-width */
        gap: 1.5rem;
    }

    .venture-meta-details {
        flex-direction: column;   /* Stack Date, Time, Location vertically */
        align-items: flex-start;  /* Align them to the left */
        gap: 0.75rem;
    }
    
    /* Ensure the button is centered on its own line on mobile */
    .venture-meta .cta-button {
        text-align: center;
    }
}

@media (max-width: 992px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
    }
    .footer-column {
        min-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .venture-meta {
        flex-direction: column; /* Stack the text block and button vertically */
        align-items: stretch;   /* Make them both full-width */
        gap: 1.5rem;
    }

    .venture-meta-details {
        flex-direction: column;   /* Stack Date, Time, Location vertically */
        align-items: flex-start;  /* Align them to the left */
        gap: 0.75rem;
    }
    
    /* Ensure the button is centered on its own line on mobile */
    .venture-meta .cta-button {
        text-align: center;
    }
}

@media (max-width: 900px) {
    header { padding: 1rem 1.5rem; }
    header nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: var(--header-bg);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        border-top: 1px solid var(--border-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.3s ease;
    }
    header nav .nav-links.nav-open {
        display: flex;
        max-height: 100vh;
        padding: 1rem 0;
    }
    header nav .nav-links li { width: 100%; text-align: center; }
    header nav .nav-links li a { display: block; padding: 1rem; width: 100%; border-bottom: 1px solid var(--border-color); }
    header nav .nav-links li:last-child a { border-bottom: none; }
    .nav-toggle { display: block; }
    .card-grid { grid-template-columns: 1fr; }
    
    
    .venture-meta {
        flex-direction: column; /* Stack the text block and button vertically */
        align-items: stretch;   /* Make them both full-width */
        gap: 1.5rem;
    }

    .venture-meta-details {
        flex-direction: column;   /* Stack Date, Time, Location vertically */
        align-items: flex-start;  /* Align them to the left */
        gap: 0.75rem;
    }
    
    /* Ensure the button is centered on its own line on mobile */
    .venture-meta .cta-button {
        text-align: center;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .hero h2.hero-title { font-size: 2.5rem; letter-spacing: -1px;}
    .hero p.hero-subtitle { font-size: 1.1rem; }
    
    .kr-item {
        flex-direction: column;
        gap: 15px;
        text-align: left;
    }
    .kr-identifier { align-self: flex-start; }

    .venture-hero-section {
        margin-bottom: 20px;
    }
    .venture-cover-image {
        height: 25vh;
        min-height: 180px;
    }
    .venture-logo-container {
        position: static;
        transform: none;
        width: 128px;
        height: 128px;
        margin: -64px auto 20px auto;
        padding: 5px;
    }
    .venture-logo, .venture-logo-placeholder {
        width: 118px;
        height: 118px;
    }
    .venture-main-content {
        text-align: center;
    }
    .venture-info h1 {
        font-size: 2.2rem;
    }
    .venture-oneliner {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    
    .content-block h3 {
        font-size: 1.3rem;
    }
    .content-block .content-body {
        font-size: 1rem;
        text-align: left;
    }
    
        
    /* --- Mobile Fixes for Event Flyer --- */
    .event-flyer-section.content-block {
        /* Make the container invisible on mobile */
        background: transparent;
        border: none;
        padding: 0;
    }

    .event-flyer-section h3 {
        /* Restore normal heading alignment for this section on mobile */
        text-align: left;
        display: block;
        border-bottom: 2px solid var(--accent-color); /* Put the underline back */
        margin-bottom: 1.5rem;
    }

    .event-flyer-image {
        /* Ensure the image is centered within the main page padding */
        
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    
    
    .venture-meta {
        flex-direction: column; /* Stack the text block and button vertically */
        align-items: stretch;   /* Make them both full-width */
        gap: 1.5rem;
    }

    .venture-meta-details {
        flex-direction: column;   /* Stack Date, Time, Location vertically */
        align-items: flex-start;  /* Align them to the left */
        gap: 0.75rem;
    }
    
    /* Ensure the button is centered on its own line on mobile */
    .venture-meta .cta-button {
        text-align: center;
    }
}


/* ============================================== */
/* === NEW STYLES FOR VENTURE GALLERY         === */
/* ============================================== */

.venture-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 220px; /* Give all images a fixed height */
    object-fit: cover; /* Make images cover the area, cropping them uniformly */
    display: block;
    transition: transform 0.3s ease;
}


.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: var(--text-primary);
    padding: 1.5rem 1rem 1rem 1rem;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}



/* ===================================== */
/* === ENHANCEMENTS FOR ARTICLE PAGE === */
/* ===================================== */


/* Find this block in style.css and REPLACE it */

/* ===================================== */
/* === ENHANCEMENTS FOR ARTICLE PAGE === */
/* ===================================== */

/* New 3-column grid for galleries */
.gallery-grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .gallery-grid-3-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid-3-col {
        grid-template-columns: 1fr;
    }
}

/* 
  CORRECTED: This rule now targets any video or gallery that is not the first
  element after a title/content, ensuring space is added between them.
*/
.event-video-wrapper + .event-video-wrapper,
.gallery-grid-3-col + .gallery-grid-3-col,
.event-video-wrapper + .gallery-grid-3-col,
.gallery-grid-3-col + .event-video-wrapper {
    margin-top: 2rem;
}

/* This rule adds initial space after the main text content */
.content-body + .gallery-grid-3-col,
.content-body + .event-video-wrapper,
.cta-container + .gallery-grid-3-col,
.cta-container + .event-video-wrapper {
     margin-top: 2.5rem;
}


/* ========================================================= */
/* === STYLES FOR EVENT DETAIL PAGE (Add or Verify) === */
/* ========================================================= */

.event-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px; /* Added for a modern look */
}

.event-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-embed-fallback {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}


/* ========================================================= */
/* === STYLES FOR EVENT FLYER (FINAL & CORRECTED)        === */
/* ========================================================= */

.event-flyer-section {
    /* This rule can be removed as we will center the h3 directly */
}

/* This new, more specific rule solves the alignment issue. */
.event-flyer-section h3 {
    display: block; /* Make it a full-width block element */
    text-align: center; /* Center the text INSIDE the h3 element */
    border-bottom: none; /* Remove the underline from the generic .content-block h3 style */
    margin-bottom: 1.5rem; /* Add space between the title and the flyer image */
}

.event-flyer-image {
    max-width: auto; /* Override the 600px limit and let it fill the container */
    width: auto;
    height: auto;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    display: block; /* Use block and margin:auto for reliable centering */
    margin-left: auto;
    margin-right: auto;
}

/* ========================================================= */
/* === UTILITY STYLES (Add this new section)             === */
/* ========================================================= */

.page-bottom-link-container {
    margin: 3rem auto; /* Correctly uses margin for top/bottom and centers the block */
    text-align: center; /* Centers the button inside the block */
}


/* ========================================================= */
/* === STYLES FOR COOKIE CONSENT BANNER                  === */
/* ========================================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    z-index: 3000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    
    /* Animation for sliding in */
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.cookie-text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0; /* Prevents buttons from shrinking on small screens */
}

.cookie-buttons .cta-button {
    padding: 0.7rem 1.5rem; /* Slightly smaller buttons for the banner */
    font-size: 0.9rem;
}

/* --- Responsive Adjustments for the Cookie Banner --- */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 1.5rem;
    }

    .cookie-buttons {
        justify-content: center;
    }
}

/* Add this to the end of your style.css file */

/* ===================================== */
/* === 2-COLUMN GRID FOR EVENT LISTS === */
/* ===================================== */

.card-grid-2-col {
    display: grid;
    /* Creates two equal-width columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem; /* The space between cards */
}

/* On screens smaller than 768px (tablets/phones), stack to a single column */
@media (max-width: 768px) {
    .card-grid-2-col {
        grid-template-columns: 1fr;
    }
}


/* Add to your main style.css */
.subsection-block { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
/* Find this rule in your style.css and replace it */

.cta-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center; /* This will center the button */
}

.content-block h2 { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 1.5rem; }
.subsection-block h3 { font-size: 1.8rem; color: var(--text-primary); margin-bottom: 1rem; }

/* ================================================= */
/* ===  DEFINITIVE FIX FOR LIGHTBOX Z-INDEX ISSUE  === */
/* ================================================= */

/* The black overlay */
#lightboxOverlay {
  z-index: 9998 !important; 
}

/* The container for the image, arrows, and caption */
#lightbox {
  z-index: 9999 !important;
}

/* The loading spinner */
.lb-loader {
  z-index: 10000 !important;
}


#lightbox .lb-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* Add the new white-space property */
.article-detail-content .content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap; /* This is the magic line */
}
