:root {
    --herzing-gold: #C8A415;
    --herzing-gold-light: #E8CE5A;
    --herzing-blue: #003366;
    --herzing-blue-light: #004C99;
    --medical-white: #F8FAFB;
    --medical-light-blue: #E8F4FD;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 25px rgba(0,0,0,0.12);
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--medical-white);
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--herzing-blue) 0%, var(--herzing-blue-light) 100%);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--herzing-gold);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.navbar-brand img {
    height: 40px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 1.1rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    display: block;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(200,164,21,0.15);
    color: var(--herzing-gold);
}

.nav-auth {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-gold {
    background: var(--herzing-gold);
    color: var(--herzing-blue);
}

.btn-gold:hover {
    background: var(--herzing-gold-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    border-color: var(--herzing-gold);
    color: var(--herzing-gold);
}

.btn-blue {
    background: var(--herzing-blue);
    color: #fff;
}

.btn-blue:hover {
    background: var(--herzing-blue-light);
}

.btn-sm { padding: 5px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

.nav-profile-dropdown {
    position: relative;
}
.nav-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.nav-profile-icon:hover {
    background: var(--herzing-gold);
    color: var(--herzing-blue);
}
.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 140px;
    overflow: hidden;
    z-index: 1000;
}
.profile-dropdown-menu.open {
    display: block;
}
.profile-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--herzing-blue);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s;
}
.profile-dropdown-menu a:hover {
    background: #f0f0f0;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--herzing-blue) 0%, #001a33 100%);
    color: #fff;
    padding: 5rem 2rem;
    text-align: center;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(200, 164, 21, 0.3);
}

.hero h1 {
    font-size: 2.8rem;
    margin: 0 0 1rem;
    color: var(--herzing-gold);
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

.container-narrow {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card h3 {
    margin: 0 0 0.5rem;
    color: var(--herzing-blue);
}

.card p {
    color: var(--text-muted);
    margin: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Section headers */
.section-header {
    text-align: center;
    margin: 3rem 0 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--herzing-blue);
    margin: 0 0 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.gold-accent {
    width: 60px;
    height: 4px;
    background: var(--herzing-gold);
    border-radius: 2px;
    margin: 0.75rem auto 0;
}

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--herzing-blue) 0%, var(--herzing-blue-light) 100%);
    color: #fff;
    padding: 3rem 2rem;
    text-align: center;
}

.page-header h1 {
    margin: 0;
    font-size: 2.2rem;
}

.page-header p {
    opacity: 0.85;
    margin: 0.5rem 0 0;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--herzing-blue);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--herzing-blue);
}

/* Crispy forms integration */
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--herzing-blue);
    box-shadow: 0 0 0 3px rgba(0,51,102,0.1);
}

