/* TEST: 2026-02-05 13:50 */
/* ============================================
   NOVELLÁK – TÉMA OLDAL (1 oszlop fixen)
   ============================================ */

/* ===== Rács: mindig 1 oszlop, középen ===== */
.novellak-grid {
  display: flex;
  flex-direction: column;
  align-items: center;       /* minden kártya középen */
  gap: 1.5rem;
  margin: 1.5rem auto 0;
  max-width: 900px;          /* teljes oldal szélesség korlátozása */
  padding: 0 0.75rem;
}

/* ===== Alap kártya – 1 oszlopos fix ===== */
.novella-kartya {
  position: relative;
  width: 100%;
  max-width: 800px;          /* PC-n is 1 oszlop, de ne legyen túl széles */
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* ============================================
   BANNER FEJLÉC — UGYANAZ, MINT A VERSEKNÉL
   ============================================ */

.card-header.banner-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0.9rem;
  height: 140px;
  color: #ffffff;
}

/* Ha van háttérkép */
.card-header.banner-header.has-thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Ha NINCS kép → sötét átmenet */
.card-header.banner-header.no-thumb {
  background: linear-gradient(135deg, #4a4a4a, #2f2f2f);
  color: #ffffff;
}

/* Cím a bannerben */
.card-header.banner-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.card-header.banner-header h2 a {
  color: #ffffff;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.card-header.banner-header h2 a:hover {
  text-decoration: underline;
}

/* ============================================
   KÁRTYATARTALOM
   ============================================ */

.novella-kartya .nmeta {
  margin: 0.4rem 0;
  font-size: 0.9rem;
  text-align: center;
}

/* Kivonat blokk */
.novella-kartya pre {
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: inherit;
  line-height: 1.6;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
  overflow-wrap: break-word;
}

/* „Tovább olvasom…” gomb */
.novella-kartya a.button.special {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .6rem 1rem;
  border-radius: 10px;
  background: #eaf3ff;
  border: 1px solid #cfe2ff;
  color: #0b5ed7 !important;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  margin-top: .6rem;
  margin-bottom: .6rem;    /* <<< ÚJ! – adunk alsó margót */
  align-self: center;
  box-shadow: 0 2px 6px rgba(99,179,255,.2);
  transition: background .2s, border-color .2s, box-shadow .2s, transform .02s;
}

.novella-kartya a.button.special:hover {
  background: #e0edff;
  border-color: #bcd6ff;
}
.novella-kartya a.button.special:active { transform: translateY(1px); }
.novella-kartya a.button.special:focus-visible { outline: 2px solid #8ec1ff; outline-offset: 2px; }

/* ============================================
   META: lájkok + nézettség
   ============================================ */

.meta-views,
.meta-likes {
  margin: 0 0.25rem;
  font-weight: 600;
}

/* ============================================
   KIEMELT KÁRTYA
   ============================================ */

.novella-kartya.kiemelt {
  border-color: #3399ff;
  box-shadow:
    0 0 0 1px rgba(51,153,255,0.15),
    0 4px 10px rgba(0,0,0,0.06);
}

.badge-center {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #3399ff;
  color: #fff;
  padding: 3px 10px;
  font-size: 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);

  z-index: 20;           /* <<< EZ HIÁNYZOTT */
  pointer-events: none;  /* ne takarja a kattintást a címen */
}

/* ============================================
   KORHATÁR DOBOZ
   ============================================ */

.korhatar-box {
  background: #ffe6e6;
  border-left: 4px solid #cc0000;
  padding: 8px 10px;
  margin: 6px 0 10px 0;
  font-size: 0.9rem;
  color: #660000;
}

/* ============================================
   MOBIL FINOMHANGOLÁS
   ============================================ */

@media (max-width: 480px) {
  .novella-kartya pre {
    padding: 0.6rem;
    font-size: 0.95rem;
  }
  .card-header.banner-header {
    height: 120px;
    padding: 0.6rem 0.75rem;
  }
  .card-header.banner-header h2 {
    font-size: 1rem;
  }
}

/* ===== LAPOZÁS – UGYANAZ, MINT A VERSEK-TÉMA OLDALON ===== */

.lapozas {
  margin: 2rem 0 1rem;
  text-align: center;
}

.lapozas .pagination {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* Alap gomb / buborék */
.lapozas .page {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #c3d8f5;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  background: #f5f8ff;
  color: #1f4d7b;
  min-width: 2.1rem;
  text-align: center;
  box-sizing: border-box;
}

/* Linkek (kattinthatók) */
.lapozas a.page {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lapozas a.page:hover {
  background: #e1edff;
  border-color: #9fbdf1;
  color: #15355a;
}

/* Aktuális oldal */
.lapozas .page.current {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #ffffff;
  font-weight: 600;
}

/* Előző / Következő */
.lapozas .page.prev,
.lapozas .page.next {
  padding-inline: 0.9rem;
}

/* Letiltott állapot */
.lapozas .page.disabled {
  background: #f0f0f0;
  border-color: #dddddd;
  color: #9b9b9b;
  cursor: default;
}

/* Három pont */
.lapozas .page.ellipsis {
  border: none;
  background: transparent;
  color: #7a8aa5;
}

/* Mobil finomhangolás */
@media (max-width: 600px) {
  .lapozas {
    margin-top: 1.5rem;
  }
  .lapozas .page {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
  .lapozas .page.prev,
  .lapozas .page.next {
    padding-inline: 0.7rem;
  }
}

/* ============================================
   SZŰRŐLINKEK (Legújabb, Legrégebbi, stb.)
   VERSEK STÍLUSÁVAL MEGEGYEZŐEN
   ============================================ */

.szuro-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.5rem auto 1rem;
}

.szuro-container a {
  display: inline-block;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;         /* kapszula stílus */
  border: 1px solid #d0d0d0;
  background: #f5f5f5;
  color: #444;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* Hover */
.szuro-container a:hover {
  background: #e2e2e2;
  border-color: #bbb;
}

/* Aktív (kiválasztott) */
.szuro-container a.active {
  background: #444;
  border-color: #444;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Mobil finomhangolás */
@media (max-width: 480px) {
  .szuro-container a {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
  }
}

.kiemelt-szerzo-ikon {
  margin-left: 4px;
  font-size: 0.85em;
  color: #1e90ff;
  vertical-align: middle;
}


/* ===== Meta-blokk egységes elrendezés ===== */

.nmeta {
  margin: .4rem 0 .6rem;
  font-style: normal;
}

.nmeta em {
  font-style: normal;
  display: block;
}

/* 1. sor – szerző középen */
.meta-author {
  display: block;
  text-align: center;
  margin-bottom: .35rem;
  font-size: .95rem;
}

.meta-author strong {
  font-weight: 700;          /* "Írta:" félkövér */
}

.meta-author a {
  color: #007bff;            /* szerző link kék */
  font-weight: 700;          /* szerző félkövér */
  text-decoration: none;
}

.meta-author a:hover {
  text-decoration: underline;
}

.kiemelt-szerzo-ikon {
  font-size: .9rem;
  margin-left: 4px;
  vertical-align: middle;
}

/* Közös meta-stílus */
.nmeta {
  margin: .4rem 0 .6rem;
  font-style: normal;
}

.nmeta em {
  font-style: normal;
  display: block;
}

/* 1. sor: szerző középen */
.meta-author {
  display: block;
  text-align: center;
  margin-bottom: .35rem;
  font-size: .95rem;
}

.meta-author strong {
  font-weight: 700;
}

.meta-author a {
  color: #007bff;
  font-weight: 700;
  text-decoration: none;
}

.meta-author a:hover {
  text-decoration: underline;
}

/* 2. sor: flex sor */
.meta-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
}

/* Bal oldal: dátum + téma */
.meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-date b {
  font-weight: 700;
}

.meta-topic strong {
  font-weight: 700;
}

/* Jobb oldal: like + olvasás */
.meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-likes b,
.meta-views b {
  font-weight: 700;
}

@media (max-width: 480px) {
  .meta-info-row {
    flex-wrap: nowrap;
    font-size: .85rem;
  }
}

.tema-leiras {
  font-size: 0.95rem;
  color: #555;
  max-width: 800px;
  margin: 0.75rem auto 1.25rem;
  line-height: 1.55;
  padding: 0 0.5rem;
  text-align: center;
}


/* Témaoldal főcímsor */
.post .title h1 {
  font-size: 1.9rem;      /* vagy amit szépnek látsz: 2rem, 2.1rem... */
  letter-spacing: 0.12em; /* ha tetszik ez a "széthúzott" hatás */
  text-transform: uppercase;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.5rem;  /* kb. 24px */
    line-height: 1.25;
    margin-top: 0.75rem;
  }
}



/* ===== Felső SEO szöveg (tema_leiras) – sorkizárt, egységes ===== */

.tema-leiras {
  text-align: justify;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 1100px;
  margin: 0.75rem auto 0;
}

/* ===== Alsó SEO szöveg (seo2) – sorkizárt ===== */

.tema-seo-bottom-text {
  text-align: justify !important;
  line-height: 1.7;
  hyphens: auto;
}

/* ===== Téma top kép (banner) ===== */

.tema-topkep {
  max-width: 1200px;
  margin: 0 auto 1.2rem;
  overflow: hidden;
  border-radius: 10px;
  height: 200px;              /* kicsit magasabb, hogy több férjen bele */
}

.tema-topkep img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Kisebb felső padding a kártya törzsben – versek + novellák
   (tedd a CSS legaljára, hogy ez érvényesüljön) */
.vers-kartya .card-body,
.novella-kartya .card-body {
  padding-top: 0.25rem !important;   /* jóval kisebb, mint 0.55rem */
}

/* ===== Témaoldal főcímsor ===== */

.post .title h1 {
  font-size: 1.9rem;      /* vagy amit szépnek látsz: 2rem, 2.1rem... */
  letter-spacing: 0.12em; /* ha tetszik ez a "széthúzott" hatás */
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .post .title h1 {
    font-size: 1.5rem;  /* kb. 24px */
    line-height: 1.25;
    margin-top: 0.75rem;
  }
}

@media (max-width: 768px) {
  .tema-topkep img {
    height: 180px !important;     /* ajánlott mobil banner magasság */
    object-fit: cover !important; /* levágja az alsó/felső részt, megtartja a fókuszt */
    object-position: center top;  /* a kép teteje legyen látható */
  }
}



/* ===== MOBIL META FIX (novellak-tema.css): dátum + hosszú téma ne torzítson ===== */
@media (max-width: 520px){

  .meta-info-row{
    display: flex;
    flex-wrap: wrap !important;      /* felülírja a nowrap-ot */
    justify-content: center;
    align-items: center;
    gap: 6px 10px;
    text-align: center;
    min-width: 0;
  }

  .meta-left,
  .meta-right{
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;                     /* törés után legyen külön sor, középen */
    justify-content: center;
  }

  .meta-date{
    white-space: nowrap;             /* dátum maradjon egyben */
  }

  .meta-topic,
  .meta-topic a{
    display: inline-block;
    margin: 0 auto;
    overflow-wrap: anywhere;         /* hosszú téma törhessen */
    word-break: break-word;
    text-align: center;
  }
}


.novella-kartya a.button.special{
  background: #ffffff !important;
  border: 1px solid #d0d0d0 !important;
  color: #333 !important;
}
.novella-kartya a.button.special:hover{
  background: #f5f5f5 !important;
  border-color: #c0c0c0 !important;
}



/* === Nmeta (novellak-cimszo mobil fix) === */
.nmeta{
  display: block;
  width: 100%;
}

.nmeta em{
  display: block;        /* az <em> alapból inline -> ez szokta szétcseszni mobilon */
  width: 100%;
  font-style: normal;    /* opcionális: ne legyen dőlt */
}

/* 1. sor: szerző középen */
.nmeta .meta-author{
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. sor: bal (dátum+téma) + jobb (like+nézettség) */
.nmeta .meta-info-row{
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.nmeta .meta-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;          /* kell az ellipsis-hez */
}

.nmeta .meta-right{
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;   /* a számok ne essenek szét */
}

/* téma ne nyomja szét a sort */
.nmeta .meta-topic{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobilon: inkább két sor legyen (bal felül, jobb alul jobbra) */
@media (max-width: 420px){
  .nmeta .meta-info-row{
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nmeta .meta-right{
    justify-content: flex-end;
  }
}

/* ===== Nmeta mobil (novellak-cimszo) ===== */
@media (max-width: 420px){

  /* A meta blokk legyen stabil, teljes széles */
  .nmeta, .nmeta em{
    display:block;
    width:100%;
  }

  /* Szerző sor: lehessen törni, ne vágja le mobilon */
  .nmeta .meta-author{
    text-align:center;
    white-space: normal;     /* <-- EZ A KULCS mobilon */
    overflow: visible;
    text-overflow: clip;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  /* 2. sor: rakjuk két sorba (bal felül, jobb alul) */
  .nmeta .meta-info-row{
    display:flex;
    flex-direction: column;  /* <-- mobilon oszlop */
    align-items: stretch;
    gap: 6px;
  }

  /* Bal sor: dátum + téma -> törhessen */
  .nmeta .meta-left{
    display:flex;
    flex-wrap: wrap;         /* <-- törhessen két sorba is */
    gap: 8px;
    min-width: 0;
  }

  /* Téma: ne ellipsis legyen, hanem rendesen törjön */
  .nmeta .meta-topic{
    white-space: normal;     /* <-- EZ A KULCS mobilon */
    overflow: visible;
    text-overflow: clip;
  }

  /* Jobb sor: like + nézettség jobbra igazítva */
  .nmeta .meta-right{
    display:flex;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;     /* ezek maradhatnak egy sorban */
  }

  /* opcionális: picit kisebb meta szöveg mobilon */
  .nmeta{
    font-size: 0.95em;
  }
}

/* ===== nmeta mobil FIX: stabil bal/jobb elrendezés ===== */
@media (max-width: 420px){

  .nmeta, .nmeta em{
    display:block;
    width:100%;
  }

  /* 1. sor: szerző */
  .nmeta .meta-author{
    display:block;
    text-align:center;
    margin-bottom:6px;
    white-space: normal;
  }

  /* 2. sor: BAL (dátum+téma) | JOBB (like+nézettség) */
  .nmeta .meta-info-row{
    display:grid;
    grid-template-columns: 1fr auto; /* bal kitölti, jobb csak amennyi kell */
    column-gap: 10px;
    row-gap: 4px;
    align-items:start;
  }

  .nmeta .meta-left{
    min-width:0;
    display:flex;
    flex-wrap:wrap;       /* dátum + téma törhessen */
    gap: 8px 10px;
    align-items:flex-start;
  }

  /* dátum ikon + szöveg együtt maradjon */
  .nmeta .meta-date{
    display:inline-flex;
    gap:6px;
    align-items:flex-start;
  }

  /* téma ne tolja szét a layoutot */
  .nmeta .meta-topic{
    display:inline-block;
    max-width:100%;
    white-space: normal;  /* ha hosszú, törhessen */
  }

  /* JOBB oldal: ❤️ + 👁️ mindig egy sorban, jobbra */
  .nmeta .meta-right{
    justify-self:end;
    display:flex;
    gap:10px;
    white-space: nowrap;
    align-items:center;
  }

  /* biztosítsuk, hogy ne legyenek block-ok */
  .nmeta .meta-right .meta-likes,
  .nmeta .meta-right .meta-views{
    display:inline-flex;
    gap:4px;
    align-items:center;
  }
}

/* ===== nmeta mobil: ugyanaz mint novellak-tema (dátum+téma sor, like+view külön sor) ===== */
@media (max-width: 420px){

  .nmeta, .nmeta em{
    display:block;
    width:100%;
  }

  /* 2-3. sor rácsos elrendezés */
  .nmeta .meta-info-row{
    display:grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left left"
      "right right";
    row-gap: 4px;
  }

  /* 2. sor: balra dátum, jobbra téma */
  .nmeta .meta-left{
    grid-area:left;
    display:flex;
    justify-content: space-between;  /* <-- EZ adja a „bal/jobb” hatást */
    align-items:center;
    gap: 10px;
    width:100%;
  }

  .nmeta .meta-date{
    display:inline-flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
  }

  .nmeta .meta-topic{
    display:inline-block;
    white-space:nowrap;              /* ha kell, vedd normal-ra */
    text-align:right;
  }

  /* 3. sor: középen ❤️ + 👁️ egy sorban */
  .nmeta .meta-right{
    grid-area:right;
    display:flex;
    justify-content:center;          /* <-- középre */
    align-items:center;
    gap: 14px;
    white-space:nowrap;              /* <-- sose essen 2 sorba */
    width:100%;
  }

  .nmeta .meta-right .meta-likes,
  .nmeta .meta-right .meta-views{
    display:inline-flex;             /* <-- nehogy block legyen valahol felülírva */
    align-items:center;
    gap:4px;
  }
}


/* ===== novellak-cimszo: mobil meta fix (dátum+téma sor, likes/views külön sor) ===== */
@media (max-width: 420px){

  /* stabil blokk-környezet */
  .nmeta, .nmeta em{
    display:block !important;
    width:100% !important;
  }

  /* 2. sor konténer: 2 sorra bontjuk */
  .nmeta em > .meta-info-row{
    display:grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    row-gap: 4px !important;
    width:100% !important;
  }

  /* 1. sor: dátum balra, téma jobbra (ugyanazon a soron belül) */
  .nmeta em > .meta-info-row > .meta-left{
    display:grid !important;
    grid-template-columns: auto 1fr !important;
    align-items:center !important;
    column-gap: 10px !important;
    width:100% !important;
  }

  .nmeta .meta-date{
    white-space:nowrap !important;
  }

  .nmeta em > .meta-info-row > .meta-left > .meta-topic{
    justify-self:end !important;
    text-align:right !important;
    white-space:nowrap !important; /* ha hosszú téma van és törhet: normal-ra */
  }

  /* 2. sor: likes/views középen, egy sorban */
  .nmeta em > .meta-info-row > .meta-right{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    gap: 14px !important;
    white-space:nowrap !important;
    width:100% !important;
  }

  .nmeta em > .meta-info-row > .meta-right > .meta-likes,
  .nmeta em > .meta-info-row > .meta-right > .meta-views{
    display:inline-flex !important;
    align-items:center !important;
    gap:4px !important;
  }
}