/* Guide article layout & components */

.article-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .article-wrap {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }
}

.article-toc {
  display: none;
}

@media (min-width: 1024px) {
  .article-toc {
    display: block;
    position: sticky;
    top: 88px;
  }
}

.article-toc__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.article-toc a {
  display: block;
  padding: 0.35rem 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 0.65rem;
}

.article-toc a:hover,
.article-toc a.is-active {
  color: var(--brand);
  border-left-color: var(--brand);
}

.article-main { min-width: 0; }

.article-hero {
  margin-bottom: 2rem;
}

.article-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.65rem;
}

.article-hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  line-height: 1.12;
  margin-bottom: 0.85rem;
}

.article-lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  max-width: 62ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.article-meta__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--brand-light);
  color: var(--brand);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
}

.article-meta__stat button {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
}

.article-meta__stat button.is-liked {
  color: var(--brand-strong);
}

.article-meta__stat--link {
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.article-meta__stat--link:hover {
  background: #fde0e0;
  color: var(--brand-strong);
}

.article-hero__media {
  position: relative;
  max-width: 720px;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .article-hero__media {
    max-width: 780px;
  }
}

.article-hero__media .article-hero__img {
  margin-top: 0;
}

.article-hero__title-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1.25rem;
  font-size: clamp(1.15rem, 3.8vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.article-hero__title-overlay span {
  display: block;
  font-size: 0.42em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0.35em 0;
  opacity: 0.92;
}

.article-hero__img {
  display: block;
  width: 100%;
  max-width: 720px;
  max-height: 260px;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .article-hero__img {
    max-height: 300px;
    max-width: 780px;
  }
}

.article-hero__media--flag {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-hero__img--flag {
  display: block;
  width: auto;
  max-width: min(100%, 520px);
  max-height: 220px;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  object-position: center;
  border: none;
  margin-top: 0;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

@media (min-width: 768px) {
  .article-hero__img--flag {
    max-height: 260px;
    max-width: 560px;
  }
}

.article-cta {
  background: linear-gradient(135deg, #8b0000 0%, #600000 100%);
  color: #fff;
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.article-cta p {
  margin: 0;
  max-width: 42ch;
  color: #fff;
  font-size: 1.02rem;
  line-height: 1.55;
}

.article-cta p strong {
  color: #fff;
  font-weight: 700;
}

.article-cta__detail {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.article-cta > a {
  background: #fff;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  white-space: nowrap;
}

.article-cta > a:hover { background: var(--brand-light); }

.article-content h2 {
  font-size: 1.45rem;
  margin: 2.25rem 0 0.85rem;
  scroll-margin-top: 88px;
}

.article-content h3 {
  font-size: 1.12rem;
  margin: 1.5rem 0 0.65rem;
}

.article-content p,
.article-content li {
  color: #334155;
  margin-bottom: 0.85rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.article-content a {
  color: var(--brand);
  font-weight: 600;
}

.callout {
  background: var(--brand-light);
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}

.callout strong { color: var(--brand); }

.steps-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  display: grid;
  gap: 1rem;
}

.steps-list li {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: #fff;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.interactive-box {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  background: #fafafa;
}

.interactive-box label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.interactive-box input {
  width: 100%;
  max-width: 280px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  margin-bottom: 0.85rem;
}

.interactive-box__more {
  margin-top: 0.85rem;
  margin-bottom: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.interactive-box__more a {
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

.interactive-box__more a:hover {
  text-decoration: underline;
}

.interactive-box__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.article-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
}

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

.article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  font-size: 0.9rem;
}

.article-table th,
.article-table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
}

.split-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.split-results div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  text-align: center;
}

.split-results strong {
  display: block;
  font-size: 1.1rem;
  color: var(--brand);
}

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

.checklist li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist input { margin-top: 0.25rem; accent-color: var(--brand); }

.video-section h2 { margin: 0; }

.video-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.video-section__nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.video-section__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.video-section__arrow:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.video-section__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.video-carousel {
  overflow: hidden;
}

.video-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.25rem;
  transition: transform 0.28s ease;
  will-change: transform;
}

.video-carousel__item {
  flex: 0 0 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .video-carousel__item {
    flex: 0 0 calc((100% - 1.25rem) / 2);
  }
}

@media (min-width: 1024px) {
  .video-carousel__item {
    flex: 0 0 calc((100% - 2.5rem) / 3);
  }
}

.video-section--count-1 .video-carousel__item {
  flex: 0 0 100%;
  max-width: 720px;
}

.video-section--count-2 .video-carousel__item {
  flex: 0 0 calc((100% - 1.25rem) / 2);
}

.video-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

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

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.45rem;
}

.video-caption a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.video-caption a:hover {
  text-decoration: underline;
}

.faq-list { margin: 1rem 0; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.faq-item button {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  padding: 0.9rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.faq-item__body {
  display: none;
  padding: 0 1rem 1rem;
  color: #334155;
}

.faq-item.is-open .faq-item__body { display: block; }

.references {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 2rem;
}

.references h2 { margin-top: 0; }

.references ol { margin: 0; padding-left: 1.2rem; }

.references li { margin-bottom: 0.5rem; }

.related-links {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.related-links a {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.related-links a:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand);
}

.article-meta__author a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.article-meta__author a:hover {
  text-decoration: underline;
}

.article-author {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}

.article-author h2 { margin-top: 0; }

.article-author__card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  background: #fff;
}

.article-author__avatar {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: hsl(var(--author-hue, 350) 58% 42%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.article-author__name {
  margin: 0 0 0.2rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.article-author__role {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
  color: var(--brand);
  font-weight: 600;
}

.article-author__bio {
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.article-related {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}

.article-related h2 { margin: 0; }

.article-related__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.article-related__nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.article-related__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.article-related__arrow:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
}

.article-related__arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.article-related__carousel {
  overflow: hidden;
  margin-top: 1rem;
}

.article-related__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.85rem;
  transition: transform 0.28s ease;
  will-change: transform;
}

.article-related__grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

@media (min-width: 640px) {
  .article-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.article-related__card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  flex: 0 0 calc((100% - 1.7rem) / 3);
  min-width: 0;
}

@media (max-width: 639px) {
  .article-related__card {
    flex: 0 0 82%;
  }
}

.article-related__card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(139, 0, 0, 0.08);
}

.article-related__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
}

.article-related__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-related__img--placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-related__img--calc {
  background: linear-gradient(145deg, #fff5f5 0%, #fde8e8 100%);
  font-size: 0.68rem;
}

.article-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.article-related__eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
}

.article-related__title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-related__desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-related__meta {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.comments-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}

.comments-section h2 { margin-top: 0; }

.comment-form {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}

.comment-form textarea { min-height: 100px; resize: vertical; }

.comment-form button {
  justify-self: start;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
}

.comment-form button:hover { background: var(--brand-strong); }

.comment-list { display: grid; gap: 0.85rem; }

.comment-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fff;
}

.comment-card__author {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.comment-card__date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.comment-ziko-link,
.ziko-brand-link {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 0, 0, 0.35);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.comment-ziko-link:hover,
.ziko-brand-link:hover {
  color: var(--brand-strong);
  background: var(--brand-light);
  border-bottom-color: var(--brand);
}

.article-cta .ziko-brand-link {
  color: #fff;
  background: none;
  padding: 0;
  border-radius: 0;
  white-space: normal;
  border-bottom-color: rgba(255, 255, 255, 0.55);
}

.article-cta .ziko-brand-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-bottom-color: #fff;
}

.article-footer-nav {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.article-footer-nav a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.article-footer-nav a:hover { text-decoration: underline; }
