: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;
    align-items: center;
    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);
}

/* --- Language Switcher Dropdown --- */
.nav-lang-switcher {
    position: relative;
}
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.lang-toggle:hover {
    background: rgba(var(--accent-color-rgb), 0.08);
    border-color: var(--border-color);
}
.lang-flag {
    display: inline-block;
    width: 22px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}
.lang-flag-it {
    background: linear-gradient(90deg, #009246 33.33%, #fff 33.33%, #fff 66.66%, #CE2B37 66.66%);
}
.lang-flag-en {
    position: relative;
    background: #012169;
}
.lang-flag-en::before,
.lang-flag-en::after {
    content: '';
    position: absolute;
}
.lang-flag-en::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    margin-top: -2px;
    background: #fff;
    box-shadow: 0 0 0 1px #C8102E;
}
.lang-flag-en::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    margin-left: -2px;
    background: #fff;
    box-shadow: 0 0 0 1px #C8102E;
}
.lang-flag-es {
    background: linear-gradient(180deg, #AA151B 25%, #F1BF00 25%, #F1BF00 75%, #AA151B 75%);
}
.lang-flag-fr {
    background: linear-gradient(90deg, #002395 33.33%, #fff 33.33%, #fff 66.66%, #ED2939 66.66%);
}
.lang-label {
    letter-spacing: 0.5px;
}
.lang-caret {
    transition: transform 0.25s ease;
    color: var(--text-secondary);
}
.lang-toggle[aria-expanded="true"] .lang-caret {
    transform: rotate(180deg);
}

/* Language dropdown menu */
.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 150px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.35rem;
    list-style: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    animation: dropdownFadeIn 0.15s ease-out;
}
.lang-dropdown-menu.show {
    display: block;
}
.lang-dropdown-menu form {
    display: block;
}
.lang-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.5rem 0.7rem;
    background: none;
    border: none;
    border-radius: 7px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.lang-option:hover {
    background: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
}
.lang-option.active {
    color: var(--accent-color);
    font-weight: 600;
}
.lang-option.active::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    margin-left: auto;
}

/* --- Profile Avatar Dropdown --- */
.nav-profile-wrapper {
    position: relative;
}
.profile-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid transparent;
    border-radius: 24px;
    cursor: pointer;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    color: var(--text-secondary);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.profile-toggle:hover {
    background: rgba(var(--accent-color-rgb), 0.08);
    border-color: var(--border-color);
}
.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}
.profile-toggle:hover .nav-avatar {
    border-color: var(--accent-color);
}
.nav-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #2bb5a0);
    color: var(--text-on-accent);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.profile-toggle:hover .nav-avatar-fallback {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.3);
}
.profile-caret {
    transition: transform 0.25s ease;
    color: var(--text-secondary);
}
.profile-toggle[aria-expanded="true"] .profile-caret {
    transform: rotate(180deg);
}

/* --- Login link for anonymous users --- */
header nav .nav-links li a.nav-login-btn,
.nav-login-btn {
    color: var(--text-secondary) !important;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.35rem 1.1rem;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.nav-login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.nav-login-btn:hover {
    color: #fff !important;
    border-color: var(--accent-color);
    box-shadow: 0 0 18px rgba(57, 211, 187, 0.25);
}
.nav-login-btn:hover::before {
    opacity: 1;
}
.nav-login-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 8px rgba(57, 211, 187, 0.4);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* --- Hub nav link for staff users --- */
header nav .nav-links li a.nav-hub-link,
.nav-hub-link {
    color: var(--accent-color) !important;
    background: rgba(var(--accent-color-rgb), 0.08);
    border: 1px solid rgba(var(--accent-color-rgb), 0.3);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.35rem 1.1rem;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.nav-hub-link:hover {
    color: var(--text-on-accent) !important;
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 18px rgba(var(--accent-color-rgb), 0.3);
}

/* Dropdown user info: name + tier badge row */
.dropdown-user-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dropdown-user-name-row .tier-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

/* --- Dropdown Menu --- */
.profile-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    min-width: 220px;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.4rem;
    list-style: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    animation: dropdownFadeIn 0.15s ease-out;
}
@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.profile-dropdown-menu.show {
    display: block;
}

/* User info header */
.dropdown-user-info {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0.9rem;
}
.dropdown-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.dropdown-user-email {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Menu items */
.profile-dropdown-menu li a,
.dropdown-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    text-align: left;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease;
}
.profile-dropdown-menu li a svg,
.dropdown-logout-btn svg {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}
.profile-dropdown-menu li a:hover,
.dropdown-logout-btn:hover {
    background: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
}
.profile-dropdown-menu li a:hover svg,
.dropdown-logout-btn:hover svg {
    opacity: 1;
}
.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.35rem 0.5rem;
}
.dropdown-logout-btn {
    color: #e53e3e;
}
.dropdown-logout-btn:hover {
    color: #fc8181;
    background: rgba(229, 62, 62, 0.08);
}
.dropdown-logout-btn:hover svg {
    opacity: 1;
}

/* --- 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 hero action tabs — sits between hero and content, right of logo */
.venture-hero-actions {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
}

.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 */
    overflow: hidden;
}

.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);
}

/* --- Card Edit Bar & Button --- */
.card-edit-bar {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--secondary-bg);
}

.card-edit-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    background: transparent;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.card-edit-btn svg {
    flex-shrink: 0;
}

.card-edit-btn:hover {
    background: var(--accent-color);
    color: #fff;
}

@media (max-width: 480px) {
    .card-edit-bar {
        padding: 0.35rem 0.75rem;
    }
    .card-edit-btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}

