/* =============================================================================
   ARTICLE PAGE — THG (Tallinna Humanitaargumnaasium)
   Single article/news detail styling.
   All classes prefixed ap-article__ to avoid collisions.
   ============================================================================= */

/* ── ARTICLE WRAPPER ────────────────────────────────────────────────────────── */

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

/* ── HEADER ─────────────────────────────────────────────────────────────────── */

.ap-article__header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 36px;
}

/* Tags in header — pill badges */
.ap-article__tags-top {
  margin-bottom: 16px;
}

.ap-article__tags-top .field__label {
  display: none;
}

.ap-article__tags-top .field__items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ap-article__tags-top .field__item a {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 50px;
  background: rgba(107, 155, 74, 0.12);
  color: var(--thg-green-sage, #6b9b4a);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.ap-article__tags-top .field__item a:hover {
  background: rgba(107, 155, 74, 0.22);
  color: var(--thg-green-forest, #2d5a30);
}

/* Title */
.ap-article__title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--thg-green-forest, #2d5a30);
  line-height: 1.3;
  margin-bottom: 16px;
}

/* Meta row */
.ap-article__meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: #888;
  font-size: 0.9rem;
}

.ap-article__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ap-article__date i {
  color: var(--thg-orange, #e8720c);
  font-size: 1rem;
}

/* ── FEATURED IMAGE ─────────────────────────────────────────────────────────── */

.ap-article__image {
  margin-bottom: 36px;
  border-radius: 12px;
  overflow: hidden;
}

.ap-article__image img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* Hide the field label for image */
.ap-article__image .field__label {
  display: none;
}

/* ── BODY ───────────────────────────────────────────────────────────────────── */

.ap-article__body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 40px;
}

/* Hide the body field label */
.ap-article__body .field__label {
  display: none;
}

.ap-article__body p {
  margin-bottom: 1.2em;
}

.ap-article__body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--thg-green-forest, #2d5a30);
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.ap-article__body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--thg-green-forest, #2d5a30);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.ap-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1em 0;
}

.ap-article__body blockquote {
  border-left: 4px solid var(--thg-orange, #e8720c);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(232, 114, 12, 0.04);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #555;
}

.ap-article__body ul,
.ap-article__body ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.ap-article__body li {
  margin-bottom: 0.4em;
}

.ap-article__body a {
  color: var(--thg-green-sage, #6b9b4a);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ap-article__body a:hover {
  color: var(--thg-orange, #e8720c);
}

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */

.ap-article__footer {
  border-top: 1px solid #e8e8e8;
  padding-top: 28px;
  margin-top: 20px;
}

.ap-article__footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--thg-green-forest, #2d5a30);
  margin-bottom: 14px;
}

.ap-article__tags-bottom .field__label {
  display: none;
}

.ap-article__tags-bottom .field__items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ap-article__tags-bottom .field__item a {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(107, 155, 74, 0.12);
  color: var(--thg-green-sage, #6b9b4a);
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}

.ap-article__tags-bottom .field__item a:hover {
  background: rgba(107, 155, 74, 0.22);
  color: var(--thg-green-forest, #2d5a30);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .ap-article {
    padding: 24px 0 40px;
  }

  .ap-article__title {
    font-size: 1.6rem;
  }

  .ap-article__image img {
    max-height: 280px;
    border-radius: 8px;
  }

  .ap-article__body {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* ── DARK MODE ──────────────────────────────────────────────────────────────── */

[data-bs-theme="dark"] .ap-article__title {
  color: #a8d5aa;
}

[data-bs-theme="dark"] .ap-article__meta {
  color: #6b8b6d;
}

[data-bs-theme="dark"] .ap-article__body {
  color: #9ab09b;
}

[data-bs-theme="dark"] .ap-article__body h2,
[data-bs-theme="dark"] .ap-article__body h3 {
  color: #a8d5aa;
}

[data-bs-theme="dark"] .ap-article__body blockquote {
  background: rgba(232, 114, 12, 0.08);
  color: #9ab09b;
}

[data-bs-theme="dark"] .ap-article__body a {
  color: #8bc98e;
}

[data-bs-theme="dark"] .ap-article__body a:hover {
  color: var(--thg-orange, #e8720c);
}

[data-bs-theme="dark"] .ap-article__footer {
  border-top-color: #2a3a2c;
}

[data-bs-theme="dark"] .ap-article__footer-heading {
  color: #a8d5aa;
}

[data-bs-theme="dark"] .ap-article__tags-top .field__item a,
[data-bs-theme="dark"] .ap-article__tags-bottom .field__item a {
  background: rgba(107, 155, 74, 0.18);
  color: #8bc98e;
}

[data-bs-theme="dark"] .ap-article__tags-top .field__item a:hover,
[data-bs-theme="dark"] .ap-article__tags-bottom .field__item a:hover {
  background: rgba(107, 155, 74, 0.3);
  color: #a8d5aa;
}

[data-bs-theme="dark"] .ap-article__image img {
  opacity: 0.9;
}
