/* Blog Layout */
.blog-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .blog-container {
    grid-template-columns: 250px 1fr; /* Sidebar | Content */
    align-items: start;
  }
}

/* Sidebar */
.blog-sidebar {
  background-color: white;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
    z-index: 10;
  }
}



.search-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
  font-family: inherit;
}

.category-list {
  list-style: none;
}

.category-item {
  margin-bottom: 0.75rem;
  cursor: pointer;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.category-item:hover, .category-item.active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Article List */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: white;
  padding: 0; /* Removed padding for image layout */
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.blog-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-card-content {
  padding: 2rem;
  flex: 1;
}

@media (min-width: 960px) {
  .blog-card {
    display: grid;
    grid-template-columns: 1fr 3fr; /* 1/4 image (25%) */
    align-items: start;
  }
  
  .blog-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
  }
  
  .blog-image img {
    height: 100%;
    object-fit: cover;
  }
}

@media (min-width: 1024px) {
  .blog-card {
    grid-template-columns: 2fr 3fr; /* 2/5 image (40%) */
  }
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.blog-category {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent);
}
.blog-date { font-size: 0.65rem; color: #9ca3af; }

/* Desktop adjustments for meta */
@media (min-width: 768px) {
  .blog-category, .blog-date {
    font-size: 0.75rem;
  }
}

.blog-title {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem;
  transition: color 0.3s;
}
.blog-card:hover .blog-title { color: var(--color-accent); }
.blog-excerpt { color: var(--color-text-light); margin-bottom: 1.5rem; }
.blog-read-btn {
  font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 4px;
  background: none; border: none; padding: 0; cursor: pointer; color: inherit;
}
.blog-content-expanded {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f3f4f6;
  color: var(--color-text);
  line-height: 1.75;
  animation: fadeIn 0.5s ease-in-out;
}
/* Single Article Page */
.single-article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.back-btn {
  display: inline-block;
  margin-bottom: 2rem;
  padding: 0.5rem 1.5rem;
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  text-transform: uppercase;
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.3s;
}
.back-btn:hover {
  background-color: var(--color-text);
  color: white;
}

.article-hero-image {
  width: 100%;
  height: 450px;
  max-height: 450px;
  object-fit: cover;
  object-position: center;
  margin-bottom: 2rem;
  border-radius: 4px; /* Optional polish */
}

.single-article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.single-article-meta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  color: var(--color-text-light);
  font-size: 0.75rem; /* Reduced for mobile */
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .single-article-meta {
    font-size: 0.875rem;
  }
}

.single-article-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 3rem;
}
.single-article-content p {
  margin-bottom: 2rem; /* Increased from 1.5rem */
}

/* Relaxed Rhythm: Headings */
.single-article-content h3, 
.single-article-content h4, 
.single-article-content h5 {
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

/* Utilities & Animations */

/* Specific overrides for specific views to beat the grid/flex layouts */
#blog-list-view.hidden,
#blog-single-view.hidden {
  display: none !important;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Source Links Styling */
.sources-list {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.sources-list li {
  position: relative;
  padding-left: 1.5rem; /* Space for the marker */
}

.sources-list li::before {
  content: "//";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
  font-family: monospace;
}

/* Visual Strategy Support */
.visual-container {
  background-color: #faf9f6;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.visual-highlight {
  background-color: #fff;
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.visual-dark {
  background-color: var(--color-dark-bg);
  color: var(--color-secondary);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.visual-quote {
  background-color: rgba(166, 123, 91, 0.1);
  border-left: 4px solid var(--color-accent);
  color: var(--color-dark-bg);
  padding: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

.text-accent { color: var(--color-accent) !important; }
.text-dim { color: var(--color-text-light); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; text-align: left; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Refactored Inline Styles */
.header-spacing-force {
  margin-top: 8rem !important;
  padding-top: 8rem !important;
}

.quote-premium {
  background: linear-gradient(135deg, var(--color-dark-bg) 0%, #4a4a4a 100%);
  border-left: 6px solid var(--color-accent);
  color: #fff !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.quote-premium p {
    color: #fff !important;
}

.chart-wrapper {
  position: relative;
  height: 350px;
  width: 100%;
}

.text-white-force { color: #fff !important; }
.text-accent-force { color: var(--color-accent) !important; }
.text-white-opacity-60 { color: rgba(255,255,255,0.6) !important; }
.video-container-width { max-width: 48rem; margin: 0 auto; }
.video-wrapper-16-9 { position: relative; border-radius: 0.5rem; overflow: hidden; border: 1px solid var(--color-dark-bg); aspect-ratio: 16/9; }

/* Paper / Light Theme System */
.visual-light {
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 0.5rem;
  padding: 3rem; /* Increased padding */
  margin: 5rem 0; /* Significantly increased Air */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Soft shadow */
  color: var(--color-text);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quote-paper {
  background-color: rgba(166, 123, 91, 0.15); /* Beige tin */
  padding: 4rem 3rem;
  margin: 5rem 0; /* Significantly increased Air */
  text-align: center;
  border-radius: 0.5rem;
  position: relative;
  color: var(--color-text);
}

/* Adjustments for visuals inside light containers */
.visual-light .text-gray-400 { color: #6b7280 !important; } /* Darker gray for light bg */
.visual-light .text-gray-500 { color: #4b5563 !important; }
.visual-light .text-white { color: #111827 !important; }
.visual-light .bg-gray-900 { background-color: #f3f4f6 !important; border-color: #e5e7eb !important; }
.visual-light .bg-gray-950 { background-color: #ffffff !important; border-color: #e5e7eb !important; }
.visual-light .bg-black { background-color: #1f2937 !important; color: white !important; } /* Keep code blocks dark */

/* Schematic / Tech Visuals */
.schematic-box {
    background-color: #0f172a; /* Deep slate */
    background-image: 
        linear-gradient(rgba(30, 41, 59, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 41, 59, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid #1e293b;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.schematic-step {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(56, 189, 248, 0.2); /* Cyan tint */
    padding: 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.schematic-step:hover {
    border-color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.1);
    transform: translateY(-2px);
}

.schematic-label {
    font-family: monospace;
    font-size: 0.7rem;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.schematic-title {
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.9rem;
}

.schematic-desc {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

.schematic-connector {
    color: rgba(56, 189, 248, 0.3);
    font-weight: bold;
    text-align: center;
}