/* --- 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 {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s;
    cursor: pointer;
    line-height: 1;
}

.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; }

    /* Mobile: language switcher */
    .nav-lang-switcher { padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); width: 100%; }
    .lang-toggle { justify-content: center; width: 100%; border-radius: 0; padding: 0.6rem 1rem; }
    .lang-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        min-width: auto;
        padding: 0;
        animation: none;
    }
    .lang-dropdown-menu.show { display: block; }
    .lang-option { justify-content: center; padding: 0.7rem 1rem; border-radius: 0; }

    /* Mobile: login button */
    .nav-login-btn {
        display: block;
        text-align: center;
        margin: 0.5rem 1.5rem;
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Mobile: hub link */
    .nav-hub-link {
        display: block;
        text-align: center;
        margin: 0.5rem 1.5rem;
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Mobile: profile dropdown becomes inline */
    .nav-profile-wrapper { padding: 0.5rem 0; width: 100%; }
    .profile-toggle {
        justify-content: center;
        width: 100%;
        border-radius: 0;
        padding: 0.6rem 1rem;
    }
    .profile-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        min-width: auto;
        padding: 0;
        animation: none;
    }
    .profile-dropdown-menu.show { display: block; }
    .dropdown-user-info {
        align-items: center;
        padding: 0.6rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    .dropdown-divider { display: none; }
    .profile-dropdown-menu li a,
    .dropdown-logout-btn {
        justify-content: center;
        padding: 0.8rem 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }
    .profile-dropdown-menu li:last-child .dropdown-logout-btn {
        border-bottom: none;
    }
    .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-hero-actions {
        justify-content: flex-end;
    }
    .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 */
}

/* ================================ */
/* Auth pages                       */
/* ================================ */
.auth-container {
    max-width: 480px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.auth-container h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}
.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-errors, .field-errors {
    margin-bottom: 0.5rem;
}
.error-message {
    color: #EF4444;
    font-size: 0.85rem;
    margin: 0.25rem 0;
}
.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.auth-link a {
    color: var(--accent-color);
}

/* ================================ */
/* Tier badges                      */
/* ================================ */
.tier-badge { display: inline-block; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; }
.badge-member { background: rgba(57,211,187,0.15); color: #39D3BB; }
.badge-member-plus { background: rgba(129,140,248,0.15); color: #818CF8; }
.badge-advisor { background: rgba(245,158,11,0.15); color: #F59E0B; }
.badge-guest { background: rgba(160,174,192,0.15); color: #A0AEC0; }
.badge-partner { background: rgba(236,72,153,0.15); color: #EC4899; }

/* ================================ */
/* Skill tags                       */
/* ================================ */
.skill-tag { display: inline-block; background: rgba(57,211,187,0.1); color: #39D3BB; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.85rem; margin: 0.2rem; }

/* ================================ */
/* Dashboard                        */
/* ================================ */
.dashboard-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
}
.stat-card h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
}
.text-accent { color: var(--accent-color); }
.text-muted { color: var(--text-secondary); }
.dashboard-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.dashboard-section h3 {
    margin-bottom: 1rem;
}

/* ================================ */
/* Hub Dashboard                    */
/* ================================ */
.hub-dashboard-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    flex-wrap: wrap;
}
.hub-nav-tab {
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    font-weight: 500;
}
.hub-nav-tab:hover {
    color: var(--text-primary);
}
.hub-nav-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.hub-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}
.hub-chart-grid-single {
    grid-template-columns: 1fr;
}
.hub-chart-box {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
}
.hub-chart-box h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hub-chart-box-wide {
    grid-column: 1 / -1;
}
@media (max-width: 768px) {
    .hub-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* Hub Dashboard — Page Override */
.hub-dashboard-page.page-content-section {
    padding: 2rem 2rem 3rem;
}
.hub-dashboard-page.page-content-section > h2 {
    /* Hide — heading lives inside .hub-hero instead */
    display: none;
}

/* Hub Dashboard — Hero Header */
.hub-hero {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-bottom: 3px solid var(--accent-color);
    border-radius: 12px 12px 0 0;
    padding: 2rem 2rem 1.5rem;
    margin-bottom: 1.5rem;
}
.hub-hero-text h2 {
    text-align: left;
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}
.hub-hero-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.hub-hero-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.hub-hero-pill {
    background: rgba(var(--accent-color-rgb), 0.08);
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.hub-hero-pill-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.hub-hero-pill-value {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1rem;
}

/* Hub Dashboard — Two-Column Layout */
.hub-two-col {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 768px) {
    .hub-two-col {
        grid-template-columns: 1fr;
    }
}

/* Hub Dashboard — Sections */
.hub-section {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.hub-section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.hub-section-header h3 {
    margin: 0;
    font-size: 1.15rem;
}
.hub-section-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Hub Dashboard — Stat Cards inside sections need darker bg */
.hub-section .stat-card {
    background: var(--primary-bg);
}
.hub-section .dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Hub Dashboard — Stat Card Icons */
.stat-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: rgba(var(--accent-color-rgb), 0.1);
    color: var(--accent-color);
}
.stat-card-icon svg {
    width: 18px;
    height: 18px;
}
.stat-card-icon--success {
    background: rgba(72, 187, 120, 0.1);
    color: #48BB78;
}
.stat-card-icon--warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}
.stat-card-icon--danger {
    background: rgba(245, 101, 101, 0.1);
    color: #F56565;
}

/* Hub Dashboard — Info Cards */
.hub-info-card {
    background: rgba(var(--accent-color-rgb), 0.04);
    border-left: 3px solid var(--accent-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.hub-info-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.hub-info-card-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-color);
}
.hub-info-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.95rem;
}
.hub-info-card-row span {
    color: var(--text-secondary);
}
.hub-info-card-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Hub Dashboard — Section Links */
.hub-section-link {
    display: inline-block;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    padding-top: 0.5rem;
    transition: opacity 0.2s;
}
.hub-section-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Hub Dashboard — Quick Links */
.hub-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.hub-quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.hub-quick-link:hover {
    background: rgba(var(--accent-color-rgb), 0.08);
    color: var(--accent-color);
}
.hub-quick-link svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.hub-quick-link:hover svg {
    color: var(--accent-color);
}

.hub-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.hub-filters .form-input {
    flex: 1;
    min-width: 150px;
    max-width: 250px;
}
.hub-table-wrap {
    overflow-x: auto;
}
.hub-data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
}
.hub-data-table th,
.hub-data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.hub-data-table th {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
}
.hub-data-table tr:last-child td {
    border-bottom: none;
}
.hub-member-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.hub-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.hub-member-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    flex-shrink: 0;
}
.hub-member-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}
.hub-status {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.hub-status-active { background: rgba(57,211,187,0.15); color: #39D3BB; }
.hub-status-pending { background: rgba(255,193,7,0.15); color: #ffc107; }
.hub-status-expired { background: rgba(253,126,20,0.15); color: #fd7e14; }
.hub-status-cancelled { background: rgba(220,53,69,0.15); color: #dc3545; }
.hub-btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
}
.hub-pagination {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
}
.hub-edit-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    max-width: 600px;
}
.hub-edit-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.hub-edit-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}
.form-error {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}
.hub-inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.hub-input-sm {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    max-width: 150px;
}
.hub-btn-danger {
    background: rgba(220,53,69,0.15);
    color: #dc3545;
    border: 1px solid rgba(220,53,69,0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}
.hub-btn-danger:hover {
    background: rgba(220,53,69,0.25);
}
.hub-add-member-form {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.hub-autocomplete-wrap {
    position: relative;
    flex: 1;
    min-width: 250px;
}
.hub-autocomplete-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}
.hub-ac-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}
.hub-ac-item:hover {
    background: var(--primary-bg);
}
.hub-ac-item:last-child {
    border-bottom: none;
}
.hub-ac-empty {
    cursor: default;
    color: var(--text-secondary);
}
.hub-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-width: 500px;
    margin: 2rem auto;
}
.hub-placeholder h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.hub-placeholder p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ================================ */
/* Profile                          */
/* ================================ */
.profile-picture { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-color); }
.profile-picture-placeholder { width: 120px; height: 120px; border-radius: 50%; background: var(--secondary-bg); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--accent-color); border: 3px solid var(--border-color); }
.profile-preview {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.profile-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.profile-header-info h2 {
    margin-bottom: 0.25rem;
}
.profile-section {
    margin-top: 1.5rem;
}
.profile-section h3 {
    margin-bottom: 0.5rem;
}
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.field-help {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}
.form-checkbox {
    width: auto;
    margin-right: 0.5rem;
}

/* ================================ */
/* Member Profile Page (Private)    */
/* ================================ */
.member-profile-page .mp-hero {
    margin-bottom: 100px;
}
.mp-hero-bg {
    width: 100%;
    height: 35vh;
    max-height: 400px;
    min-height: 250px;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    border-bottom: 3px solid var(--accent-color);
}
.mp-avatar-container {
    border-radius: 50%;
}
.mp-avatar {
    border-radius: 50%;
    object-fit: cover;
}
.mp-avatar-placeholder {
    border-radius: 50%;
}
.mp-info-bar {
    margin-top: 1.5rem;
}
.mp-linkedin-link {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 1.1rem;
}
.mp-linkedin-link:hover {
    text-decoration: underline;
}
.mp-actions {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .member-profile-page .mp-hero {
        margin-bottom: 20px;
    }
    .mp-hero-bg {
        height: 25vh;
        min-height: 180px;
    }
    .member-profile-page .mp-avatar-container {
        position: static;
        transform: none;
        width: 128px;
        height: 128px;
        margin: -64px auto 20px auto;
        padding: 5px;
    }
    .member-profile-page .mp-avatar,
    .member-profile-page .mp-avatar-placeholder {
        width: 118px;
        height: 118px;
    }
    .mp-actions {
        justify-content: center;
    }
}

.event-history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

/* ================================ */
/* Member Directory                 */
/* ================================ */
.directory-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.directory-filters .form-input {
    flex: 1;
    min-width: 150px;
}
.directory-filters .cta-button {
    flex-shrink: 0;
}
.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}
.member-card:hover {
    text-decoration: none;
}
.featured-member {
    border-color: var(--accent-color);
}
.member-card-avatar {
    margin-bottom: 1rem;
}
.member-card-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}
.member-card-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    border: 2px solid var(--border-color);
}
.member-card-info h3 {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}
.member-card-skills {
    margin-top: 0.5rem;
}