/* Messages / Alerts */
.messages {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 1rem 2rem;
    font-weight: 500;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.alert-info { background: var(--medical-light-blue); color: var(--herzing-blue); border: 1px solid #b8daff; }

/* RSVP badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-going { background: #d4edda; color: #155724; }
.badge-maybe { background: #fff3cd; color: #856404; }
.badge-pending { background: var(--medical-light-blue); color: var(--herzing-blue); }
.badge-approved { background: #d4edda; color: #155724; }
.badge-denied { background: #f8d7da; color: #721c24; }
.badge-gold { background: var(--herzing-gold); color: var(--herzing-blue); }

/* ========================================
   Forum — Design A: Sidebar + Feed Layout
   ======================================== */

/* Full-page grid: sidebar + main */
.forum-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    min-height: calc(100vh - 64px);
}

/* --- Sidebar --- */
.forum-sidebar {
    background: linear-gradient(180deg, var(--herzing-blue) 0%, #001a33 100%);
    color: #fff;
    padding: 1.5rem 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.forum-sidebar-header {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0.75rem;
}

.forum-sidebar-header h2 {
    font-size: 1.1rem;
    color: var(--herzing-gold);
    margin: 0;
}

.forum-sidebar-header p {
    font-size: 0.75rem;
    opacity: 0.6;
    margin: 2px 0 0;
}

.forum-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.forum-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 1.25rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.forum-sidebar-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.forum-sidebar-link.active {
    background: rgba(200,164,21,0.15);
    color: var(--herzing-gold);
    border-left-color: var(--herzing-gold);
}

.fs-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    font-weight: 700;
    opacity: 0.6;
}

.fs-badge {
    margin-left: auto;
    background: var(--herzing-gold);
    color: var(--herzing-blue);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* --- Main content area --- */
.forum-main {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.forum-topbar {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forum-topbar h3 {
    font-size: 1.1rem;
    color: var(--herzing-blue);
    margin: 0;
}

.forum-search {
    padding: 6px 14px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    width: 220px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.forum-search:focus {
    border-color: var(--herzing-blue);
}

.forum-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
}

.forum-breadcrumb:hover {
    color: var(--herzing-blue);
}

/* --- Feed area --- */
.forum-feed {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
}

/* --- Thread row (the main repeating unit) --- */
.forum-thread {
    display: flex;
    gap: 14px;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f2f5;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s;
}

.forum-thread:last-child {
    border-bottom: none;
}

.forum-thread:hover {
    background: var(--medical-white);
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Avatar (rounded square like Slack) */
.forum-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.fav-blue { background: linear-gradient(135deg, var(--herzing-blue), var(--herzing-blue-light)); }
.fav-gold { background: linear-gradient(135deg, var(--herzing-gold), #d4b82a); color: var(--herzing-blue); }
.fav-teal { background: linear-gradient(135deg, #0d9488, #14b8a6); }

/* Thread body text */
.forum-thread-body {
    flex: 1;
    min-width: 0;
}

.forum-thread-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.forum-thread-top strong {
    color: var(--herzing-blue);
    font-size: 0.9rem;
}

.forum-thread-top time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.forum-tag-pin {
    color: var(--herzing-gold);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(200,164,21,0.12);
    padding: 2px 8px;
    border-radius: 4px;
}

.forum-tag-lock {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(108,117,125,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.forum-thread-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.forum-thread:hover .forum-thread-title {
    color: var(--herzing-blue);
}

.forum-thread-snippet {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-thread-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.forum-thread-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Thread detail: individual posts --- */
.forum-post {
    display: flex;
    gap: 14px;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f2f5;
}

.forum-post:last-child {
    border-bottom: none;
}

.forum-post-body {
    flex: 1;
    min-width: 0;
}

.forum-post-text {
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.forum-post-text p {
    margin: 0 0 0.75rem;
}

.forum-post-text p:last-child {
    margin-bottom: 0;
}

.forum-author-link {
    color: var(--herzing-blue);
    text-decoration: none;
}

.forum-author-link:hover {
    color: var(--herzing-gold);
}

/* --- Reply box --- */
.forum-reply-box {
    padding: 1.5rem 0;
    border-top: 2px solid var(--border-color);
    margin-top: 0.5rem;
}

.forum-reply-box h4 {
    margin: 0 0 0.75rem;
    color: var(--herzing-blue);
    font-size: 1rem;
}

/* --- Create thread form --- */
.forum-create-form {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
}

/* --- Empty state --- */
.forum-empty {
    text-align: center;
    padding: 3rem 2rem;
}

.forum-empty h3 {
    color: var(--herzing-blue);
    margin-bottom: 0.5rem;
}

/* --- Forum mobile --- */
@media (max-width: 768px) {
    .forum-layout {
        grid-template-columns: 1fr;
    }

    .forum-sidebar {
        position: static;
        height: auto;
        padding: 1rem 0;
    }

    .forum-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 1rem;
        gap: 4px;
    }

    .forum-sidebar-link {
        white-space: nowrap;
        border-left: none;
        border-radius: 20px;
        padding: 6px 14px;
        font-size: 0.82rem;
    }

    .forum-sidebar-link.active {
        border-left-color: transparent;
        background: var(--herzing-gold);
        color: var(--herzing-blue);
    }

    .fs-badge { display: none; }

    .forum-search { width: 140px; }

    .forum-thread:hover {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Social Feed */
.post-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--medical-light-blue);
}

.post-body {
    padding: 1rem 1.5rem;
}

.post-body img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.75rem;
}

.post-actions {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
}

.post-actions a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-actions a:hover { color: var(--herzing-blue); }

.comment-section {
    background: var(--medical-white);
    padding: 1rem 1.5rem;
}

.comment {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child { border-bottom: none; }

/* Avatar placeholder */
.avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--herzing-blue), var(--herzing-blue-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

/* Member grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
}

.member-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

/* Resource cards */
.resource-section { margin-bottom: 2.5rem; }

.resource-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

/* Event calendar style */
.event-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.2s;
}

.event-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.event-date-badge {
    background: var(--herzing-blue);
    color: var(--herzing-gold);
    text-align: center;
    padding: 0.75rem;
    min-width: 80px;
}

.event-date-badge .month { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }
.event-date-badge .day { font-size: 1.8rem; font-weight: 700; line-height: 1; }

/* Pricing / Membership */
.plan-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
}

.plan-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.plan-card.featured {
    border: 3px solid var(--herzing-gold);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--herzing-blue);
}

.plan-price span { font-size: 1rem; color: var(--text-muted); }

/* Payment form (placeholder) */
.payment-container {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto;
}

.payment-field {
    background: var(--medical-white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Leadership */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.leader-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
}

.leader-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--herzing-gold);
    margin-bottom: 1rem;
}

/* Hide footer when forum layout is present */
.forum-layout ~ .footer,
.forum-layout + .footer { display: none; }

/* Footer */
.footer {
    background: var(--herzing-blue);
    color: rgba(255,255,255,0.8);
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer h4 {
    color: var(--herzing-gold);
    margin: 0 0 1rem;
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: block;
    padding: 3px 0;
}

.footer a:hover { color: var(--herzing-gold); }

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* NSNA badge */
.nsna-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--medical-light-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--herzing-blue);
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Mobile hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .hamburger { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--herzing-blue);
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    .nav-links.open { display: flex; }

    .nav-auth {
        display: none;
        position: absolute;
        top: 64px;
        right: 0;
        background: var(--herzing-blue);
        flex-direction: column;
        padding: 1rem;
    }

    .hero h1 { font-size: 2rem; }
    .hero { padding: 3rem 1.5rem; }
    .card-grid { grid-template-columns: 1fr; }
    .member-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .footer-content { grid-template-columns: 1fr; }
}
