/* ============================================================
   GRID
============================================================ */
.munkak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 380px);
  gap: 28px;
  padding: 20px 0;
  justify-content: center;
}


/* ============================================================
   KÁRTYA
============================================================ */
.munka-card {
  background: #181c24;
  color: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(0,0,0,0.30);
  transition: .25s ease;
  position: relative;
}

.munka-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
}

/* Bővített nézet – már nem növeli a kártya méretét */
.munka-card.expanded {
  z-index: 10;
}


/* ============================================================
   SZŰRÉS UTÁN GRID ÚJRARENDEZÉS (NEM LYUKAD KI)
============================================================ */
.munka-card.hide {
  opacity: 0;
  pointer-events: none;
  display: none !important;
  transition: .25s ease;
}


/* ============================================================
   GALÉRIA (fix magasság + object-fit: cover!)
============================================================ */
.munka-gallery {
    width: 100%;
    height: 240px; /* ← magasabb lett, szebb */
    overflow: hidden;
    position: relative;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}


.gallery-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: none;
}

.gallery-img.active {
  display: block;
}

/* Galéria nyilak */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: none;
  color: #fff;
  font-size: 20px;
  padding: 6px 12px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: .3s;
}

.munka-gallery:hover .gallery-prev,
.munka-gallery:hover .gallery-next {
  opacity: 1;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }


/* ============================================================
   NINCS KÉP BLOKK
============================================================ */
.munka-thumb.no-image {
  height: 240px;
  background: linear-gradient(135deg,#202540,#0b1230);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #ddd;
  font-size: 1rem;
}


/* ============================================================
   TARTALOM
============================================================ */
.munka-inner {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.munka-title {
  font-size: 1.2rem;
  font-weight: 700;
}


/* ============================================================
   CLAMP LEÍRÁS + FIX HELY A “BŐVEBBEN” SORNAK
============================================================ */
.munka-desc-wrapper {
  display: flex;
  flex-direction: column;
}

.munka-desc {
  font-size: .95rem;
  line-height: 1.5;
  opacity: .9;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: max-height .3s ease;
  max-height: 72px;
  margin-bottom: 4px;
}

/* Nyitott állapot */
.munka-desc.expand {
  -webkit-line-clamp: unset;
  max-height: 900px;
}

.munka-desc-footer {
  height: 22px;
  margin-top: 4px;
}

/* Bővebben gomb */
.show-more {
  display: inline-block;
  visibility: visible;
  line-height: 22px;
  color: #1bc2ca;
  font-size: .9rem;
  cursor: pointer;
  font-weight: 600;
}

.show-more.empty {
  visibility: hidden;
}

.show-more:hover {
  color: #27e0ef;
}


/* ============================================================
   META
============================================================ */
.munka-meta {
  list-style: none;
  padding: 15px 0 80px;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin: 0 0 1.5em 0 !important;
}

.munka-meta li {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.munka-meta li .meta-icon {
  width: 24px;
  min-width: 24px;
  font-size: 1rem;
}

.munka-meta strong {
  margin-right: 4px;
  font-weight: 600;
}


/* ============================================================
   CTA GOMB
============================================================ */
.munka-btn {
  background: #26a65b;
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  position: absolute;
  left: 22px;
  bottom: 22px;
  transition: .3s;
}

.munka-btn:hover {
  background: #2dc96f;
}


/* ============================================================
   KATEGÓRIA SZŰRŐ
============================================================ */
.munkak-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #1d222c;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  cursor: pointer;
  transition: .25s;
  font-size: .95rem;
  font-weight: 600;
}

.filter-btn:hover {
  background: #242a36;
  border-color: rgba(255,255,255,0.22);
}

.filter-btn.active {
  background: #1bc2ca;
  color: #000;
  border-color: #1bc2ca;
  box-shadow: 0 0 14px rgba(27,194,202,0.45);
}

.filter-btn .f-img {
  width: 0; /* kikapcsolva mert nem kell kép */
  height: 0;
  display: none;
}

.filter-btn .f-title {
  flex-grow: 1;
}

.filter-btn .f-count {
  background: rgba(255,255,255,0.12);
  padding: 3px 10px;
  border-radius: 8px;
  font-size: .85rem;
}

.filter-btn.active .f-count {
  background: rgba(0,0,0,0.15);
  color: #000;
}

/* ============================================================
   BŐVEBBEN – LENYITÁS NEM NYÚJTHATJA MEG A KÁRTYÁT
============================================================ */

.munka-card {
  height: auto;
  overflow: visible;
}

.munka-desc-wrapper {
  position: relative;
}

/* A teljes szöveg saját rétegben nyílik le → nem nyújtja a kártyát */
.munka-desc.expand {
  position: relative;
  z-index: 20;
  background: #181c24;
  padding-bottom: 10px;
}

/* A kártya többi része marad eredeti méretű */
.munka-card.expanded {
  overflow: visible;
}


/* ====================================================================
   MOBIL – ÚJ KATEGÓRIA SZŰRŐ DIZÁJN
   ==================================================================== */

@media(max-width: 768px) {

  /* Wrapper: 30px oldaltartás */
  .munkak-filters {
    padding: 0 30px;
    gap: 18px;
    display: grid;
  }

  /* Összes gomb: full width */
  .filter-btn[data-cat="all"] {
    grid-column: 1 / -1;           /* teljes sor */
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* A másik 4 kategória → két oszlop */
  .filter-btn:not([data-cat="all"]) {
    width: 100%;
  }

  .munkak-filters {
    grid-template-columns: 1fr 1fr;   /* két oszlop */
  }

  /* A gombok vizuálisan tágabbak mobilon */
  .filter-btn {
    padding: 14px 10px;
    border-radius: 14px;
    font-size: 1rem;
    justify-content: center;
    text-align: center;
  }

  /* Számláló mobilon kisebb legyen */
  .filter-btn .f-count {
    font-size: .8rem;
    padding: 3px 8px;
  }
}