/* ============================== */
/* Floating Action Button (FAB)   */
/* ============================== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--primary-bg);
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(57, 211, 187, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
    line-height: 1;
}
.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(57, 211, 187, 0.6);
    text-decoration: none;
    color: var(--primary-bg);
}

/* ============================== */
/* Content Creation Forms         */
/* ============================== */
.content-create-form {
    max-width: 800px;
    margin: 0 auto;
}
.form-fieldset {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.form-fieldset legend {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-color);
    padding: 0 0.5rem;
}
.form-static-text {
    color: var(--text-color);
    font-size: 0.95rem;
    margin: 0;
    padding: 0.4rem 0;
}
.form-static-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.form-static-list li {
    font-size: 0.95rem;
    color: var(--text-color);
    padding: 0.2rem 0;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.form-group.has-error .form-input {
    border-color: #e53e3e;
}
.field-error {
    display: block;
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}
.form-errors {
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid #e53e3e;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.form-errors .error-message {
    color: #e53e3e;
    margin: 0;
}
.form-textarea {
    resize: vertical;
    min-height: 100px;
}
.form-checkbox {
    width: auto;
    margin-right: 0.5rem;
}
.section-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}
.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.section-label {
    font-family: var(--font-headings);
    font-weight: 600;
    color: var(--text-primary);
}
.remove-section-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.25rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
}
.remove-section-btn:hover {
    color: #e53e3e;
    border-color: #e53e3e;
}
.cta-button-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}
.cta-button-outline:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
}
.form-actions {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

/* --- Subsection cards (nested inside section cards) --- */
.subsection-forms {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.subsection-heading {
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.subsection-card {
    margin-left: 1.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--accent-color);
    position: relative;
}
.subsection-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.subsection-label {
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.remove-subsection-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s;
}
.remove-subsection-btn:hover {
    color: #e53e3e;
    border-color: #e53e3e;
}
.add-subsection-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    margin-top: 0.5rem;
}

/* --- Article status ribbon (tilted overlay badge) --- */
.article-status-ribbon {
    position: absolute;
    top: 14px;
    right: -30px;
    z-index: 2;
    padding: 0.25rem 2.5rem;
    font-family: var(--font-headings);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: rotate(35deg);
    pointer-events: none;
}
.article-status-draft {
    background: #ecc94b;
    color: #1a202c;
}
.article-status-review {
    background: #ed8936;
    color: #1a202c;
}

/* --- News List: Hero Header --- */
.news-hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 2rem 2.5rem;
}
.news-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(57,211,187,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(57,211,187,0.05) 0%, transparent 55%),
        radial-gradient(ellipse 90% 40% at 50% 110%, rgba(57,211,187,0.04) 0%, transparent 50%);
    pointer-events: none;
}
.news-hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(57,211,187,0.15) 50%, transparent 95%);
}
.news-hero-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.news-hero-title {
    font-family: var(--font-headings);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}
