/* ==========================================================================
   Space Weather Dashboard Master - Visual Layer Override
   ========================================================================== */

:root {
    --bg-space-core: #060913;
    --bg-card-glass: rgba(13, 20, 38, 0.65);
    --border-glow: rgba(76, 198, 255, 0.12);
    --text-primary: #f3f4f6;
    --text-muted: #a0aec0;
    --accent-cyan: #4cc6ff;
    --accent-solar: #f97316;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Global Foundations */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-space-core);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(76, 198, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 100% 60%, rgba(249, 115, 22, 0.04) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Base Formats Override */
p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    text-align: left !important;
}

/* Structural Grid & Layout Wrappers */
.container_12, #container {
    max-width: 1300px !important;
    width: 95% !important;
    margin: 0 auto !important;
    padding: 2rem 0;
}

/* Dynamic Core Splitter */
#content {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 2rem !important;
    align-items: start;
    margin-top: 1.5rem;
}

/* Page Header Structure */
#pageheader {
    padding: 1.5rem 0 2.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#pageheader h1 {
    font-family: Georgia, serif;
    font-size: 2.25rem !important;
    font-weight: normal;
    color: #fff !important;
    text-shadow: none !important;
    margin: 0 0 0.5rem 0;
}

#pageheader h1 a {
    color: #fff !important;
    text-decoration: none !important;
}

#pageheader h1 span {
    display: block;
    font-size: 0.9rem !important;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Unlink Hidden Partner Logos Space */
#pageheader .topnav {
    display: none !important;
}

/* Left Sidebar Navigation Container */
#content .mainmenu {
    border-top: none !important;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Main Navigation Menu Rules */
#content .mainmenu h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
    font-weight: 700;
    opacity: 0.8;
}

/* Clean Sidebar Bullet Reset */
.sf-menu, .mainmenu ul {
    list-style: none !not() !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sf-menu li, .mainmenu ul li {
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sf-menu a, .mainmenu ul li a {
    display: block !important;
    padding: 0.75rem 1rem !important;
    color: var(--text-muted) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
}

.sf-menu a:hover, .mainmenu ul li a:hover,
.sf-menu li.selected a, .mainmenu ul li.selected a {
    background: rgba(76, 198, 255, 0.08) !important;
    color: #fff !important;
    border-color: var(--accent-cyan) !important;
    padding-left: 1.25rem !important;
}

/* Latest News Module Integration */
#news {
    background: rgba(249, 115, 22, 0.03) !important;
    border: 1px solid rgba(249, 115, 22, 0.15) !important;
    border-radius: 12px;
    padding: 1.25rem !important;
    margin-top: 1.5rem;
}

#news h2 {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: var(--accent-solar) !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin-bottom: 1rem !important;
    letter-spacing: 1px;
}

#news .scroller {
    width: 100% !important;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.4rem;
    scroll-behavior: smooth;
}

/* Modern Scrollbar Styling */
#news .scroller::-webkit-scrollbar {
    width: 6px;
}

#news .scroller::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

#news .scroller::-webkit-scrollbar-thumb {
    background: rgba(76, 198, 255, 0.45);
    border-radius: 10px;
}

#news .scroller::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 198, 255, 0.75);
}

#news .scroller ul {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#news .scroller ul li {
    height: auto !important;
    padding: 0 !important;
    font-size: 0.85rem !important;
    line-height: 1.5;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 1rem !important;
}

#news .scroller ul li:last-child {
    border-bottom: none;
    padding-bottom: 0 !important;
}

#news .scroller ul li a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

/* Main Core Layout Panels Container */
#content .mainarticle {
    border-top: none !important;
    padding: 0 !important;
}

#content .mainarticle .article {
    padding: 0 !important;
}

/* Main Welcome Heading */
#content .mainarticle h2 {
    font-family: Georgia, serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
    font-weight: normal;
}

/* Scientific Components Dashboard View */
.tblsplit, .article table {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin-top: 2rem;
}

.tblsplit,
.article table {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin-top: 2rem;
}

.tblsplit tr,
.article table tr {
    display: flex !important;
    width: 100% !important;
    gap: 1.5rem !important;
}

.tblsplit td,
.article table td {
    flex: 1 1 calc(50% - 1.5rem) !important;
    min-width: 340px !important;
}


/* Individual Interactive Data Cards */
.tblsplit tr td, .article table tr td {
    background: var(--bg-card-glass) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glow) !important;
    border-radius: 14px !important;
    padding: 1.5rem !important;
    width: auto !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tblsplit tr td:hover, .article table tr td:hover {
    border-color: rgba(76, 198, 255, 0.3) !important;
    transform: translateY(-2px);
}

/* Card Titles */
.tblsplit tr td h2, .article table tr td h2 {
    font-family: var(--font-sans) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-bottom: 1rem !important;
    text-align: left;
    line-height: 1.4;
}

/* Responsive Image Formats inside Data Modules */
.tblsplit tr td img, .article table tr td img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin-top: auto;
    border: 1px solid rgba(0, 0, 0, 0.5);
    background: #000;
}

/* Footer Element Configuration */
#pagefooter {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 2.5rem 0 !important;
    margin-top: 5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

#pagefooter a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.5rem;
}

#pagefooter a:hover {
    color: #fff;
}

/* Breakpoint Adaptation for Smaller Displays */
@media (max-width: 960px) {
    #content {
        grid-template-columns: 1fr !important;
    }
    .tblsplit, .article table {
        grid-template-columns: 1fr !important;
    }
}