/* ==========================================================================
   QUICK TURN AUTO KEYS — BLOG STYLES
   Extends the existing design system for blog listing and article pages.
   Uses existing tokens — no values are introduced outside the system.
   ========================================================================== */

/* ============================================================
   BLOG LISTING HERO
   ============================================================ */
.page-hero--blog {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--surface-2) 100%);
  overflow: hidden;
}

.page-hero--blog::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(192, 138, 78, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(91, 122, 140, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero--blog::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.page-hero__overlay {
  display: none; /* decorative only on blog hero */
}

.page-hero__content {
  position: relative;
  z-index: 2;
  padding-top: 96px;
  padding-bottom: 64px;
  text-align: center;
}

.page-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(192, 138, 78, 0.12);
  border: 1px solid rgba(192, 138, 78, 0.25);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: var(--small-size);
  font-weight: var(--small-weight);
  letter-spacing: var(--small-tracking);
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.page-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.page-hero__sub {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ============================================================
   BLOG LISTING GRID
   ============================================================ */
.blog-listing {
  background: var(--bg);
  padding-top: 64px;
  padding-bottom: var(--section-pad-desktop);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-grid--related {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================================
   BLOG CARD
   ============================================================ */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--duration-medium) var(--ease),
              box-shadow var(--duration-medium) var(--ease),
              border-color var(--duration-medium) var(--ease);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  border-color: rgba(192, 138, 78, 0.3);
}

.blog-card__image-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  flex-shrink: 0;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 420ms var(--ease);
}

.blog-card:hover .blog-card__image {
  transform: scale(1.05);
}

.blog-card__body {
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
}

.blog-card__title {
  font-family: var(--font-heading);
  font-size: clamp(15px, 1.4vw, 17.5px);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 0;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

.blog-card__title a:hover {
  color: var(--accent);
}

.blog-card__title--sm {
  font-size: clamp(14px, 1.2vw, 16px);
}

.blog-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-top: auto;
  transition: gap var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.blog-card__cta svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease);
}

.blog-card__cta:hover {
  color: var(--accent-hover);
  gap: 10px;
}

.blog-card__cta:hover svg {
  transform: translateX(3px);
}

/* ============================================================
   BLOG LISTING CTA
   ============================================================ */
.cta-section--blog {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ============================================================
   ARTICLE HERO
   ============================================================ */
.article-hero {
  position: relative;
  height: clamp(340px, 45vw, 520px);
  overflow: hidden;
}

.article-hero__image-wrap {
  position: absolute;
  inset: 0;
}

.article-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18, 20, 26, 0.3) 0%,
    rgba(18, 20, 26, 0.6) 50%,
    rgba(18, 20, 26, 0.92) 100%
  );
}

.article-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding-bottom: 48px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  transition: color var(--duration-fast) var(--ease), gap var(--duration-fast) var(--ease);
}

.article-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease);
}

.article-back:hover {
  color: var(--text-primary);
}

.article-back:hover svg {
  transform: translateX(-3px);
}

.article-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  max-width: 820px;
}

/* ============================================================
   ARTICLE LAYOUT (2-column with sidebar)
   ============================================================ */
.article-layout {
  background: var(--bg);
  padding: 60px 0 80px;
}

.article-layout__inner {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ============================================================
   ARTICLE PROSE STYLES
   ============================================================ */
.prose {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.78;
  max-width: 760px;
}

.prose p {
  margin: 0 0 1.35em;
  color: var(--text-primary);
}

.prose h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  color: var(--text-primary);
  margin: 2.2em 0 0.7em;
  padding-top: 0.2em;
  border-top: 1px solid var(--border);
  line-height: 1.25;
}

.prose h3 {
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.6vw, 19px);
  font-weight: 600;
  color: var(--accent);
  margin: 1.6em 0 0.5em;
  line-height: 1.3;
}

.prose ul,
.prose ol {
  margin: 0 0 1.35em 0;
  padding-left: 1.5em;
}

.prose li {
  margin-bottom: 0.5em;
  color: var(--text-primary);
  line-height: 1.65;
}

.prose li::marker {
  color: var(--accent);
}

.prose ol li::marker {
  color: var(--accent);
  font-weight: 600;
}

.prose em {
  color: var(--accent);
  font-style: italic;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(192, 138, 78, 0.4);
  transition: color var(--duration-fast) var(--ease);
}

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

/* In-article table (comparison tables etc.) */
.prose .price-table,
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 14px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}

.prose table th {
  background: var(--surface-2);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.prose table td {
  padding: 11px 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  vertical-align: top;
}

.prose table tr:last-child td {
  border-bottom: none;
}

.prose table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================================
   ARTICLE SIDEBAR
   ============================================================ */
.article-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 20px;
}

.sidebar-card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.sidebar-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.sidebar-services ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-services li {
  border-bottom: 1px solid var(--border);
}

.sidebar-services li:last-child {
  border-bottom: none;
}

.sidebar-services a {
  display: block;
  padding: 8px 0;
  font-size: 13.5px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease), padding-left var(--duration-fast) var(--ease);
}

.sidebar-services a:hover {
  color: var(--accent);
  padding-left: 6px;
}

/* ============================================================
   PREVIOUS / NEXT NAV
   ============================================================ */
.blog-prevnext {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.blog-prevnext__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--pad-desktop);
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.blog-prevnext__link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  max-width: 420px;
  transition: opacity var(--duration-fast) var(--ease);
}

.blog-prevnext__link:hover {
  opacity: 0.8;
}

.blog-prevnext__link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
}

.blog-prevnext__link span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.blog-prevnext__link small {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.blog-prevnext__link--prev span {
  text-align: left;
}

.blog-prevnext__link--next {
  margin-left: auto;
}

.blog-prevnext__link--next span {
  text-align: right;
}

.blog-prevnext__link:not(small) {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* ============================================================
   RELATED ARTICLES SECTION
   ============================================================ */
.blog-related {
  background: var(--bg);
  padding-top: 64px;
  padding-bottom: var(--section-pad-desktop);
}

/* ============================================================
   WHATSAPP BUTTON (blog variant)
   ============================================================ */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--button-size);
  font-weight: var(--button-weight);
  letter-spacing: 0.02em;
  padding: 11px 20px;
  border-radius: var(--radius-button);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}

.btn-whatsapp svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
}

.btn-whatsapp.btn-block {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   CTA SECTION LAYOUT (shared)
   ============================================================ */
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px 44px;
}

.cta-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.cta-text p {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.65;
  margin: 0;
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================================
   REVEAL ANIMATION (reuse existing class from animations.js)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .article-layout__inner {
    grid-template-columns: 1fr 260px;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .blog-grid--related {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .article-layout__inner {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .cta-inner {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .cta-text p {
    max-width: none;
  }

  .cta-actions {
    justify-content: center;
  }

  .blog-prevnext__inner {
    flex-direction: column;
    gap: 16px;
    padding: 0 var(--pad-680);
  }

  .blog-prevnext__link--next {
    margin-left: 0;
  }

  .article-hero__title {
    font-size: clamp(20px, 6vw, 32px);
  }

  .page-hero--blog {
    min-height: 320px;
  }
}

@media (max-width: 480px) {
  .page-hero__content {
    padding-top: 72px;
    padding-bottom: 48px;
  }

  .prose {
    font-size: 15px;
  }

  .blog-listing {
    padding-top: 40px;
  }

  .article-layout {
    padding: 40px 0 60px;
  }
}