.news-hero-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 2rem;
    line-height: 1.5;
}

/* Hero stats row */
.news-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}
.news-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}
.news-hero-stat-val {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.news-hero-stat:first-child .news-hero-stat-val {
    color: var(--accent-color);
}
.news-hero-stat-lbl {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}
.news-hero-stat--chart {
    flex-direction: row;
    width: 120px;
    height: 36px;
}

/* Hero search box */
.news-search-wrap {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}
.news-search-input {
    width: 100%;
    padding: 0.7rem 3rem 0.7rem 1.25rem;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.news-search-input::placeholder {
    color: rgba(255,255,255,0.25);
}
.news-search-input:focus {
    background: rgba(255,255,255,0.06);
    border-color: rgba(57,211,187,0.3);
    box-shadow: 0 0 0 3px rgba(57,211,187,0.06);
}
.news-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.25);
    pointer-events: none;
    transition: color 0.3s;
}
.news-search-input:focus ~ .news-search-icon {
    color: var(--accent-color);
}

/* Content section override — tighten top padding since hero provides spacing */
.news-list-content {
    padding-top: 2rem;
}

/* --- News List: Section Headings --- */
.news-section {
    margin-bottom: 2.5rem;
}
.news-section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.news-section-heading svg {
    color: var(--accent-color);
    flex-shrink: 0;
}
.news-section-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    margin-left: 0.25rem;
}

@media (max-width: 768px) {
    .news-hero {
        padding: 3rem 1.25rem 2rem;
    }
    .news-hero-title {
        font-size: 1.8rem;
    }
    .news-hero-subtitle {
        font-size: 0.82rem;
    }
    .news-hero-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }
    .news-hero-stat-val {
        font-size: 1.2rem;
    }
    .news-hero-stat--chart {
        width: 100%;
        height: 32px;
        order: 10;
    }
    .news-search-wrap {
        max-width: 100%;
    }
}

/* --- My Articles Dashboard --- */
.my-articles-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}
.my-articles-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--secondary-bg);
    border-radius: 10px;
    overflow: hidden;
}
.my-articles-table thead {
    background: var(--primary-bg);
}
.my-articles-table th,
.my-articles-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.my-articles-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}
.my-articles-table td a {
    color: var(--accent-color);
}
.my-articles-table td a:hover {
    text-decoration: underline;
}
.article-status-badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.article-status-badge.article-status-published {
    background: #48bb78;
    color: #fff;
}
.article-status-badge.article-status-draft {
    background: #ecc94b;
    color: #1a202c;
}
.article-status-badge.article-status-review {
    background: #ed8936;
    color: #1a202c;
}

@media (max-width: 768px) {
    .my-articles-table thead {
        display: none;
    }
    .my-articles-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 0.5rem;
    }
    .my-articles-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        padding: 0.6rem 0.8rem;
    }
    .my-articles-table td:last-child {
        border-bottom: none;
    }
    .my-articles-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
        color: var(--text-secondary);
        margin-right: 1rem;
    }
}


/* =================================================================== */
/* ARTICLE DETAIL: TWO-COLUMN LAYOUT, BREADCRUMB, SIDEBAR, COMPACT ANALYTICS
/* =================================================================== */

/* Breadcrumb */
.article-breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 0;
}

.article-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.article-breadcrumb li + li::before {
    content: "›";
    margin-right: 0.25rem;
    color: var(--text-secondary);
}

.article-breadcrumb li:last-child {
    color: var(--text-primary);
}

/* =================================================================== */
/* ARTICLE DETAIL — Overrides for venture-shared classes
/* =================================================================== */

/* Article pages don't have a logo overlap, so reduce the hero margin */
.venture-detail-page:has(.article-detail-layout) .venture-hero-section {
    margin-bottom: 0;
}

/* Article hero footer overlay */
.article-hero-section {
    display: flex;
    flex-direction: column;
}
.article-hero-section .venture-cover-image {
    height: 45vh;
    max-height: 480px;
    min-height: 280px;
}
.article-hero-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.15) 80%, transparent 100%);
    padding: 3rem 0 1.5rem;
    z-index: 5;
}
.article-hero-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}
.article-hero-footer-text {
    flex: 1;
    min-width: 0;
}
.article-hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.6rem;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.article-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.article-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}
.article-hero-meta svg {
    opacity: 0.7;
    flex-shrink: 0;
}
.article-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.article-hero-cta:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}
.article-hero-cta--primary {
    background: var(--accent-color);
    color: var(--text-on-accent);
    border-color: var(--accent-color);
    cursor: pointer;
    font-family: inherit;
}
.article-hero-cta--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--text-on-accent);
}
.article-hero-cta--active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}
.article-hero-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

/* Events also use article-hero-section — remove the logo-overlap margin */
.event-detail-page .venture-hero-section,
.venture-detail-page:has(.venture-main-content) .article-hero-section {
    margin-bottom: 0;
}

/* Cover image placeholder when no cover image exists */
.venture-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, rgba(var(--accent-color-rgb), 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Article meta: left-align, don't space-between */
.article-detail-main .venture-meta {
    justify-content: flex-start;
    gap: 0.75rem 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Admin Toolbar */
.article-admin-toolbar {
    max-width: 1160px;
    margin: 0.75rem auto 0;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: rgba(var(--accent-color-rgb), 0.05);
    border: 1px solid rgba(var(--accent-color-rgb), 0.15);
    border-radius: 10px;
}
.article-admin-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.article-admin-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.article-admin-status {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
}
.article-admin-status--published {
    background: rgba(57, 211, 187, 0.15);
    color: var(--accent-color);
}
.article-admin-status--review {
    background: rgba(253, 126, 20, 0.15);
    color: #fd7e14;
}
.article-admin-status--draft {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}
.article-admin-category {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
}
.article-admin-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}
.article-admin-badge--members {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}
.article-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    background: var(--accent-color);
    color: var(--text-on-accent);
    transition: opacity 0.2s, box-shadow 0.2s;
}
.article-admin-btn:hover {
    opacity: 0.9;
    box-shadow: 0 2px 10px rgba(var(--accent-color-rgb), 0.3);
}
.article-admin-btn--secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
}
.article-admin-btn--secondary:hover {
    background: rgba(255,255,255,0.14);
    color: var(--text-primary);
    opacity: 1;
    box-shadow: none;
}

