/* 1. Color Variables */
:root {
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #334155;
    --text-header: #0f172a;
    --accent: #3b82f6;
    --border: #e2e8f0;
    --header-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --nav-link: #94a3b8;
}

/* Dark Mode Variable Overrides */
body.dark-mode {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --text-main: #cbd5e1;
    --text-header: #f8fafc;
    --accent: #60a5fa;
    --border: #334155;
    --header-gradient: linear-gradient(135deg, #020617 0%, #0f172a 100%);
    --nav-link: #64748b;
}

/* 2. Global Styles & Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- 3. Dynamic Dashboard Header --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--header-gradient);
    padding: 30px 0; /* Large initial state */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- 4. Frosted Glass State (Triggered on Scroll) --- */
.main-header.scrolled {
    padding: 10px 0; /* Condensed state */
    background: rgba(15, 23, 42, 0.85); /* Translucent Pro-Blue */
    backdrop-filter: blur(12px); /* Frosted Glass Effect */
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid var(--accent);
}

.header-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- 5. Branding: Triple-Size Logo & Centered Title --- */
.branding-row {
    display: flex;
    align-items: center; /* Vertically centers site name to logo */
    gap: 0; /* Removes awkward spacing */
    margin-bottom: 15px; 
    transition: transform 0.4s ease;
}

.main-header.scrolled .branding-row {
    transform: scale(0.9); /* Subtle shrink on scroll */
    margin-bottom: 5px;
}

.dynamic-logo {
    height: 90px; /* Triple the 30px font size */
    width: auto;
    transition: height 0.4s ease;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.2));
}

.main-header.scrolled .dynamic-logo {
    height: 55px; /* Condensed logo height */
}

.dynamic-title {
    font-size: 30px; /* Professional size, not "weak" */
    font-weight: 800;
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1; /* Keeps text flush to logo */
}

/* --- 6. Tucked Navigation: Spaced & Clickable --- */
.main-nav {
    display: flex;
    gap: 30px; /* Appropriate spacing for usability */
    align-items: center;
    padding-left: 5px; /* Aligns with branding start */
}

.main-nav a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--nav-link);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent);
}

/* Ensures the theme button stays tucked but accessible */
#theme-toggle {
    margin-left: auto; /* Pushes to the right of the nav bar */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* 4. Main Content & Post Cards */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.post-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-list li {
    background: var(--bg-card);
    border-radius: 16px; 
    padding: 30px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    background: var(--accent); 
}

.post-list h3 {
    font-size: 1.5rem;
    color: var(--text-header);
    margin-bottom: 8px;
}

.post-date {
    display: block;
    color: var(--accent);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-list a {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.2s;
}

.post-list a:hover {
    background: var(--accent);
    color: white;
}

/* 5. Theme Toggle */
#theme-toggle {
    cursor: pointer;
    background: var(--text-main);
    color: var(--bg-main);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

#theme-toggle:active {
    transform: scale(0.95);
}

/* 6. About Page Carousel - Updated to stop zooming */
.about-carousel {
    margin: 20px 0;
}

.carousel-container {
    display: flex;
    overflow-x: auto;      
    scroll-snap-type: x mandatory; 
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: none; 
}

.carousel-container::-webkit-scrollbar {
    display: none; 
}

.carousel-slide {
    flex: 0 0 85%;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    /* These three lines help frame your photos without zooming */
    background-color: #000; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 350px; 
    /* This ensures the whole photo fits inside the frame */
    object-fit: contain; 
}

/* Styles for the new post images */
.post-thumbnail {
    width: 100%;
    max-width: 450px; /* Limits the size so it doesn't take over the page */
    height: auto;
    border-radius: 10px;
    margin: 15px 0;
    display: block;
    border: 1px solid #ddd; /* Adds a clean border to define the image edges */
}

/* This targets ONLY the image in the post list, protecting your header logo */
.post-list .post-item img.post-thumbnail {
    width: 300px !important; 
    height: auto !important;
    display: block;
    margin: 15px 0;
    border-radius: 8px;
}

/* Post 5 Article Styling */
.full-post {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin-bottom: 50px;
}

.perspective-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(15, 23, 42, 0.05) 100%);
    padding: 25px;
    border-left: 5px solid var(--accent);
    border-radius: 8px;
    margin: 30px 0;
}

.source-list {
    list-style: none;
    padding: 0;
    font-size: 0.9rem;
}

.source-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.source-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* 9. Typography Spacing & Vertical Rhythm */

/* Space out the main titles on article pages */
.full-post h1 {
    margin-bottom: 24px;
    line-height: 1.2;
}

/* Space between section headers and paragraphs */
.post-section h2, 
.post-section h3 {
    margin-top: 35px;    /* Space above the header to separate from previous section */
    margin-bottom: 15px; /* Space below the header before the text starts */
    color: var(--text-header);
}

/* Add breathing room between paragraphs */
.post-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7; /* Improves readability for long-form content */
}

/* Space inside the homepage cards specifically */
.post-item h3 {
    margin-top: 10px;
    margin-bottom: 12px;
}

.post-item p {
    margin-bottom: 15px;
}

/* --- Capstone Research Post Styles --- */
html { scroll-behavior: smooth; }

.capstone-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.jump-menu {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    margin: 40px 0;
    border-left: 5px solid #00d4ff;
}

.jump-menu h3 { 
    margin-top: 0; 
    color: #00d4ff; 
    font-family: 'Courier New', Courier, monospace; 
    letter-spacing: 1px;
}

.jump-menu ul { 
    list-style: none; 
    padding: 0; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
}

