﻿/* Blog Page Redesign - Dark Lab Theme */
:root {
  --bg-deep-black: #07191a;
  --bg-card: #0e3c3c;
  --accent-gold: #c5a059;
  --accent-red: #ff4d4d;
  --accent-green: #10b981;
  --text-primary: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.6);
  --border-color: rgba(255, 255, 255, 0.1);
  --font-mono: "Courier New", Courier, monospace;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
}

.blog-redesign-body {
  --bg-light: rgba(255, 255, 255, 0.05);
  /* Override global bg-light for dark theme readability */
  background-color: var(--bg-deep-black);
  color: var(--text-primary);
  font-family: "Vend Sans", sans-serif;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  position: relative;
}

.blog-redesign-body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(197, 160, 89, 0.05),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.blog-redesign-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Hero Section & Global Elements --- */
.hero-small-themed {
  padding: 100px 0 60px;
  background: linear-gradient(
    135deg,
    rgba(7, 25, 26, 0.98) 0%,
    rgba(10, 37, 64, 0.95) 100%
  );
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero-small-themed .container {
  position: relative;
  z-index: 2;
}

.hero-small-themed h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.blog-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: 15px;
  background: rgba(197, 160, 89, 0.1);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid rgba(197, 160, 89, 0.15);
}

/* Category Specific Colors */
.blog-category.cat-education {
  color: #c5a059;
  background: rgba(197, 160, 89, 0.1);
  border-color: rgba(197, 160, 89, 0.2);
}
.blog-category.cat-tips {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}
.blog-category.cat-expert {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.2);
}
.blog-category.cat-strategic {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}
.blog-category.cat-news {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.1);
}
.blog-category.cat-guide {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
}

/* --- Blog Grid --- */
.lab-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 80px 0;
}

.lab-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
  position: relative;
  height: 100%;
}

.lab-article-card:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.article-inner-content {
  padding: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.lab-article-card h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.lab-article-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 25px;
}

/* --- Stats Row --- */
.lab-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 40px 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin: 40px 0;
  border-radius: 8px;
}

.stat-lab-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* --- AI Node --- */
.ai-node-section {
  padding: 100px 0;
  background: #041011;
  border-top: 1px solid var(--border-color);
}

.underwriting-dashboard {
  background: #000;
  border: 1px solid var(--glass-border);
}

/* --- Newsletter --- */
.redesign-newsletter {
  padding: 100px 0;
  background: var(--bg-deep-black);
  border-top: 1px solid var(--border-color);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* --- Footer --- */
.compact-blog-footer {
  background: #041011;
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-color);
}

.post-content {
  background: var(--bg-deep-black);
  color: var(--text-primary) !important;
}

.post-content h2,
.post-content h3 {
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 20px;
}

.post-content p,
.post-content li {
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.post-content a {
  color: var(--accent-gold);
  text-decoration: underline;
}

/* --- Timeline Component --- */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.timeline-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.timeline-item.before::before {
  background: var(--accent-red);
  opacity: 0.5;
}

.timeline-item.now::before {
  background: var(--accent-gold);
}

.timeline-item.future::before {
  background: var(--accent-green);
}

.timeline-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  display: block;
}

.timeline-item.before .timeline-label {
  color: var(--accent-red);
}

.timeline-item.now .timeline-label {
  color: var(--accent-gold);
}

.timeline-item.future .timeline-label {
  color: var(--accent-green);
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: white;
}

.timeline-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.timeline-content ul {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
}

.timeline-content li {
  padding: 8px 0 !important;
  font-size: 0.9rem !important;
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  border: none !important;
}

.timeline-content li::before {
  content: "\f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent-gold);
  font-size: 0.8rem;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .timeline-grid {
    grid-template-columns: 1fr;
  }
}

/* --- FAQ Cards --- */
.faq-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: all 0.3s;
}

.faq-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-gold);
}

.faq-card h3 {
  color: var(--accent-gold);
  margin-bottom: 12px;
  font-size: 1.3rem;
  font-weight: 700;
}

.faq-card p {
  color: var(--text-primary);
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
}