@media (max-width: 768px) {
    .article-admin-toolbar {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* Two-column grid */
.article-detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}

.article-detail-main {
    min-width: 0;
}

/* Sidebar */
.article-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Sidebar Stats Card */
.sidebar-stats-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.sidebar-stats-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-stats-header svg {
    color: var(--accent-color);
    flex-shrink: 0;
}
.sidebar-stats-header h4 {
    margin: 0;
    font-size: 0.9rem;
}
.sidebar-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.sidebar-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}
.sidebar-stat:nth-child(2n) {
    border-right: none;
}
.sidebar-stat:nth-last-child(-n+2) {
    border-bottom: none;
}
.sidebar-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}
.sidebar-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.2rem;
}
.sidebar-stats-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Card translation flag badges */
.card-translation-flags {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    display: flex;
    gap: 0.3rem;
}
.card-translation-flags .lang-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
}

/* Sidebar Translations Card */
.sidebar-translations-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.sidebar-translations-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-translations-header svg {
    color: var(--accent-color);
    flex-shrink: 0;
}
.sidebar-translations-header h4 {
    margin: 0;
    font-size: 0.9rem;
}
.sidebar-translations-available,
.sidebar-translations-missing {
    padding: 0.75rem 1.25rem;
}
.sidebar-translations-missing {
    border-top: 1px solid var(--border-color);
}
.sidebar-translations-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.sidebar-translations-flags {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.sidebar-translation-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-primary);
}
.sidebar-translation-item .lang-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
}
.sidebar-translation-item--missing {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Sidebar Latest News Card */
.sidebar-latest-card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.sidebar-latest-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-latest-header svg {
    color: var(--accent-color);
    flex-shrink: 0;
}
.sidebar-latest-header h4 {
    margin: 0;
    font-size: 0.9rem;
}
.sidebar-latest-list {
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
}
.sidebar-latest-item {
    display: block;
    position: relative;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.sidebar-latest-item:last-child {
    margin-bottom: 0;
}
.sidebar-latest-item:hover {
    border-color: rgba(var(--accent-color-rgb), 0.3);
    box-shadow: 0 3px 14px rgba(var(--accent-color-rgb), 0.1);
    transform: translateY(-1px);
}
.sidebar-latest-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 55%, rgba(0,0,0,0.12) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.6rem 0.7rem;
}
.sidebar-latest-item-category {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    align-self: flex-start;
    backdrop-filter: blur(4px);
}
.sidebar-latest-item-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.sidebar-latest-item-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.sidebar-latest-item-meta {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.65);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.sidebar-latest-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}
.sidebar-latest-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.sidebar-latest-footer a:hover {
    opacity: 0.8;
}
.sidebar-latest-footer a svg {
    transition: transform 0.2s;
}
.sidebar-latest-footer a:hover svg {
    transform: translateX(2px);
}

/* Compact analytics card */
.article-compact-analytics {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.compact-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 70px;
}

.compact-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: var(--font-headings);
    line-height: 1.2;
}

.compact-stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive: stack sidebar below on small screens */
@media (max-width: 900px) {
    .article-detail-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .article-detail-sidebar {
        position: static;
    }

    .article-breadcrumb {
        padding: 1rem 1rem 0;
    }

    .article-hero-footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 1rem;
    }
    .article-hero-title {
        font-size: 1.5rem;
    }
    .article-hero-meta {
        gap: 0.6rem;
    }
    .article-hero-meta span {
        font-size: 0.78rem;
    }
    .article-hero-cta {
        align-self: flex-start;
    }
    .article-hero-actions {
        flex-wrap: wrap;
    }
}



/* =================================================================== */
/* DETAIL PAGE ANALYTICS PANEL
/* =================================================================== */

.detail-analytics {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.detail-analytics-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    color: var(--accent-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.detail-analytics-toggle:hover {
    background: rgba(var(--accent-color-rgb), 0.08);
}

.detail-analytics-caret {
    margin-left: auto;
    transition: transform 0.25s;
}
.detail-analytics-toggle[aria-expanded="true"] .detail-analytics-caret {
    transform: rotate(180deg);
}

.detail-analytics-content {
    display: none;
    margin-top: 1.5rem;
}
.detail-analytics-content.open {
    display: block;
}

.analytics-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.analytics-chart-box {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.2rem;
}
.analytics-chart-box:first-child {
    grid-column: 1 / -1;
}
.analytics-chart-box h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.analytics-referrers-table {
    margin-top: 1.5rem;
}
.analytics-referrers-table h4 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}
.analytics-referrers-table table {
    width: 100%;
    border-collapse: collapse;
}
.analytics-referrers-table th,
.analytics-referrers-table td {
    padding: 0.5rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}
.analytics-referrers-table th {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .analytics-chart-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================== */
/* === HUB DASHBOARD: ARTICLE LIST            === */
/* ============================================== */

/* --- Articles Card: Header --- */
.hub-articles-card {
    padding: 0 !important;
    overflow: hidden;
}
.hub-articles-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.hub-articles-header-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hub-articles-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}
.hub-articles-pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hub-articles-pill--published .hub-articles-pill-dot { background: var(--accent-color); }
.hub-articles-pill--review .hub-articles-pill-dot { background: #fd7e14; }
.hub-articles-pill--draft .hub-articles-pill-dot { background: #ffc107; }

/* --- Articles Card: Image Card List --- */
.hub-article-card-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1rem;
}

.hub-article-card {
    display: block;
    position: relative;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.6rem;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.hub-article-card:last-child {
    margin-bottom: 0;
}
.hub-article-card:hover {
    border-color: rgba(var(--accent-color-rgb), 0.35);
    box-shadow: 0 4px 20px rgba(var(--accent-color-rgb), 0.1);
    transform: translateY(-1px);
}

.hub-article-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.15) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
}

.hub-article-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.hub-article-card-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hub-article-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hub-article-card-meta {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --- Articles Card: Footer --- */
.hub-articles-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255,255,255,0.02);
}
.hub-articles-footer-total {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.hub-articles-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.hub-articles-footer-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}
.hub-articles-footer-link:hover {
    opacity: 0.85;
}
.hub-articles-footer-link:hover svg {
    transform: translateX(2px);
}

