/* ============================================================
   GYEREKMESÉK – KIEGÉSZÍTŐ STÍLUS
   Alap: /mesek + /mesek-tema
   ============================================================ */

/* ============================================================
   KOROSZTÁLY VÁLASZTÓ ( /gyerekmesek )
   ============================================================ */

.kat-section-title {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.kat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 16px;
}

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

@media (min-width: 960px) {
  .kat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.kat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  transition: box-shadow .2s ease, transform .05s ease, border-color .2s ease;
}

.kat-card:hover {
  box-shadow: 0 5px 14px rgba(0,0,0,.08);
  transform: translateY(-1px);
  border-color: #d1d5db;
}

.kat-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.kat-name span {
  font-weight: 400;
  color: #6b7280;
}

.kat-count {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: #374151;
  font-size: .9em;
  white-space: nowrap;
}

/* ============================================================
   MESE LISTA – 1 OSZLOPOS ( /gyerekmesek/{slug} )
   ugyanaz, mint a /mesek-tema
   ============================================================ */

.mesek-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin: 1.5rem auto 0;
  max-width: 900px;
  padding: 0 0.75rem;
}

.mese-kartya {
  position: relative;
  width: 100%;
  max-width: 800px;
  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;
}

/* ============================================================
   FEJLÉC (banner)
   ============================================================ */

.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;
}

.card-header.banner-header.has-thumb {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-header.banner-header.no-thumb {
  background: linear-gradient(135deg, #4a4a4a, #2f2f2f);
}

.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;
}

/* ============================================================
   META BLOKK
   ============================================================ */

.mese-kartya .nmeta {
  margin: 0.6rem 1rem 0.4rem;
  font-size: 0.9rem;
  color: #555;
}

.mese-kartya .nmeta-author-line {
  text-align: center;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.mese-kartya .nmeta-author-label {
  font-weight: 600;
  color: #333;
  margin-right: 4px;
}

.mese-kartya .nmeta-author-link {
  color: #007bff;
  font-weight: 700;
  text-decoration: none;
}

.mese-kartya .nmeta-author-link:hover {
  text-decoration: underline;
}

.mese-kartya .nmeta-info-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mese-kartya .nmeta-info-left,
.mese-kartya .nmeta-info-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mese-kartya .nmeta-info-right span {
  font-weight: 600;
}

/* ============================================================
   KIVONAT
   ============================================================ */

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

/* ============================================================
   GOMB
   ============================================================ */

.mese-kartya a.button.special {
  align-self: center;
  margin: 0.6rem 0 0.9rem;
  padding: .6rem 1.2rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  color: #333 !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: background .2s, border-color .2s, box-shadow .2s, transform .02s;
}

.mese-kartya a.button.special:hover {
  background: #f5f5f5;
  border-color: #c0c0c0;
}

.mese-kartya a.button.special:active {
  transform: translateY(1px);
}

/* ============================================================
   KIEMELT
   ============================================================ */

.mese-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;
  pointer-events: none;
}

/* ============================================================
   LAPOZÁS (ugyanaz a feeling)
   ============================================================ */

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

.lapozas .pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lapozas .page {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #c3d8f5;
  background: #f5f8ff;
  color: #1f4d7b;
  text-decoration: none;
  font-size: 0.9rem;
}

.lapozas .page.current {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #ffffff;
  font-weight: 600;
}

/* ============================================================
   MOBIL
   ============================================================ */

@media (max-width: 520px) {
  .card-header.banner-header {
    height: 120px;
  }

  .card-header.banner-header h2 {
    font-size: 1rem;
  }

  .mese-kartya pre {
    padding: 0.6rem;
    font-size: 0.95rem;
  }
}

.seo-footer {
  max-width: 800px;
  margin: 2rem auto 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
  text-align: justify;
}

/* ===== GYEREKMESÉK – SZŰRŐK (BIZTOSAN ÉRVÉNYESÜLJÖN) ===== */
.post .szuro-container{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  gap:.6rem !important;
  margin: .75rem auto 1.25rem !important;
}

.post .szuro-container a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:.42rem .9rem !important;
  border-radius:999px !important;
  border:1px solid #d0d0d0 !important;
  background:#f5f5f5 !important;
  color:#444 !important;
  text-decoration:none !important;
  font-size:.9rem !important;
  line-height:1.2 !important;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s !important;
}

.post .szuro-container a:hover{
  background:#e9e9e9 !important;
  border-color:#bdbdbd !important;
}

.post .szuro-container a.active{
  background:#444 !important;
  border-color:#444 !important;
  color:#fff !important;
  font-weight:700 !important;
  box-shadow:0 2px 6px rgba(0,0,0,.15) !important;
}

