/**
 * Théma21 – egyedi kezdőoldali modulok
 *
 * A cikk- és rovatblokkok SmartMag/Elementor-komponensek maradnak.
 * Ez a fájl csak a Théma21 saját shortcode-moduljait formázza.
 */

/* =========================================================
   Legutóbbi lapszám – [thema21_home_issue]
   1.7.22: kompakt lapszámsáv + light/dark borítóváltás javítása.
========================================================= */

.thema21-home-issue {
  --t21-home-issue-bg: #111111;
  --t21-home-issue-fg: #f7f5f0;
  --t21-home-issue-muted: rgba(255, 255, 255, .67);
  --t21-home-issue-line: rgba(255, 255, 255, .18);

  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: clamp(28px, 3vw, 44px);
  align-items: center;
  padding: 28px 34px;
  overflow: hidden;
  background: var(--t21-home-issue-bg);
  color: var(--t21-home-issue-fg);
}

.thema21-home-issue__cover {
  display: block;
  width: 136px;
  max-width: 136px;
  justify-self: start;
  background: #f7f7f7;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: transform .22s ease, box-shadow .22s ease;
}

.thema21-home-issue__cover:hover,
.thema21-home-issue__cover:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
}

/* A light/dark láthatóságot a variant osztályok vezérlik.
   Fontos: a generikus .thema21-issue-cover display értékét itt nem írjuk felül,
   mert mind a light, mind a dark SVG ezt az osztályt kapja. */
.thema21-home-issue__cover .thema21-cover-stack {
  display: block;
  width: 100%;
  height: auto;
}

.thema21-home-issue__cover .thema21-issue-cover,
.thema21-home-issue__cover svg {
  width: 100%;
  height: auto;
}

/* Kezdőlapi fallback: normál módban light, sötét módban dark.
   Ezek szándékosan specifikusabbak, mint az általános méretező szabályok. */
.thema21-home-issue__cover .thema21-cover-variant--light {
  display: block;
}

.thema21-home-issue__cover .thema21-cover-variant--dark {
  display: none;
}

html.s-dark .thema21-home-issue__cover .thema21-cover-variant--light,
body.s-dark .thema21-home-issue__cover .thema21-cover-variant--light,
.s-dark .thema21-home-issue__cover .thema21-cover-variant--light,
[data-scheme="dark"] .thema21-home-issue__cover .thema21-cover-variant--light {
  display: none;
}

html.s-dark .thema21-home-issue__cover .thema21-cover-variant--dark,
body.s-dark .thema21-home-issue__cover .thema21-cover-variant--dark,
.s-dark .thema21-home-issue__cover .thema21-cover-variant--dark,
[data-scheme="dark"] .thema21-home-issue__cover .thema21-cover-variant--dark {
  display: block;
}

.thema21-home-issue__kicker {
  margin-bottom: 9px;
  color: var(--c-main, #c8a96a);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  line-height: 1.3;
  text-transform: uppercase;
}

.thema21-home-issue__number {
  margin-left: -.04em;
  color: var(--t21-home-issue-fg);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .88;
}

.thema21-home-issue__title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.thema21-home-issue__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 15px;
  color: var(--t21-home-issue-muted);
  font-size: 14px;
  line-height: 1.45;
}

.thema21-home-issue__meta span + span::before {
  content: "·";
  display: inline-block;
  padding: 0 10px;
  color: var(--c-main, #c8a96a);
}

.thema21-home-issue__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--t21-home-issue-line);
}

.thema21-home-issue__actions a {
  text-decoration: none;
}