/* --- Legacy article list (kept for other views) --- */
.hub-article-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

a.hub-article-item {
    text-decoration: none;
    color: inherit;
}
.hub-article-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid transparent;
    border-radius: 8px;
    transition: background 0.2s;
}
.hub-article-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(var(--accent-color-rgb), 0.2);
    box-shadow: 0 0 12px rgba(var(--accent-color-rgb), 0.06);
}

.hub-article-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.hub-article-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
}
.hub-article-thumb-placeholder svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.hub-article-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.hub-article-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hub-article-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.hub-article-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}
.hub-article-category {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
}
.hub-article-category-press {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}
.hub-article-category-blog {
    background: rgba(236, 72, 153, 0.15);
    color: #f9a8d4;
}
.hub-article-category-news {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* ============================================== */
/* === HUB DASHBOARD: VENTURE CARDS           === */
/* ============================================== */

.hub-venture-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
}

.hub-venture-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: background 0.2s;
}
.hub-venture-card:hover {
    background: rgba(255,255,255,0.06);
}

.hub-venture-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hub-venture-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.hub-venture-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.hub-venture-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
}
.hub-venture-logo-placeholder svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.hub-venture-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-venture-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-left: 3.25rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .hub-venture-card-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .hub-venture-meta {
        padding-left: 0;
    }
}

/* ========================================= */
/* Manage Page (Settings / Analytics shared) */
/* ========================================= */
.article-manage-page.page-content-section {
    max-width: 1000px;
    padding: 2rem 2rem 3rem;
}
.article-manage-page.analytics-manage-page.page-content-section {
    max-width: 1200px;
}
.article-manage-page.page-content-section > h2 {
    display: none;
}

/* Wrap for manage header when used inside full-width pages (e.g. article detail) */
.manage-header-wrap {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 1rem 2rem 0;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}
.manage-header-wrap .article-breadcrumb {
    padding: 0 0 0.5rem;
    max-width: none;
    margin: 0;
}
.manage-header-wrap .manage-page-tabs {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Page header */
.manage-page-header {
    margin-bottom: 0;
}
.manage-page-header-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.manage-page-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.manage-page-header-info h1 {
    font-size: 1.8rem;
    margin: 0 0 0.6rem;
    line-height: 1.3;
}
.manage-page-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.manage-page-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.manage-page-meta-item svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* Navigation tabs */
.manage-page-tabs {
    display: flex;
    gap: 0;
    margin: 1.5rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
}
.manage-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.manage-tab svg {
    opacity: 0.5;
    flex-shrink: 0;
}
.manage-tab:hover {
    color: var(--text-primary);
}
.manage-tab:hover svg {
    opacity: 0.8;
}
.manage-tab--active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}
.manage-tab--active svg {
    opacity: 1;
}

/* Settings — form area narrower */
.article-manage-page .content-create-form {
    max-width: 680px;
}

/* Settings — cover preview */
.settings-cover-preview {
    margin-bottom: 0.75rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.settings-cover-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Settings — scrollable checkbox list for M2M fields */
.checkbox-list-scroll {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    background: var(--bg-color);
}
.checkbox-list-scroll ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.checkbox-list-scroll li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}
.checkbox-list-scroll li label {
    margin-bottom: 0;
    font-weight: 400;
    font-size: 0.9rem;
    cursor: pointer;
}
.checkbox-list-scroll li input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Settings — checkbox row */
.form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-group--checkbox label {
    margin-bottom: 0;
}

/* Settings — status hint */
.settings-status-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(var(--accent-color-rgb), 0.06);
    border: 1px solid rgba(var(--accent-color-rgb), 0.15);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.settings-status-hint svg {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.settings-status-hint p {
    margin: 0;
}

/* ========================================= */
/* Analytics Page — Layout                   */
/* ========================================= */

/* Tabs — positioned under hero */
.analytics-page-tabs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================= */
/* Analytics Page — Two-Column Layout        */
/* ========================================= */
.analytics-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem 3rem;
}
.analytics-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}
.analytics-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Chart boxes */
.analytics-full-box {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
}
.analytics-full-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
}
.analytics-full-box h4 svg {
    color: var(--accent-color);
    flex-shrink: 0;
}

/* Doughnut pair — side by side inside main */
.analytics-pair-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.analytics-doughnut-wrap {
    max-width: 220px;
    margin: 0 auto;
}

