/* ============================================= */
/* Google Fonts — Bronze Squadron Font Doctrine  */
/* ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Barlow+Condensed:wght@400;500;600;700&family=Oswald:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Fira+Code:wght@400;500;600;700&family=Cascadia+Code:wght@400;500;600;700&family=Black+Ops+One&family=Quantico:wght@400;700&display=swap');

/* ============================================= */
/* Night Ops Base + Navy Steel + Glow System     */
/* ============================================= */
:root {
    /* Night Ops Base */
    --bs-ops-black: #0a0e17;
    --bs-surface-ground: #060a12;
    --bs-surface-base: #0f1520;
    --bs-surface-raised: #151d2b;
    --bs-surface-elevated: #1a2436;
    --bs-surface-overlay: #1f2b40;

    /* Navy Steel (DEVGRU Heritage) */
    --bs-navy-50:  #e8edf5;
    --bs-navy-100: #c4cfe0;
    --bs-navy-200: #9bafc9;
    --bs-navy-300: #6e8cad;
    --bs-navy-400: #476a91;
    --bs-navy-500: #1e3a5f;
    --bs-navy-600: #182f4d;
    --bs-navy-700: #12243b;
    --bs-navy-800: #0d1a2a;
    --bs-navy-900: #08101b;

    /* Glow System */
    --bs-glow-bronze: 0 0 20px rgba(201,145,58,0.15);
    --bs-glow-bronze-strong: 0 0 30px rgba(201,145,58,0.25);
    --bs-glow-blue: 0 0 20px rgba(37,99,235,0.15);

    /* Shadow Scale */
    --bs-shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --bs-shadow-md: 0 4px 10px rgba(0,0,0,0.45);
    --bs-shadow-lg: 0 8px 20px rgba(0,0,0,0.55);
    --bs-shadow-xl: 0 12px 28px rgba(0,0,0,0.65);

    /* Breakpoint Tokens */
    --bs-bp-mobile: 640px;
    --bs-bp-tablet: 1024px;
    --bs-bp-desktop: 1440px;
    --bs-bp-wide: 1920px;
    --bs-bp-ultrawide: 2560px;
    --bs-bp-superwide: 2561px;

    /* Animation Tokens */
    --bs-transition-fast: 120ms ease;
    --bs-transition-base: 200ms ease;
    --bs-transition-slow: 350ms ease;
    --bs-transition-smooth: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================= */
/* Keyframe Animations                           */
/* ============================================= */
@keyframes bs-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes bs-fade-in {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes bs-glow-pulse {
    0% { box-shadow: var(--bs-glow-bronze); }
    50% { box-shadow: var(--bs-glow-bronze-strong); }
    100% { box-shadow: var(--bs-glow-bronze); }
}

/* ============================================= */
/* Global Font Stacks                            */
/* ============================================= */
body, html {
    font-family: Inter, "Segoe UI", system-ui, -apple-system !important;
    background-image: url('https://www.bronzesquadron.com/storage/resources/tarmakback-69dd1402c2efc.png') !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: #E8DCC2 !important;
}

/* Remove global transitions (fixes gray flash) */
body, html {
    transition: none !important;
}

/* Overlay — Night Ops v2 darker */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 14, 0.70);
    z-index: -1;
}

/* ============================================= */
/* Typography                                    */
/* ============================================= */
h1, h2, h3, h4, h5, h6,
header a,
header .navbar-brand,
header .nav-link,
.card-title,
.forum-group-header,
div.card > h3,
.forum-list > div > .card-title,
.forum-name {
    font-family: Rajdhani, "Barlow Condensed", Oswald, system-ui !important;
}

/* Page / forum titles — military-manual emphasis */
.forum-name,
.page-title {
    font-size: 3rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase;
    color: #f8fafc !important;
}

/* ============================================= */
/* Utility Classes (SAFE SCOPED VERSION)         */
/* ============================================= */

/* Text Alignment */
.bs-text-left { text-align: left !important; }
.bs-text-center { text-align: center !important; }
.bs-text-right { text-align: right !important; }

