/* guides.css - Styles specific to the guides/blog page */

/* Active nav link */
.nav-link-active {
  color: var(--cobalt) !important;
  font-weight: 600;
}

/* ========== HERO SECTION ========== */
.guides-hero {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.guides-hero-content {
  max-width: 700px;
}

.guides-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cobalt);
  margin-bottom: 0.75rem;
}

.guides-hero h1 {
  font-size: 2.2rem;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.guides-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ========== FEATURED ARTICLE ========== */
.section-featured {
  padding: 2rem 0;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
}

.featured-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
  border: 2px dashed #cbd5e1;
}

.image-placeholder-sm {
  min-height: 120px;
}

.guide-tag {
  display: inline-block;
  background: var(--cobalt);
  color: #fff;
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.featured-content h2 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.featured-content h2 a {
  color: var(--text-main);
  text-decoration: none;
}

.featured-content h2 a:hover {
  color: var(--cobalt);
}

.featured-content p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.featured-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.read-more {
  color: var(--cobalt);
  font-weight: 500;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.read-more-sm {
  color: var(--cobalt);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
}

.read-more-sm:hover {
  text-decoration: underline;
}

/* ========== NEWEST GUIDES ========== */
.section-newest {
  padding: 1.5rem 0;
  background: #fafbfc;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title-row h2 {
  font-size: 1.25rem;
  margin: 0;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.newest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.newest-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
}

.newest-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.newest-card h3 a {
  color: var(--text-main);
  text-decoration: none;
}

.newest-card h3 a:hover {
  color: var(--cobalt);
}

.newest-card p {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.card-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* ========== VISUAL GUIDES (with images) ========== */
.section-visual {
  padding: 1.5rem 0;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.visual-card {
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.visual-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.visual-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.visual-content {
  padding: 1rem;
}

.visual-content h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.visual-content h3 a {
  color: var(--text-main);
  text-decoration: none;
}

.visual-content h3 a:hover {
  color: var(--cobalt);
}

/* ========== QUICK TIPS (with image) ========== */
.section-tips {
  padding: 1.5rem 0;
  background: #fafbfc;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.tips-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
}

.tips-content {
  display: flex;
  flex-direction: column;
}

.tips-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tips-image .image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 250px;
}

.tips-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.tips-header {
  margin-bottom: 1rem;
}

.tips-header h2 {
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}

.tips-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.tips-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tips-list li {
  border-bottom: 1px solid var(--border-subtle);
}

.tips-list li:last-child {
  border-bottom: none;
}

.tips-list a {
  display: block;
  padding: 0.75rem 0;
  text-decoration: none;
  transition: background 0.2s;
}

.tips-list a:hover {
  background: #f8fafc;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.tips-list strong {
  display: block;
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.tips-list span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== USE CASE GUIDES (mixed layout) ========== */
.section-usecases {
  padding: 1.5rem 0;
}

.usecases-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
}

.usecase-card {
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  background: #fff;
}

.usecase-card-large {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.usecase-card-large .usecase-image {
  aspect-ratio: 16/9;
  margin-bottom: 1rem;
}

.usecase-card-large .usecase-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.usecase-card-large h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.usecase-card-large p {
  flex: 1;
  font-size: 0.9rem;
}

.usecase-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.usecase-card h3 a {
  color: var(--text-main);
  text-decoration: none;
}

.usecase-card h3 a:hover {
  color: var(--cobalt);
}

.usecase-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

/* ========== ADVANCED TECHNIQUES ========== */
.section-advanced {
  padding: 1.5rem 0;
  background: #fff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.advanced-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.advanced-header .guide-tag {
  background: var(--cobalt);
}

.advanced-header h2 {
  color: var(--text-main);
  font-size: 1.35rem;
  margin: 0.5rem 0 0.5rem;
}

.advanced-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.advanced-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.advanced-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.advanced-card h3 {
  color: var(--text-main);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.advanced-card .card-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ========== CTA SECTION ========== */
.section-guides-cta {
  padding: 2.5rem 0;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  text-align: center;
}

.guides-cta-content h2 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.guides-cta-content p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ========== INDIVIDUAL GUIDE PAGE STYLES ========== */

/* Guide article container */
.guide-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Guide header */
.guide-header {
  margin-bottom: 2rem;
}

.guide-header h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--text-main);
}

.guide-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Table of contents */
.guide-toc {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.guide-toc h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--text-main);
}

.guide-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-toc li {
  margin-bottom: 0.5rem;
}

.guide-toc a {
  color: var(--cobalt);
  text-decoration: none;
  font-size: 0.9rem;
}

.guide-toc a:hover {
  text-decoration: underline;
}

/* Guide content sections */
.guide-content {
  margin-bottom: 3rem;
}

.guide-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-main);
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.guide-content h2:first-child {
  border-top: none;
  padding-top: 0;
}

.guide-content h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-main);
}

.guide-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.guide-content ul,
.guide-content ol {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

.guide-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.guide-content strong {
  color: var(--text-main);
  font-weight: 600;
}

.guide-content code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  font-size: 0.9em;
  color: #1e293b;
  font-family: 'Courier New', monospace;
}

.guide-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid #334155;
}

.guide-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Callout boxes */
.guide-callout {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.guide-callout-tip {
  background: #f5f3ff;
  border-left-color: #667eea;
}

.guide-callout-warning {
  background: #fee2e2;
  border-left-color: #ef4444;
}

.guide-callout-success {
  background: #d1fae5;
  border-left-color: #10b981;
}

.guide-callout p {
  margin: 0;
}

.guide-callout strong {
  display: block;
  margin-bottom: 0.5rem;
}

/* Example boxes */
.guide-example {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.guide-example-title {
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

/* Related guides section */
.guide-related {
  background: #fafbfc;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2rem 0;
  margin-top: 3rem;
}

.guide-related-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.guide-related h2 {
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  color: var(--text-main);
}

.guide-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.guide-related-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}

.guide-related-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.guide-related-card h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: var(--text-main);
  line-height: 1.4;
}

.guide-related-card p {
  font-size: 0.85rem;
  margin: 0;
  color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 880px) {
  .featured-card {
    grid-template-columns: 1fr;
  }

  .newest-grid {
    grid-template-columns: 1fr;
  }

  .visual-grid {
    grid-template-columns: 1fr;
  }

  .tips-card {
    grid-template-columns: 1fr;
  }

  .tips-image {
    order: -1;
  }

  .usecases-grid {
    grid-template-columns: 1fr;
  }

  .usecase-card-large {
    grid-row: span 1;
  }

  .advanced-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .guide-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .guides-hero h1 {
    font-size: 1.6rem;
  }

  .section-title-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .guide-article {
    padding: 1.5rem 1rem;
  }

  .guide-header h1 {
    font-size: 1.6rem;
  }

  .guide-content h2 {
    font-size: 1.25rem;
  }

  .guide-content h3 {
    font-size: 1.05rem;
  }
}