.jump-menu a { 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 0.85em;
    transition: all 0.3s ease;
}

.jump-menu a:hover { 
    color: #00d4ff; 
    padding-left: 5px;
}

.post-section { 
    margin-bottom: 80px; 
    line-height: 1.7;
}

.post-section h2 {
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.5em;
}

.post-section h3 {
    color: #e0e0e0;
    margin-top: 30px;
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin: 25px 0;
    border: 1px solid #333;
}

.perspective-box {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid #00d4ff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 60px;
}

.perspective-box h2 {
    color: #00d4ff;
    margin-top: 0;
}

.source-list {
    margin-top: 100px;
    padding-top: 40px;
    border-top: 1px solid #444;
    font-size: 0.9em;
    color: #bbb;
}

.source-list h2 { color: #fff; margin-bottom: 30px; }
.source-list h3 { color: #00d4ff; font-size: 1em; margin-top: 30px; text-transform: uppercase; }
.source-list ul { list-style: none; padding: 0; }
.source-list li { margin-bottom: 15px; line-height: 1.5; }
.source-list a { color: #00d4ff; text-decoration: none; word-break: break-all; }
.source-list a:hover { text-decoration: underline; }

/* --- Source List Dropdowns (Accordion Style) --- */

/* The container for the dropdown */
.source-list details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Style when the dropdown is open */
.source-list details[open] {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* The clickable header of the dropdown */
.source-list summary {
    font-weight: 700;
    color: var(--accent);
    list-style: none; /* Removes default arrow */
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Custom Arrow Indicator */
.source-list summary::before {
    content: "▶";
    display: inline-block;
    width: 20px;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.source-list details[open] summary::before {
    transform: rotate(90deg);
}

/* The list inside the dropdown */
.source-list details ul {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    list-style: none;
}

.source-list details li {
    padding-left: 0;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-main);
}

.source-list details li::before {
    content: ""; /* Removes the global "→" so it doesn't double up */
}

/* --- Interactive Source Dropdowns --- */

.source-list details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.source-list details[open] {
    border-color: #00d4ff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.1);
}

.source-list summary {
    font-weight: 700;
    color: #00d4ff;
    list-style: none; /* Removes default browser arrow */
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    outline: none;
}

/* Custom Animated Arrow */
.source-list summary::before {
    content: "▶";
    display: inline-block;
    width: 25px;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.source-list details[open] summary::before {
    transform: rotate(90deg);
}

/* Resetting the global list styles inside the dropdowns */
.source-list details ul {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    list-style: none;
}

.source-list details li {
    padding-left: 0;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-main);
    border-top: none; /* Removes any top borders from previous sections */
}

/* This line specifically stops the "double arrow" issue */
.source-list details li::before {
    content: none; 
}

/* --- GM Toolkit Grid Layout --- */
.toolkit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.toolkit-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.gm-input {
    width: 100%;
    padding: 10px;
    background: #0f172a;
    border: 1px solid var(--accent);
    color: white;
    border-radius: 6px;
    margin-top: 5px;
}

/* Player Cards inside lists */
.player-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    color: var(--accent);
    font-weight: 800;
}

.trade-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.3s;
}

.trade-btn:hover {
    background: #2563eb;
}

/* Responsive fix for smaller screens */
@media (max-width: 900px) {
    .toolkit-grid { grid-template-columns: 1fr; }
}

/* War Room Team Headings */
.team-heading {
    font-family: 'Orbitron', 'Inter', sans-serif; /* A sharp, professional tech font */
    font-size: 1.5rem;
    font-weight: 800;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 5px;
}

/* Customizing the Select Inputs for a "Front Office" Feel */
.gm-input {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
    padding: 10px;
    border-radius: 4px;
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
}
/* Center Column Bubble Styling */
.war-room-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}

.trade-slot {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid #00d4ff;
    border-radius: 50%;
    width: 130px;
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    transition: transform 0.3s ease;
}

.vs-divider {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    color: #00d4ff;
    font-size: 1.5rem;
    opacity: 0.6;
}

/* Professional Team Headings */
.team-heading {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #00d4ff;
    border-bottom: 2px solid #334155;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Post 7 Specific Styles */
.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    margin-bottom: 20px;
    padding-left: 25px;
    border-left: 2px solid var(--accent);
}

.stat-item {
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-main);
}

.stat-bar {
    background: rgba(255,255,255,0.1);
    height: 8px;
    border-radius: 4px;
    margin-top: 5px;
}

.bar-fill {
    background: var(--accent);
    height: 100%;
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent);
}

/* Hero Background for Post 7 */
.deadline-bg {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)), url('https://images.unsplash.com/photo-1504450758481-7338eba7524a?auto=format&fit=crop&q=80&w=1200');
    background-size: cover;
}

/* --- FIXED WAR ROOM GRID (CSS GRID) --- */

.toolkit-grid {
    display: grid;
    /* Column 1: Home | Column 2: Engine (350px) | Column 3: Away */
    grid-template-columns: 1fr 350px 1fr; 
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Forces the center panel to stay in the middle column */
.analytics-center {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Forces side panels to stay in their lanes */
.toolkit-panel:first-child { grid-column: 1; }
.toolkit-panel:last-child { grid-column: 3; }

/* Prevents names like "Columbus Blue Jackets" from pushing the walls out */
.team-heading {
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    font-size: 1.5rem;
    min-height: 3.5rem; /* Ensures both sides have the same vertical start point */
    color: var(--text-header);
}

/* Keeps the trade bubbles centered within their 350px lane */
.war-room-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 15px;
}