.gyerek-intro{
  max-width: 900px;
  margin: .75rem auto 1rem;
  font-size: .98rem;
  line-height: 1.65;
  color: #444;
  text-align: justify;
}

@media (max-width: 640px){
  .gyerek-intro{
    font-size: .95rem;
    text-align: left;
  }
}

.kat-name{
  display: inline-block;
  line-height: 1.25;
}
.kat-name span{
  display:block;
  line-height: 1.15;
}

/* ===== GYEREKMESÉK / LISTA: meta bal oldal sorokra ===== */
.mese-kartya .nmeta-info-left{
  display: flex !important;
  flex-direction: column !important; /* <-- ez a lényeg */
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0;
}

/* mindhárom meta elem külön sor */
.mese-kartya .nmeta-info-left .meta-date,
.mese-kartya .nmeta-info-left .meta-topic,
.mese-kartya .nmeta-info-left .meta-age{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  line-height: 1.2;
}

/* téma tördelés (hosszú témanév se folyjon túl) */
.mese-kartya .nmeta-info-left .meta-topic{
  flex-wrap: wrap;
}
.mese-kartya .nmeta-info-left .meta-topic a,
.mese-kartya .nmeta-info-left .meta-topic strong{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* mobilon legyen középen a 3 sor */
@media (max-width: 520px){
  .mese-kartya .nmeta-info-left{
    align-items: center !important;
    text-align: center;
  }
}

/* ===== META: DESKTOP/LAPTOP alap (egymás mellett, szépen) ===== */
.mese-kartya .nmeta-info-line{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mese-kartya .nmeta-info-left{
  display: flex !important;
  flex-direction: row !important;      /* <-- laptopon vissza sorba */
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 14px !important;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.mese-kartya .nmeta-info-right{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important; /* <-- jobbra */
  gap: 10px !important;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* a bal oldali elemek laptopon maradjanak egy sorban */
.mese-kartya .nmeta-info-left .meta-date,
.mese-kartya .nmeta-info-left .meta-topic,
.mese-kartya .nmeta-info-left .meta-age{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* hosszú témanév esetén inkább törhessen, ne nyomja szét a sort */
.mese-kartya .nmeta-info-left .meta-topic a,
.mese-kartya .nmeta-info-left .meta-topic strong{
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* ===== MOBIL: bal oldal 3 sor, statok középen alatta ===== */
@media (max-width: 520px){
  .mese-kartya .nmeta-info-line{
    justify-content: center !important;
    text-align: center !important;
  }

  .mese-kartya .nmeta-info-left{
    flex-direction: column !important;  /* <-- csak mobilon oszlop */
    align-items: center !important;
    gap: 2px !important;
    flex: 1 1 100% !important;
  }

  .mese-kartya .nmeta-info-left .meta-date,
  .mese-kartya .nmeta-info-left .meta-topic,
  .mese-kartya .nmeta-info-left .meta-age{
    white-space: normal; /* mobilon törhet */
  }

  .mese-kartya .nmeta-info-right{
    justify-content: center !important;
    flex: 1 1 100% !important;
    white-space: normal;
  }
}

/* ===== KOROSZTÁLY GRID – levegősebb, élőbb ===== */
.kat-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 18px;
}

/* Mobil */
@media (max-width: 640px){
  .kat-grid{
    grid-template-columns: 1fr;
  }
}

.kat-card{
  position: relative;
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e5e7eb;
  transition: box-shadow .2s ease, transform .06s ease;
}

.kat-card::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #7c9cff, #9fbcff);
}

.kat-card:hover{
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.kat-card[data-age="baba"]::before{
  background: linear-gradient(180deg, #ffd6e8, #ffb3d1);
}
.kat-card[data-age="ovodas"]::before{
  background: linear-gradient(180deg, #d1fae5, #a7f3d0);
}
.kat-card[data-age="kisiskolas"]::before{
  background: linear-gradient(180deg, #dbeafe, #bfdbfe);
}
.kat-card[data-age="nagyobb"]::before{
  background: linear-gradient(180deg, #ede9fe, #ddd6fe);
}

@media (max-width: 520px){
  .mese-kartya .nmeta-info-left{
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
  }

  .mese-kartya .nmeta-info-left .meta-date,
  .mese-kartya .nmeta-info-left .meta-topic,
  .mese-kartya .nmeta-info-left .meta-age{
    justify-content: center !important;
    width: 100%;
  }
}


@media (max-width: 520px){
  .mese-kartya .meta-age .meta-emoji{
    display: none !important;
  }
}