/* Chart + table combo (country/language sections) */
.analytics-chart-table-combo {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.analytics-chart-table-combo .analytics-doughnut-wrap {
    max-width: 200px;
    margin: 0 auto;
}

/* Source type badges */
.analytics-source-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 3px;
    line-height: 1.4;
}
.analytics-source-badge--search {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
.analytics-source-badge--social {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
}
.analytics-source-badge--referral {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
.analytics-source-badge--direct {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Visitor Types card — enhanced */
.visitor-types-body {
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.visitor-types-chart-wrap {
    position: relative;
    width: 140px;
    height: 140px;
}
.visitor-types-chart-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.visitor-types-chart-total {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}
.visitor-types-chart-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}
.visitor-types-detail {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.visitor-type-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
}
.visitor-type-row:last-child {
    border-bottom: none;
}
.visitor-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.visitor-type-dot--new { background: #10b981; }
.visitor-type-dot--returning { background: #6366f1; }
.visitor-type-name {
    flex: 1;
    color: var(--text-secondary);
}
.visitor-type-count {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 2ch;
    text-align: right;
}
.visitor-type-pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 3.5ch;
    text-align: right;
    opacity: 0.75;
}

/* Referrers table */
.analytics-referrers-tbl {
    width: 100%;
    border-collapse: collapse;
}
.analytics-referrers-tbl thead th {
    text-align: left;
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}
.analytics-referrers-tbl tbody td {
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-color);
}
.analytics-referrers-tbl tbody tr:last-child td {
    border-bottom: none;
}
.analytics-referrers-tbl tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Sidebar — quick actions card */
.analytics-sidebar-actions {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.analytics-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s, color 0.15s;
}
.analytics-sidebar-link:last-child {
    border-bottom: none;
}
.analytics-sidebar-link svg {
    color: var(--accent-color);
    opacity: 0.7;
    flex-shrink: 0;
}
.analytics-sidebar-link:hover {
    background: rgba(var(--accent-color-rgb), 0.06);
    color: var(--text-primary);
}
.analytics-sidebar-link:hover svg {
    opacity: 1;
}

/* Visitor Flow */
.visitor-flow-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.analytics-no-data {
    color: var(--text-secondary);
    font-size: 0.88rem;
    text-align: center;
    padding: 1.5rem 0;
}
.visitor-flow-entry {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.visitor-flow-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.visitor-flow-time {
    margin-left: auto;
    opacity: 0.7;
}
.visitor-flow-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}
.visitor-flow-page {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-family: monospace;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.visitor-flow-page--current {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    font-weight: 600;
}
.visitor-flow-arrow {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 0.75rem;
}

/* ========================================= */
/* Responsive — Manage & Analytics pages     */
/* ========================================= */
@media (max-width: 768px) {
    .article-manage-page.page-content-section {
        padding: 1.25rem 1rem 2rem;
    }
    .manage-header-wrap {
        padding: 0.75rem 1rem 0;
    }
    .manage-page-header-info h1 {
        font-size: 1.35rem;
    }
    .manage-page-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .manage-page-tabs::-webkit-scrollbar {
        display: none;
    }
    .manage-tab {
        padding: 0.65rem 0.85rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    .analytics-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .analytics-sidebar {
        position: static;
    }
    .analytics-page-tabs {
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .analytics-page-tabs::-webkit-scrollbar {
        display: none;
    }
    .analytics-pair-grid {
        grid-template-columns: 1fr;
    }
    .analytics-doughnut-wrap {
        max-width: 240px;
    }
    .visitor-flow-trail {
        flex-direction: column;
        align-items: flex-start;
    }
    .visitor-flow-arrow {
        transform: rotate(90deg);
        margin: 0 0.5rem;
    }
    .visitor-flow-page {
        max-width: 100%;
    }
}

/* ================================================= */
/* ===  ARTICLE EDITOR — WYSIWYG PREVIEW STYLES  === */
/* ================================================= */

.article-editor-form {
    max-width: 900px;
    margin: 0 auto;
}

/* Cover image section — mirrors venture-hero */
.editor-cover-section {
    margin-bottom: 2rem;
}
.editor-cover-preview {
    position: relative;
    width: 100%;
    height: 30vh;
    max-height: 350px;
    min-height: 200px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--secondary-bg);
}
.editor-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.editor-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.25s;
}
.editor-cover-preview:hover .editor-cover-overlay {
    opacity: 1;
}
.editor-cover-change-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.editor-cover-change-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}
.editor-cover-empty {
    width: 100%;
    height: 200px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-bg);
    transition: border-color 0.2s, background 0.2s;
}
.editor-cover-empty:hover {
    border-color: var(--accent-color);
    background: rgba(var(--accent-color-rgb), 0.05);
}
.editor-cover-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
}
.editor-cover-add-btn:hover {
    color: var(--accent-color);
}

/* Article header — title as large H1-style input */
.editor-article-header {
    margin-bottom: 2.5rem;
}
.editor-article-header .form-input[name*="title"] {
    font-family: var(--font-headings);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0;
    width: 100%;
    transition: border-color 0.2s;
}
.editor-article-header .form-input[name*="title"]:focus {
    border-bottom-color: var(--accent-color);
    outline: none;
    box-shadow: none;
}
.editor-article-header .form-input[name*="title"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* Meta row — category + members-only inline */
.editor-meta-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.editor-meta-field {
    flex: 0 0 auto;
}
.editor-meta-field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}
.editor-meta-field select.form-input {
    min-width: 160px;
}
.editor-meta-row .form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0;
}
.editor-meta-row .form-group--checkbox label {
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Content area — container for all sections */
.editor-content-area {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Section — card styling */
.editor-section {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    margin-bottom: 0;
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.editor-section:hover {
    border-color: rgba(var(--accent-color-rgb), 0.25);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}
.editor-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.editor-section-number {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--text-on-accent);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-section-title-wrap {
    flex: 1;
    margin: 0;
}
.editor-section-title-wrap .form-input {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.3rem 0;
    width: 100%;
    transition: border-color 0.2s;
}
.editor-section-title-wrap .form-input:focus {
    border-bottom-color: var(--accent-color);
    outline: none;
    box-shadow: none;
}
.editor-section-title-wrap .form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Section body — content textarea */
.editor-section-body {
    margin-bottom: 1rem;
}
.editor-section-body .form-textarea {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}
.editor-section-body .form-textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.15);
}

/* CTA collapsible details */
.editor-cta-details {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
}
.editor-cta-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
    list-style: none;
}
.editor-cta-summary svg {
    opacity: 0.6;
}
.editor-cta-summary::-webkit-details-marker {
    display: none;
}
.editor-cta-summary::after {
    content: '';
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-secondary);
    transition: transform 0.2s;
}
.editor-cta-details[open] .editor-cta-summary::after {
    transform: rotate(180deg);
}
.editor-cta-summary:hover {
    color: var(--text-primary);
}
.editor-cta-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}
.editor-cta-fields label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: block;
}

/* Subsection — card with left accent */
.editor-subsection {
    margin-left: 0;
    padding: 1.25rem 1.25rem 1rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
    border-radius: 0 10px 10px 0;
    margin-bottom: 0.75rem;
    position: relative;
    background: var(--card-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.editor-subsection:hover {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}
.editor-subsection-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.editor-subsection-number {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(var(--accent-color-rgb), 0.15);
    color: var(--accent-color);
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.editor-subsection-title-wrap {
    flex: 1;
    margin: 0;
}
.editor-subsection-title-wrap .form-input {
    font-family: var(--font-headings);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.2rem 0;
    width: 100%;
    transition: border-color 0.2s;
}
.editor-subsection-title-wrap .form-input:focus {
    border-bottom-color: var(--accent-color);
    outline: none;
    box-shadow: none;
}
.editor-subsection-title-wrap .form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Subsection body */
.editor-subsection-body {
    margin-bottom: 0.75rem;
}
.editor-subsection-body .form-textarea {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.2s;
}
.editor-subsection-body .form-textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--accent-color-rgb), 0.15);
}