/* --- Breadcrumbs --- */
.breadcrumb {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

.breadcrumb li a {
  color: var(--accent-gold);
  transition: color 0.3s;
}

.breadcrumb li a:hover {
  color: white;
}

.breadcrumb li + li::before {
  content: " / ";
  margin: 0 10px;
  color: var(--border-color);
}

.breadcrumb li.active {
  color: var(--text-muted);
  opacity: 0.8;
}

/* --- Responsive Tables --- */
.post-content table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 30px 0;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.post-content th,
.post-content td {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  text-align: left;
  min-width: 120px;
}

.post-content th {
  background: rgba(197, 160, 89, 0.1);
  color: var(--accent-gold);
  font-weight: 700;
}

/* --- Themed Components --- */
/* --- Robust Themed Headers --- */
.post-header,
.post-header-themed,
.hero-small-themed,
.blog-hero-lab-themed {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(6, 26, 51, 0.98) 0%,
    rgba(10, 37, 64, 0.95) 40%,
    rgba(197, 160, 89, 0.15) 100%
  );
  padding: clamp(100px, 15vh, 140px) 0 !important;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: visible !important;
  text-align: center;
  border-bottom: 2px solid rgba(197, 160, 89, 0.3);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

.post-header .container,
.hero-small-themed .container {
  width: 100%;
  max-width: 900px !important;
  margin: 0 auto;
  padding: 0 25px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  /* Consistent vertical spacing */
}

.post-header h1,
.hero-small-themed h1,
.blog-hero-lab h1 {
  font-family: "Vend Sans", sans-serif !important;
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  line-height: 1.2 !important;
  font-weight: 800;
  color: #ffffff;
  margin: 0 !important;
  max-width: 100%;
  text-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
  letter-spacing: normal;
  text-transform: none;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-header .post-meta,
.hero-small-themed .eyebrow {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  opacity: 1 !important;
}

.post-header .post-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.post-header .lead,
.hero-small-themed .lead {
  font-family: "Vend Sans", sans-serif !important;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  max-width: 700px;
  margin: 0 auto !important;
  line-height: 1.5;
  font-weight: 400;
  opacity: 1 !important;
}

/* --- Breadcrumbs in Header --- */
.post-header .breadcrumb {
  margin-bottom: 1rem;
  justify-content: center;
  width: 100%;
}

.code-blur {
  filter: blur(8px) !important;
  opacity: 0.65;
  user-select: none;
  cursor: help;
  transition: all 0.3s ease;
  position: relative;
  display: inline;
}

.code-blur::after {
  content: "Proprietary Logic Locked - Contact contact@goodladyfinance.com to unlock";
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 26, 51, 0.98);
  color: #c5a059;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: sans-serif;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  border: 1px solid rgba(197, 160, 89, 0.4);
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.code-blur:hover {
  filter: blur(8px) !important;
  opacity: 0.9;
}

.code-blur:hover::after {
  opacity: 1;
  visibility: visible;
}

.text-gradient-premium {
  background: linear-gradient(135deg, #ffffff 20%, #c5a059 80%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 5s linear infinite;
  display: block;
  width: fit-content;
  margin: 0 auto;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 20px;
  padding: 4px 12px;
  background: rgba(197, 160, 89, 0.1);
  border: 1px solid rgba(197, 160, 89, 0.2);
  border-radius: 4px;
}

/* --- Blog Search & Filter Bar --- */
.blog-controls {
  padding: 30px 0 10px;
}

.blog-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto 30px;
}

.blog-search-wrap i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(197, 160, 89, 0.7);
  font-size: 1rem;
  pointer-events: none;
}

.lab-article-card.hidden {
  display: none !important;
}

#blog-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 160, 89, 0.25);
  border-radius: 50px;
  padding: 14px 20px 14px 48px;
  font-size: 1rem;
  color: #fff;
  outline: none;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
  font-family: inherit;
  box-sizing: border-box;
}

#blog-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#blog-search-input:focus {
  border-color: rgba(197, 160, 89, 0.6);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.blog-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.filter-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  padding: 7px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.02em;
}

.filter-tab:hover {
  border-color: rgba(197, 160, 89, 0.5);
  color: #c5a059;
}

.filter-tab.active {
  background: rgba(197, 160, 89, 0.15);
  border-color: #c5a059;
  color: #c5a059;
}

.no-results-msg {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.4);
  display: none;
  grid-column: 1 / -1;
}

.no-results-msg i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

/* --- Clickable Article Card --- */
.lab-article-card {
  position: relative;
  cursor: pointer;
}

.read-more::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.lab-article-card a:not(.read-more) {
  position: relative;
  z-index: 11;
}
/* --- Mobile & Tablet Responsive Overrides --- */
@media (max-width: 1024px) {
  .lab-blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .hero-small-themed,
  .post-header {
    min-height: 320px !important;
    padding: 80px 0 40px !important;
  }

  .hero-small-themed h1,
  .post-header h1 {
    font-size: 2.2rem !important;
  }

  .lab-blog-grid {
    grid-template-columns: 1fr;
    display: grid !important; /* Force grid over the flex-scroller in mobile-responsive.css for the main feed */
    overflow: visible !important;
    margin: 0 !important;
    padding: 40px 0 !important;
  }

  .lab-article-card {
    flex: none !important;
    min-width: 0 !important;
    height: auto !important; /* Let content dictate height on mobile for better readability */
    min-height: 400px;
  }

  .lab-article-card .blog-image {
    height: 180px !important; /* More generous image on vertical stack */
  }

  /* Transform filter tabs into a clean horizontal scroller on mobile */
  .blog-filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0 20px;
    margin: 0 -20px 10px;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }

  .blog-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 20px;
  }

  .lab-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 30px 15px;
  }

  .stat-lab-value {
    font-size: 1.2rem;
  }

  /* Breadcrumb centering fix for mobile */
  .post-header .breadcrumb {
    font-size: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-small-themed h1,
  .post-header h1 {
    font-size: 1.8rem !important;
  }

  .lab-stats-row {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
