/* ==========================================================================
   1. BRANDING & ROOT VARIABLES (UPDATED TO MATCH TOURSCAM.ORG LOGO)
   ========================================================================== */
:root {
    --brand-navy: #0a3b66;         /* Primary Brand / Shield Blue */
    --brand-navy-dark: #06233d;    /* Deep Backgrounds & Dark Elements */
    --brand-orange: #ff5500;      /* Primary Accent / Warning Slash */
    --brand-orange-dark: #cc4400; /* Hover State for Buttons */
    --brand-light-bg: #f4f7f9;    /* Scrolled Header, Cards & Backgrounds */
    --brand-white: #ffffff;
    --brand-gray: #4a5568;        /* Body & Subtitle Text */

    --container: 1400px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.25);

    --font-primary: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--brand-navy-dark);
    color: var(--brand-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.container {
    width: 100%;
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

/* ==========================================================================
   2. HEADER & TOP BAR
   ========================================================================== */
.site-header {
   
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.top-bar {
    background-color: var(--brand-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.825rem;
    padding: 8px 0;
    position: relative;
    z-index: 20;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-info-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-white);
    font-weight: 600;
}

.top-info-item:hover {
    color: var(--brand-orange);
}

.main-nav-bar {
    position: relative;
    padding: 0;
    background-color: transparent;
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 70px;
}

.logo-link {
    position: relative;
    display: block;
    width: 280px;
    align-self: flex-start;
    z-index: 1002;
}

.logo-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    padding: 12px 20px 18px 20px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid transparent;
    border-top: none;
    box-shadow: none;
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.site-logo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--brand-white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--brand-orange);
}

.site-header.scrolled .main-nav-bar {
    background-color: var(--brand-navy);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-sm);
}

.site-header.scrolled .logo-card {
    background-color: var(--brand-navy);
    box-shadow: var(--shadow-sm);
}

.site-header.scrolled .nav-links a {
    color: var(--brand-white);
}

.site-header.scrolled .nav-links a:hover {
    color: var(--brand-orange);
}

/* Navigation CTA Button Visibility */
.mobile-only-cta { display: none; }
.header-cta-desktop { display: inline-flex; }

/* ==========================================================================
   3. BUTTONS & UI ELEMENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-orange, .btn-earth {
    background-color: var(--brand-orange);
    color: var(--brand-white);
}

.btn-orange:hover, .btn-earth:hover {
    background-color: var(--brand-orange-dark);
    color: var(--brand-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background-color: rgba(10, 59, 102, 0.4);
    border: 1px solid var(--brand-white);
    color: var(--brand-white);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: var(--brand-white);
    color: var(--brand-navy-dark);
}

/* ==========================================================================
   4. FORUM PAGE (CONSOLIDATED INLINE STYLES)
   ========================================================================== */
.forum-page {
    width: 100%;
    min-height: 70vh;
    padding-top: 110px;
    padding-bottom: 70px;
    background-color: var(--brand-navy-dark);
}

.forum-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(rgba(6, 35, 61, 0.92), rgba(6, 35, 61, 0.97));
    padding: 65px 0 85px;
}

.forum-hero-inner {
    width: 90%;
    max-width: var(--container);
    margin: 0 auto;
    text-align: center;
}

.forum-badge {
    display: block;
    margin-bottom: 12px;
    color: var(--brand-orange);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.forum-hero h1 {
    margin: 0 0 12px;
    color: var(--brand-white);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
}

.forum-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: #cbd5e1;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.7;
}

/* Forum Search */
.forum-search-wrapper {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: -30px auto 45px;
    z-index: 20;
}

.forum-search {
    display: flex;
    align-items: center;
    min-height: 58px;
    background-color: var(--brand-navy);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.forum-search-icon {
    width: 54px;
    min-width: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-orange);
}

#forumSearch {
    flex: 1;
    min-width: 0;
    height: 58px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--brand-white);
    padding: 0 10px;
    font-family: inherit;
    font-size: 0.95rem;
}

#forumSearch::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.forum-search-button {
    align-self: stretch;
    border: none;
    background-color: var(--brand-orange);
    color: var(--brand-white);
    padding: 0 25px;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.forum-search-button:hover {
    background-color: var(--brand-orange-dark);
}