/* Text Colors */
.bs-text-bronze { color: #c9913a !important; }
.bs-text-muted { color: #64748b !important; }
.bs-text-success { color: #22c55e !important; }
.bs-text-danger { color: #ef4444 !important; }
.bs-text-info { color: #3b82f6 !important; }

/* Background Utilities (NO ATTRIBUTE SELECTORS) */
.bs-bg-base { background-color: var(--bs-surface-base) !important; }
.bs-bg-raised { background-color: var(--bs-surface-raised) !important; }
.bs-bg-elevated { background-color: var(--bs-surface-elevated) !important; }
.bs-bg-bronze-subtle { background-color: rgba(201,145,58,0.08) !important; }

/* Borders */
.bs-border { border: 1px solid #1e293b !important; }
.bs-border-bronze { border: 1px solid rgba(201,145,58,0.3) !important; }
.bs-border-none { border: none !important; }

/* Border Radius */
.bs-rounded { border-radius: 6px !important; }
.bs-rounded-lg { border-radius: 12px !important; }
.bs-rounded-full { border-radius: 9999px !important; }

/* Spacing Utilities */
.bs-mt-1 { margin-top: 4px !important; }
.bs-mt-2 { margin-top: 8px !important; }
.bs-mt-3 { margin-top: 12px !important; }
.bs-mt-4 { margin-top: 16px !important; }
.bs-mt-6 { margin-top: 24px !important; }
.bs-mt-8 { margin-top: 32px !important; }
.bs-mt-10 { margin-top: 40px !important; }
.bs-mt-12 { margin-top: 48px !important; }
.bs-mt-16 { margin-top: 64px !important; }

.bs-p-1 { padding: 4px !important; }
.bs-p-2 { padding: 8px !important; }
.bs-p-3 { padding: 12px !important; }
.bs-p-4 { padding: 16px !important; }
.bs-p-6 { padding: 24px !important; }
.bs-p-8 { padding: 32px !important; }
.bs-p-10 { padding: 40px !important; }
.bs-p-12 { padding: 48px !important; }
.bs-p-16 { padding: 64px !important; }

/* Display */
.bs-flex { display: flex !important; }
.bs-grid { display: grid !important; }
.bs-block { display: block !important; }
.bs-inline-flex { display: inline-flex !important; }
.bs-hidden { display: none !important; }

/* Width */
.bs-w-full { width: 100% !important; }
.bs-max-w-content { max-width: 1200px !important; }
.bs-max-w-wide { max-width: 1440px !important; }

/* Gap */
.bs-gap-1 { gap: 4px !important; }
.bs-gap-2 { gap: 8px !important; }
.bs-gap-4 { gap: 16px !important; }
.bs-gap-6 { gap: 24px !important; }
.bs-gap-8 { gap: 32px !important; }

/* Accessibility */
.bs-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ============================================= */
/* Header (opaque, unchanged structurally)       */
/* ============================================= */
header {
    background-color: var(--bs-surface-base) !important;
    background-image: linear-gradient(to bottom,
        rgba(18, 36, 59, 0.85),
        rgba(8, 16, 27, 0.95)
    ) !important;
    border-bottom: 3px solid rgba(205, 127, 50, 0.6);
    padding: 14px 0;
    box-shadow: var(--bs-shadow-lg);
}

/* ============================================= */
/* Buttons                                       */
/* ============================================= */
.btn-primary,
.home-page .box a {
    transition: var(--bs-transition-base);
}

.btn-primary:hover,
.home-page .box a:hover {
    animation: bs-glow-pulse 3s infinite;
}

/* ============================================= */
/* Cards — Night Ops v2 Deep Glass (NO BLUR)     */
/* ============================================= */
/* NOTE: backdrop-filter removed to avoid stacking contexts */
.card,
.forum-list .card,
.box:not(.home-page .box) {
    background: rgba(14, 22, 35, 0.45) !important; /* deep glass */
    /* remove blur/backdrop-filter to avoid stacking context creation */
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    /* simulate glass depth with subtle gradient */
    background-image: linear-gradient(rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    border-left: 4px solid rgba(30, 58, 95, 0.65) !important; /* navy steel */
    box-shadow: 0 4px 14px rgba(0,0,0,0.55);
    transition: var(--bs-transition-base);
}

.card:hover {
    background: rgba(18, 28, 45, 0.65) !important;
    animation: bs-glow-pulse 3s infinite;
}

/* Group Headers — military-manual strong blocks */
.card-title,
.forum-group-header,
div.card > h3,
.forum-list > div > .card-title {
    background: rgba(10, 16, 25, 0.90) !important;
    border-bottom: 4px solid #CD7F32 !important;
    border-left: 6px solid #1F4E79 !important;
    box-shadow: var(--bs-shadow-sm);
    padding: 14px 18px !important;
    font-size: 2.1rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.10em !important;
    text-transform: uppercase;
}

/* ============================================= */
/* Forum Thread Hierarchy                        */
/* ============================================= */

/* Thread titles */
.thread-title a,
.forum-list .card .card-title a {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    color: #e2e8f0 !important;
}

.thread-title a::before {
    content: "•";
    color: #ef4444;
    margin-right: 10px;
    font-size: 1.3rem;
    opacity: 0.9;
}

/* Thread meta */
.thread-meta,
.thread-list .thread-meta a {
    font-size: 0.95rem !important;
    opacity: 0.65 !important;
    color: #94a3b8 !important;
    border-left: 2px solid rgba(255,255,255,0.10);
    padding-left: 10px !important;
}

/* Sub-threads */
.thread-list .sub-thread a {
    font-size: 0.9rem !important;
    opacity: 0.55 !important;
    color: #7b8aa5 !important;
    margin-left: 12px !important;
}

.thread-list .sub-thread a::before {
    content: "↳";
    margin-right: 8px;
    color: #64748b;
    opacity: 0.6;
}

/* ============================================= */
/* Sidebar — Night Ops Glass (NO BLUR)           */
/* ============================================= */
#bs-forum-sidebar .bs-card {
    background: rgba(14, 22, 35, 0.45) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    /* subtle gradient to simulate depth */
    background-image: linear-gradient(rgba(255,255,255,0.02), rgba(0,0,0,0.02));
    border: 1px solid rgba(30, 58, 95, 0.45) !important;
    transition: var(--bs-transition-base);
}

#bs-forum-sidebar .bs-card:hover {
    animation: bs-glow-pulse 3s infinite;
}

/* ============================================= */
/* Footer                                        */
/* ============================================= */
footer,
.footer-banner,
.bottom-banner {
    background-color: var(--bs-surface-ground) !important;
    background-image: linear-gradient(to bottom,
        rgba(6, 10, 18, 0.85),
        rgba(6, 10, 18, 0.95)
    ) !important;
    border-top: 3px solid rgba(205, 127, 50, 0.6);
    box-shadow: var(--bs-shadow-sm);
}

/* ============================================= */
/* Small dropdown styling (native positioning)   */
/* ============================================= */
header .dropdown-menu,
.navbar .dropdown-menu {
    position: absolute !important;
    z-index: 99999 !important;
}

/* Accessibility focus outlines */
a:focus, button:focus, [role="menuitem"]:focus {
    outline: 2px solid rgba(201,145,58,0.35);
    outline-offset: 2px;
}

/* ============================================= */
/* Responsive Scaling (placeholder comment)      */
/* ============================================= */
/* Your full responsive system remains intact in Forumify’s base CSS */