.thema21-home-issue__primary {
  color: var(--c-main, #c8a96a) !important;
  font-size: 14px;
  font-weight: 700;
}

.thema21-home-issue__secondary {
  color: var(--t21-home-issue-muted) !important;
  font-size: 13px;
}

.thema21-home-issue__primary:hover,
.thema21-home-issue__primary:focus-visible,
.thema21-home-issue__secondary:hover,
.thema21-home-issue__secondary:focus-visible {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: .18em;
}


/* =========================================================
   Aktuális – [thema21_home_current]
   1.7.40: két soros bal oldal + teljes magasságú médiatér.
========================================================= */

.thema21-home-current {
  --t21-current-bg: #f7f5f0;
  --t21-current-fg: var(--c-contrast, #111111);
  --t21-current-muted: var(--c-post-meta, rgba(0, 0, 0, .62));
  --t21-current-line: rgba(0, 0, 0, .13);
  --t21-current-accent: var(--c-main, #c8a96a);

  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(340px, 35vw, 540px);
  grid-template-areas:
    "content media"
    "footer media";
  grid-template-rows: auto auto;
  min-height: 248px;
  overflow: hidden;
  border: 1px solid var(--t21-current-line);
  border-top: 4px solid var(--t21-current-accent);
  background: var(--t21-current-bg);
  color: var(--t21-current-fg);
}

.thema21-home-current--image-left {
  grid-template-columns: clamp(340px, 35vw, 540px) minmax(0, 1fr);
  grid-template-areas:
    "media content"
    "media footer";
}

.thema21-home-current--no-image {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "content"
    "footer";
  min-height: 210px;
}

.thema21-home-current__content {
  grid-area: content;
  min-width: 0;
  padding: 20px 32px;
  align-self: end;
}

.thema21-home-current--has-footer .thema21-home-current__content {
  padding-bottom: 10px;
}

.thema21-home-current__kicker {
  margin-bottom: 7px;
  color: var(--t21-current-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.thema21-home-current__title {
  max-width: 820px;
  margin: 0;
  color: inherit;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.15vw, 31px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.025em;
}

.thema21-home-current__text {
  display: -webkit-box;
  max-width: 860px;
  margin-top: 9px;
  overflow: hidden;
  color: var(--t21-current-muted);
  font-size: 13px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.thema21-home-current__text p { margin: 0; }
.thema21-home-current__text p + p { margin-top: .4em; }

.thema21-home-current__footer {
  grid-area: footer;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 0;
  margin: 0 32px;
  padding: 10px 0 20px;
  border-top: 1px solid var(--t21-current-line);
}

.thema21-home-current__meta {
  display: flex;
  flex: 1 1 500px;
  flex-wrap: wrap;
  gap: 5px 18px;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.thema21-home-current__meta-row {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.thema21-home-current__meta dt,
.thema21-home-current__meta dd { margin: 0; }

.thema21-home-current__meta dt {
  flex: 0 0 auto;
  color: var(--t21-current-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.35;
  text-transform: uppercase;
}

.thema21-home-current__meta dd {
  min-width: 0;
  color: var(--t21-current-fg);
  font-size: 12px;
  line-height: 1.35;
}

/* 1.7.45: CTA-k hoverje a SmartMag globális button/link szabályait örökli. */
.thema21-home-current__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  margin: 0;
}

.thema21-home-current__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
}

.thema21-home-current__action--primary {
  /*
   * A színezést és a hover/focus állapotot a SmartMag globális
   * .ts-button szabályai adják. Itt csak a blokkhoz illő méretet tartjuk.
   */
  --btn-height: auto;
  --btn-pad: 9px 13px;
  --btn-l-height: 1.35;
  --btn-f-size: 11px;
  --btn-f-weight: 700;
  border-radius: 0;
}

.thema21-home-current__action--secondary {
  /* A normál és hover linkszínt is a SmartMag globális linkpaletta adja. */
  --c-a: var(--c-links);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
}

.thema21-home-current__arrow {
  font-size: 1.1em;
  line-height: 1;
}

.thema21-home-current__media {
  grid-area: media;
  position: relative;
  align-self: stretch;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, .045);
}

.thema21-home-current__media > img.thema21-home-current__image {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
}

.thema21-home-current--dark {
  --t21-current-bg: #111111;
  --t21-current-fg: #f7f5f0;
  --t21-current-muted: rgba(255, 255, 255, .69);
  --t21-current-line: rgba(255, 255, 255, .18);
}

@media (max-width: 1050px) {
  .thema21-home-current {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 36%);
  }

  .thema21-home-current--image-left {
    grid-template-columns: minmax(300px, 36%) minmax(0, 1fr);
  }

  .thema21-home-current__content { padding: 20px 26px 9px; }
  .thema21-home-current__footer { margin-inline: 26px; padding-bottom: 18px; }
  .thema21-home-current__title { font-size: clamp(24px, 2.6vw, 29px); }
}

@media (max-width: 767px) {
  /*
   * Mobilon ne a desktop grid-area átrendezésére hagyatkozzunk.
   * Explicit függőleges flex-sorrend biztosítja, hogy a kép mindig
   * megjelenjen a szöveg és az információs/CTA-rész között.
   */
  .thema21-home-current,
  .thema21-home-current--image-left,
  .thema21-home-current--no-image {
    display: flex !important;
    flex-direction: column;
    min-height: 0;
  }

  .thema21-home-current__content {
    order: 1;
  }

  .thema21-home-current__media {
    order: 2;
    position: relative !important;
    display: block !important;
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }

  .thema21-home-current__footer {
    order: 3;
  }

  .thema21-home-current__media > img.thema21-home-current__image {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  .thema21-home-current__content {
    padding: 24px 22px 10px;
    align-self: auto;
  }

  .thema21-home-current:not(.thema21-home-current--has-footer) .thema21-home-current__content {
    padding-bottom: 26px;
  }

  .thema21-home-current__footer {
    display: block;
    margin: 0 22px;
    padding: 14px 0 24px;
  }

  .thema21-home-current__title { font-size: clamp(26px, 8vw, 34px); }

  .thema21-home-current__text {
    display: block;
    margin-top: 13px;
    overflow: visible;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: initial;
  }

  .thema21-home-current__meta {
    display: grid;
    gap: 6px;
  }

  .thema21-home-current__meta-row {
    display: grid;
    grid-template-columns: minmax(80px, max-content) minmax(0, 1fr);
    gap: 10px;
  }

  .thema21-home-current__meta dt { font-size: 9px; }
  .thema21-home-current__meta dd { font-size: 13px; }

  .thema21-home-current__actions { margin-top: 18px; }
}

/* =========================================================
   Szerzőink – [thema21_home_authors]
========================================================= */

.thema21-home-authors {
  width: 100%;
}

.thema21-home-authors__heading {
  margin-bottom: 26px;
}

.thema21-home-authors__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 38px);
}

.thema21-home-authors .thema21-editorial-member {
  min-width: 0;
  text-align: center;
}

.thema21-home-authors .thema21-editorial-photo-link {
  display: block;
  width: min(100%, 168px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 17px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--c-contrast-50, #f6f6f6);
}

.thema21-home-authors .thema21-editorial-photo {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  transition: transform .25s ease, opacity .25s ease;
}

.thema21-home-authors .thema21-editorial-photo-link:hover .thema21-editorial-photo,
.thema21-home-authors .thema21-editorial-photo-link:focus-visible .thema21-editorial-photo {
  transform: scale(1.025);
}

.thema21-home-authors .thema21-editorial-name {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
  line-height: 1.2;
}

.thema21-home-authors .thema21-editorial-name a {
  color: var(--c-contrast, #111);
}

.thema21-home-authors .thema21-editorial-name a:hover,
.thema21-home-authors .thema21-editorial-name a:focus-visible {
  color: var(--c-main, #c8a96a);
}

.thema21-home-authors .thema21-editorial-role {
  margin-top: 7px;
  color: var(--c-post-meta, var(--c-contrast-500, rgba(0, 0, 0, .55)));
  font-size: 13px;
  line-height: 1.5;
  opacity: 1;
}


@media (max-width: 1023px) {
  .thema21-home-authors__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .thema21-home-issue {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 22px;
    padding: 24px;
  }

  .thema21-home-issue__cover {
    width: 110px;
    max-width: 110px;
    align-self: start;
  }

  .thema21-home-issue__number {
    font-size: clamp(48px, 13vw, 64px);
  }

  .thema21-home-issue__meta {
    display: grid;
    gap: 3px;
    margin-top: 12px;
  }

  .thema21-home-issue__meta span + span::before {
    display: none;
  }

  .thema21-home-issue__actions {
    display: grid;
    gap: 7px;
    align-items: start;
    margin-top: 14px;
    padding-top: 12px;
  }

  .thema21-home-authors__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }
}

@media (max-width: 480px) {
  /* Keep the cover beside the issue details on phones; links get a full row. */
  .thema21-home-issue {
    grid-template-columns: clamp(82px, 24vw, 110px) minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 9px;
    padding: 20px 16px;
    align-items: start;
  }

  .thema21-home-issue__cover {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 100%;
    max-width: 110px;
  }

  .thema21-home-issue__content {
    display: contents;
  }

  .thema21-home-issue__kicker {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
    font-size: 10px;
    letter-spacing: .1em;
  }

  .thema21-home-issue__number {
    grid-column: 2;
    grid-row: 2;
    font-size: clamp(32px, 10vw, 48px);
  }

  .thema21-home-issue__meta {
    grid-column: 2;
    grid-row: 3;
    margin-top: 0;
    font-size: 13px;
  }

  .thema21-home-issue__actions {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 5px;
  }

  .thema21-home-authors__grid {
    grid-template-columns: 1fr;
  }
}


/* News Focus – Théma21 rovatblokk: desktopon több hely a három kisebb cikknek. */
@media (min-width: 941px) {
  .block-news-focus .loop-news-focus.thema21-news-focus-balanced {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}


/* =========================================================
   SmartMag cikkmeta – Théma21 ACF szerzők a kezdőlapon
========================================================= */

.thema21-smartmag-authors {
  min-width: 0;
}

.thema21-smartmag-authors a {
  color: inherit;
  text-decoration: none;
}

.thema21-smartmag-authors a:hover,
.thema21-smartmag-authors a:focus-visible {
  color: var(--c-main, #c8a96a);
  text-decoration: underline;
  text-underline-offset: .15em;
}

/* Szerkesztőségi fallback: ugyanaz a SmartMag author-tipográfia, de nem link. */
.thema21-smartmag-authors--editorial .thema21-smartmag-author-label {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

/* =========================================================
   Aktuális – automatikus sötét mód
   1.7.44: a light variáns a webhely dark scheme-jében is
   kontrasztos sötét panelként jelenik meg. Az explicit --dark
   variáns természetesen minden módban sötét marad.
========================================================= */
.s-dark .thema21-home-current,
[data-scheme="dark"] .thema21-home-current,
body.dark .thema21-home-current {
  --t21-current-bg: #151515;
  --t21-current-fg: #f7f5f0;
  --t21-current-muted: rgba(255, 255, 255, .72);
  --t21-current-line: rgba(255, 255, 255, .17);
  --t21-current-accent: var(--c-main, #c8a96a);

  background: var(--t21-current-bg) !important;
  color: var(--t21-current-fg) !important;
  border-color: var(--t21-current-line) !important;
  border-top-color: var(--t21-current-accent) !important;
}

.s-dark .thema21-home-current__title,
.s-dark .thema21-home-current__meta dd,
[data-scheme="dark"] .thema21-home-current__title,
[data-scheme="dark"] .thema21-home-current__meta dd,
body.dark .thema21-home-current__title,
body.dark .thema21-home-current__meta dd {
  color: var(--t21-current-fg) !important;
}

.s-dark .thema21-home-current__text,
[data-scheme="dark"] .thema21-home-current__text,
body.dark .thema21-home-current__text {
  color: var(--t21-current-muted) !important;
}

.s-dark .thema21-home-current__footer,
[data-scheme="dark"] .thema21-home-current__footer,
body.dark .thema21-home-current__footer {
  border-top-color: var(--t21-current-line) !important;
}

.s-dark .thema21-home-current__kicker,
.s-dark .thema21-home-current__meta dt,
[data-scheme="dark"] .thema21-home-current__kicker,
[data-scheme="dark"] .thema21-home-current__meta dt,
body.dark .thema21-home-current__kicker,
body.dark .thema21-home-current__meta dt {
  color: var(--t21-current-accent) !important;
}