.forum-search-results {
    position: absolute;
    left: 0; right: 0;
    top: calc(100% + 8px);
    display: none;
    background-color: var(--brand-navy);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.forum-search-result {
    display: block;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    text-decoration: none;
}

.forum-search-result:last-child { border-bottom: none; }
.forum-search-result:hover { background: rgba(255, 255, 255, 0.05); }

.forum-search-result-title {
    margin-bottom: 5px;
    color: var(--brand-white);
    font-weight: 700;
    font-size: 0.9rem;
}

.forum-search-result-meta {
    color: #cbd5e1;
    opacity: 0.6;
    font-size: 0.76rem;
}

/* Forum Grid Layout */
.forum-container {
    width: 90%;
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    align-items: start;
}

.forum-main { min-width: 0; }

.forum-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.forum-section-title {
    margin: 0;
    color: var(--brand-white);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.forum-section-subtitle {
    display: block;
    margin-top: 5px;
    color: #cbd5e1;
    opacity: 0.62;
    font-size: 0.82rem;
}

/* Topic List */
.forum-topic-list {
    width: 100%;
    background: rgba(10, 59, 102, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.forum-topic {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 95px 170px;
    gap: 20px;
    padding: 20px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.forum-topic:last-child { border-bottom: none; }
.forum-topic:hover { background: rgba(255, 255, 255, 0.035); }
.forum-topic-main { min-width: 0; }

.forum-topic-title {
    margin: 0 0 7px;
    font-size: 1rem;
    line-height: 1.4;
}

.forum-topic-title a {
    color: var(--brand-white);
    text-decoration: none;
}

.forum-topic-title a:hover { color: var(--brand-orange); }

.forum-topic-excerpt {
    margin: 0;
    color: #cbd5e1;
    opacity: 0.75;
    font-size: 0.82rem;
    line-height: 1.5;
}

.forum-topic-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: #cbd5e1;
    opacity: 0.75;
    font-size: 0.73rem;
}

.forum-topic-meta span { display: inline-flex; align-items: center; gap: 5px; }
.forum-topic-meta i { color: var(--brand-orange); }

.forum-topic-replies {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #cbd5e1;
    font-size: 0.82rem;
}

.forum-topic-replies strong {
    display: block;
    margin-bottom: 3px;
    color: var(--brand-white);
    font-size: 1rem;
}

.forum-topic-replies span {
    display: block;
    color: #cbd5e1;
    opacity: 0.55;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.forum-topic-activity {
    color: #cbd5e1;
    font-size: 0.78rem;
    line-height: 1.5;
}

.forum-topic-activity strong {
    display: block;
    margin-bottom: 3px;
    color: var(--brand-white);
}

.forum-topic-activity span {
    color: #cbd5e1;
    opacity: 0.55;
}

/* Sidebar */
.forum-sidebar {
    position: sticky;
    top: 105px;
    min-width: 0;
}

.forum-sidebar-card {
    margin-bottom: 20px;
    padding: 24px;
    background: rgba(10, 59, 102, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-sm);
}

.forum-sidebar-title {
    margin: 0 0 15px;
    color: var(--brand-white);
    font-size: 1rem;
    font-weight: 800;
}

.forum-sidebar-card p {
    margin: 0 0 18px;
    color: #cbd5e1;
    opacity: 0.8;
    font-size: 0.82rem;
    line-height: 1.65;
}

.forum-sidebar-links {
    list-style: none;
    padding: 0; margin: 0;
}

.forum-sidebar-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.forum-sidebar-links li:last-child { border-bottom: none; }

.forum-sidebar-links a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 0;
    color: #cbd5e1;
    font-size: 0.82rem;
}

.forum-sidebar-links a:hover { color: var(--brand-orange); }
.forum-sidebar-links i { width: 18px; color: var(--brand-orange); text-align: center; }

/* New Topic CTA */
.forum-new-topic {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 13px;
    background-color: var(--brand-orange);
    color: var(--brand-white);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: var(--transition);
}

.forum-new-topic:hover {
    background-color: var(--brand-orange-dark);
    color: var(--brand-white);
    transform: translateY(-2px);
}

/* Empty State */
.forum-empty {
    padding: 70px 25px;
    text-align: center;
    color: #cbd5e1;
}

.forum-empty i {
    display: block;
    margin-bottom: 15px;
    color: var(--brand-orange);
    font-size: 2.5rem;
}

.forum-empty h3 { margin-bottom: 8px; color: var(--brand-white); }
.forum-empty p { color: #cbd5e1; opacity: 0.7; }

/* Pagination */
.forum-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.forum-page-link {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    background: rgba(10, 59, 102, 0.40);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
}

.forum-page-link:hover,
.forum-page-link.active {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
    color: var(--brand-white);
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--brand-navy-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 60px 0 30px;
    font-size: 0.9rem;
    position: relative;
    z-index: 3;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: var(--brand-white); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #cbd5e1; opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--brand-orange); }

/* ==========================================================================
   6. RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1000px) {
    .forum-container { grid-template-columns: 1fr; }
    .forum-sidebar { position: static; }
}

@media (max-width: 700px) {
    .forum-page { padding-top: 95px; padding-bottom: 50px; }
    .forum-hero { padding: 45px 0 70px; }
    .forum-hero-inner { width: 92%; }
    .forum-hero h1 { font-size: 2.1rem; }
    .forum-hero p { font-size: 0.92rem; line-height: 1.65; }
    .forum-search-wrapper { width: 92%; margin: -25px auto 35px; }
    .forum-search { min-height: 54px; }
    #forumSearch { height: 54px; padding: 0 8px; font-size: 0.85rem; }
    .forum-search-icon { width: 45px; min-width: 45px; }
    .forum-search-button { padding: 0 15px; font-size: 0.72rem; }
    .forum-container { width: 92%; display: block; }
    .forum-section-header { display: block; margin-bottom: 12px; }
    .forum-section-subtitle { margin-top: 5px; }
    .forum-topic { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
    .forum-topic-replies { justify-content: flex-start; text-align: left; }
    .forum-topic-replies strong, .forum-topic-replies span { display: inline; }
    .forum-topic-replies strong { margin-right: 5px; margin-bottom: 0; }
    .forum-topic-activity { display: none; }
    .forum-sidebar { margin-top: 30px; }
    .forum-sidebar-card { padding: 20px; }
}

@media (max-width: 420px) {
    .forum-page { padding-top: 90px; }
    .forum-hero { padding: 40px 0 65px; }
    .forum-hero h1 { font-size: 1.85rem; }
    .forum-search-wrapper { width: 94%; margin: -22px auto 30px; }
    .forum-search-button { padding: 0 12px; }
    .forum-topic { padding: 16px; }
}