/* Subsection CTA details — smaller */
.editor-cta-details--sub .editor-cta-fields {
    grid-template-columns: 1fr 1fr;
}

/* Media collapsible panel — mirrors CTA details style */
.editor-media-details {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
}
.editor-media-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    background: var(--secondary-bg);
    list-style: none;
    transition: color 0.2s;
}
.editor-media-summary:hover {
    color: var(--text-primary);
}
.editor-media-summary svg {
    opacity: 0.6;
}
.editor-media-summary::-webkit-details-marker { display: none; }
.editor-media-summary::after {
    content: '';
    margin-left: auto;
    border: 4px solid transparent;
    border-top-color: var(--text-secondary);
    transition: transform 0.2s;
}
.editor-media-details[open] .editor-media-summary::after {
    transform: rotate(180deg);
}
.editor-media-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--accent-color);
    color: var(--text-on-accent);
    font-size: 0.7rem;
    font-weight: 700;
}
.editor-media-content {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}
.editor-media-heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.editor-media-heading::before {
    content: '';
    flex: 0 0 3px;
    height: 14px;
    border-radius: 2px;
    background: var(--accent-color);
}
.editor-media-heading:not(:first-child) {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}
.editor-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

/* ── Media card: existing image ── */
.editor-media-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.editor-media-item:hover {
    border-color: rgba(var(--accent-color-rgb), 0.4);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.editor-media-item--video {
    flex-direction: column;
}

/* Thumbnail area */
.editor-media-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border: none;
    border-radius: 0;
    display: block;
    background: var(--secondary-bg);
}

/* Delete row sits between thumb and fields */
.editor-media-delete {
    font-size: 0.75rem;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    background: rgba(192, 57, 43, 0.04);
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}
.editor-media-delete:hover {
    background: rgba(192, 57, 43, 0.1);
}
.editor-media-delete input[type="checkbox"] {
    accent-color: #c0392b;
}

/* Fields area */
.editor-media-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem;
}
.editor-media-fields input,
.editor-media-fields select {
    font-size: 0.85rem;
}

/* New upload card (no existing image) — dashed upload zone */
.editor-media-item:not(:has(.editor-media-thumb)) .editor-media-fields {
    padding: 1.25rem 0.85rem;
}
.editor-media-item:not(:has(.editor-media-thumb))::before {
    content: '';
    display: block;
    height: 80px;
    margin: 0.85rem 0.85rem 0;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--secondary-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") no-repeat center center;
}

/* Video URL display */
.editor-media-video-url {
    font-size: 0.8rem;
    color: var(--accent-color);
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    padding: 0.6rem 0.85rem;
    background: var(--secondary-bg);
    border-radius: 6px;
    margin: 0.5rem 0.85rem 0;
}
.editor-media-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Video cards use same card style */
.editor-media-item--video .editor-media-fields {
    padding: 0.85rem;
}
.editor-media-item--video:not(:has(.editor-media-video-url)) .editor-media-fields {
    padding: 1rem 0.85rem;
}

/* Subsection forms container */
.article-editor-form .subsection-forms {
    margin-top: 1.5rem;
    padding-top: 0;
    border-top: none;
}

/* Add section / subsection buttons */
.editor-add-section-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem;
    margin-top: 1rem;
    background: transparent;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-headings);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.editor-add-section-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(var(--accent-color-rgb), 0.05);
}
.editor-add-sub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.editor-add-sub-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Editor action bar */
.editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
    padding: 1.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
}

/* Override .section-card default padding for editor */
.article-editor-form .section-card {
    padding: 0;
    margin-bottom: 0;
}

/* Responsive editor */
@media (max-width: 768px) {
    .editor-article-header .form-input[name*="title"] {
        font-size: 1.6rem;
    }
    .editor-section-title-wrap .form-input {
        font-size: 1.4rem;
    }
    .editor-subsection-title-wrap .form-input {
        font-size: 1.15rem;
    }
    .editor-cover-preview {
        height: 200px;
        min-height: 150px;
    }
    .editor-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .editor-cta-fields {
        grid-template-columns: 1fr;
    }
    .editor-subsection {
        padding-left: 1rem;
    }
    .editor-section {
        padding: 1rem;
    }
    .editor-media-grid {
        grid-template-columns: 1fr;
    }
    .editor-media-thumb {
        height: 120px;
    }
    .editor-actions {
        flex-direction: column-reverse;
        padding: 1rem;
    }
    .editor-actions .cta-button,
    .editor-actions .secondary-cta {
        width: 100%;
        text-align: center;
    }
}

/* ======================================
   PARTNER TYPE BADGE
   ====================================== */
.partner-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    background: rgba(0, 200, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(0, 200, 255, 0.25);
}

/* ======================================
   RELATED SECTIONS (article detail)
   ====================================== */
.related-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.related-section h3 {
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Related news card */
.related-news-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, transform 0.2s;
}
.related-news-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.related-news-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.related-news-card-img-placeholder {
    background: linear-gradient(135deg, #0a0f18, #141c2b);
}
.related-news-card-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.related-news-card-category {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
}
.related-news-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
.related-news-card-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Related entity card (partners / ventures) */
.related-entity-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, transform 0.2s;
}
.related-entity-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.related-entity-logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    background: #0a0f18;
    flex-shrink: 0;
}
.related-entity-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid var(--border);
}
.related-entity-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.related-entity-name {
    font-size: 0.9rem;
    font-weight: 600;
}
.related-entity-oneliner {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Mentioned members row */
.related-members-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}
.related-member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 80px;
    text-align: center;
}
.related-member-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.related-member-avatar-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--card-bg);
    border: 2px solid var(--border);
}
.related-member-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}
.related-member-role {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

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