/* ==================================================================
   10 millió Fa – Projektek térkép + felugró ablak (projektek.css)
   ================================================================== */

/* --- Design tokens (scoped) --- */
.tmf-projektek,
.tmf-modal-backdrop,
.tmf-life--projektek-single {
  --color-text-primary: #193124;
  --color-text-secondary: #5d6f5a;
  --color-text-tertiary: #8a978a;
  --color-background-primary: #ffffff;
  --color-background-secondary: #eef0e6;
  --color-border-tertiary: rgba(56, 82, 68, .12);
  --color-border-secondary: rgba(56, 82, 68, .28);
  --border-radius-md: 10px;
  --border-radius-lg: 16px;
  --border-radius-xl: 20px;
  --tmf-green: #3d7a2e;
  --tmf-green-dark: #193124;
  --tmf-gold: #eebb07;
  --tmf-title: #385244;
  --tmf-serif: 'Coustard', Georgia, 'Times New Roman', serif;
  --tmf-shadow: 0 18px 50px rgba(25, 49, 36, .12);
  --tmf-shadow-soft: 0 8px 28px rgba(25, 49, 36, .08);
}

@media (prefers-color-scheme: dark) {
  .tmf-projektek,
  .tmf-modal-backdrop,
  .tmf-life--projektek-single {
    --color-text-primary: #e7ece2;
    --color-text-secondary: #aebaa9;
    --color-text-tertiary: #7e8a7c;
    --color-background-primary: #1c241e;
    --color-background-secondary: #242e25;
    --color-border-tertiary: rgba(255, 255, 255, .1);
    --color-border-secondary: rgba(255, 255, 255, .2);
    --tmf-title: #a7cf92;
    --tmf-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  }
}

/* --- Oldal szekció + ambient háttér --- */
.tmf-life--projektek {
  position: relative;
  overflow: hidden;
  padding: 36px 0 0;
  background: transparent;
}

.tmf-life--projektek::before {
  content: '';
  position: absolute;
  inset: -10% -5% 50%;
  background:
    radial-gradient(ellipse 55% 45% at 15% 15%, rgba(61, 122, 46, .14), transparent 68%),
    radial-gradient(ellipse 45% 40% at 88% 8%, rgba(238, 187, 7, .1), transparent 62%),
    radial-gradient(ellipse 70% 55% at 50% 95%, rgba(25, 49, 36, .07), transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: tmf-ambient 14s ease-in-out infinite alternate;
}

@keyframes tmf-ambient {
  from { transform: translateY(0) scale(1); opacity: .95; }
  to { transform: translateY(-12px) scale(1.02); opacity: 1; }
}

.tmf-life--projektek > .tmf-container,
.tmf-life--projektek > .tmf-projektek__list {
  position: relative;
  z-index: 3;
}

/* --- Belépő animációk --- */
.tmf-reveal {
  animation: tmf-fadeUp .75s cubic-bezier(.2, .85, .25, 1) both;
}

.tmf-reveal--d1 { animation-delay: .06s; }
.tmf-reveal--d2 { animation-delay: .12s; }
.tmf-reveal--d3 { animation-delay: .18s; }
.tmf-reveal--d4 { animation-delay: .24s; }

@keyframes tmf-fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tmf-reveal,
  .tmf-life--projektek::before { animation: none !important; }
}

/* --- Hero --- */
.tmf-projektek { font-family: inherit; color: var(--color-text-primary); }

.tmf-projektek__hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
  padding-top: 12px;
}

.tmf-projektek__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--tmf-green-dark);
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(243, 241, 225, .88));
  border: 1px solid var(--color-border-tertiary);
  box-shadow: var(--tmf-shadow-soft);
}

.tmf-h1 {
  font-family: var(--tmf-serif);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--tmf-title);
  letter-spacing: -.02em;
}

.tmf-lead {
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0 auto;
  max-width: 620px;
}

/* --- Hatás-számlálók (üveg-kártyák) --- */
.tmf-counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.mc {
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(243, 241, 225, .82));
  border-radius: var(--border-radius-lg);
  padding: 18px 18px 16px;
  border: 1px solid var(--color-border-tertiary);
  box-shadow: var(--tmf-shadow-soft);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.mc::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(238, 187, 7, .08) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}

.mc:hover {
  transform: translateY(-3px);
  box-shadow: var(--tmf-shadow);
}

.mc:hover::before { transform: translateX(120%); }

.mc .lab {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.mc .lab .ti { font-size: 15px; color: var(--tmf-green); }

.mc .num {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 400;
  color: var(--color-text-primary);
  font-family: var(--tmf-serif);
  margin-top: 4px;
  line-height: 1.1;
}

/* --- Szűrő chipek --- */
.tmf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; justify-content: center; }

.chip {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border-secondary);
  background: rgba(255, 255, 255, .7);
  color: var(--color-text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
  backdrop-filter: blur(6px);
}

.chip:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(25, 49, 36, .1); }

.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--tmf-green), #2f6324);
  border-color: var(--tmf-green);
  color: #fff;
  box-shadow: 0 6px 20px rgba(61, 122, 46, .35);
}

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* --- Térkép + panel --- */
.tmf-mapgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tmf-mapgrid__map { position: relative; }

.tmf-mapgrid__hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tmf-green-dark);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--color-border-tertiary);
  box-shadow: 0 4px 16px rgba(25, 49, 36, .1);
  pointer-events: none;
  animation: tmf-hintPulse 3s ease-in-out infinite;
}

@keyframes tmf-hintPulse {
  0%, 100% { opacity: .85; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(-2px); }
}

#mapwrap {
  position: relative;
  background: linear-gradient(160deg, #f3f1e1 0%, #e8ede0 45%, #dfe8d4 100%);
  border-radius: var(--border-radius-xl);
  padding: 14px;
  border: 1px solid var(--color-border-tertiary);
  box-shadow: var(--tmf-shadow);
  min-height: 360px;
}

#map svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 300px;
  border-radius: calc(var(--border-radius-lg) - 4px);
}

.tip {
  position: absolute;
  pointer-events: none;
  background: var(--color-background-primary);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  opacity: 0;
  transition: opacity .12s;
  white-space: nowrap;
  color: var(--color-text-primary);
  z-index: 6;
  box-shadow: var(--tmf-shadow-soft);
}

.tmf-mapgrid__panel { position: relative; }

.panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, .96), rgba(243, 241, 225, .9));
  border-radius: var(--border-radius-xl);
  padding: 20px 22px;
  min-height: 360px;
  border: 1px solid var(--color-border-tertiary);
  box-shadow: var(--tmf-shadow-soft);
  backdrop-filter: blur(8px);
}

@media (min-width: 900px) {
  .tmf-mapgrid__panel { position: sticky; top: calc(var(--header-h, 80px) + 20px); }
}

/* --- SVG marker animációk --- */
.hub { cursor: pointer; transform-box: fill-box; transform-origin: center; animation: tmf-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.pulse { transform-box: fill-box; transform-origin: center; animation: tmf-pulse 2.8s ease-out infinite; pointer-events: none; }
.child { cursor: pointer; transform-box: fill-box; transform-origin: center; animation: tmf-fan .45s cubic-bezier(.2, 1.5, .4, 1) both; }
.tmf-map-tree { transform-box: fill-box; transform-origin: center; }
.tmf-map-tree__fo { overflow: visible; }
.tmf-map-tree__fo .ti { display: block; line-height: 1; }

.tmf-map-spider-line {
  pointer-events: none;
}

@keyframes tmf-pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes tmf-pulse { 0% { transform: scale(1); opacity: .45; } 70% { transform: scale(2.6); opacity: 0; } 100% { opacity: 0; } }
@keyframes tmf-fan { from { transform: scale(0); } to { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .hub, .child, .pulse, .tmf-mapgrid__hint { animation: none !important; }
}

/* --- Panel tartalom --- */
.ptitle { font-family: var(--tmf-serif); font-size: 22px; margin: 0 0 4px; color: var(--color-text-primary); line-height: 1.2; }
.pmeta { font-size: 13px; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; margin: 0; flex-wrap: wrap; }
.bignum { font-family: var(--tmf-serif); font-size: 38px; font-weight: 400; line-height: 1; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; color: #fff; display: inline-block; white-space: nowrap; }
.prow { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--border-radius-md); cursor: pointer; border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.prow:hover { background: rgba(255, 255, 255, .75); border-color: var(--color-border-tertiary); transform: translateX(2px); }
.lnk { font-size: 13px; font-weight: 500; color: var(--tmf-green); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; background: none; border: none; padding: 0; text-decoration: none; }
.lnk:hover { text-decoration: underline; }
.btn { font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: var(--border-radius-md); border: 1px solid var(--color-border-secondary); background: transparent; color: var(--color-text-primary); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, var(--tmf-green), #2f6324); border-color: var(--tmf-green); color: #fff; box-shadow: 0 6px 18px rgba(61, 122, 46, .3); }

/* --- Jelmagyarázat --- */
.tmf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 16px;
  padding: 14px 18px;
  font-size: 12px;
  color: var(--color-text-secondary);
  justify-content: center;
  background: rgba(255, 255, 255, .55);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-border-tertiary);
  backdrop-filter: blur(6px);
}

.tmf-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* --- Projektlista (téma-kártyák, rács) --- */
.tmf-projektek__list {
  margin-top: 64px;
  padding: 0 0 72px;
  position: relative;
}

.tmf-projektek__list .tmf-section-title {
  margin-bottom: 36px;
}

.tmf-projektek__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}

.tmf-projektek__grid > .tmf-postcard {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin: 0;
  padding: 0;
  background: #f3f1e1;
  border: 1px solid rgba(56, 82, 68, .1);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--tmf-shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease;
}

.tmf-projektek__grid > .tmf-postcard:hover {
  transform: translateY(-2px);
  box-shadow: var(--tmf-shadow);
}

.tmf-projektek__grid .tmf-postcard__img {
  display: block;
  width: 200px;
  min-width: 200px;
  height: auto;
  min-height: 0;
  align-self: stretch;
  flex: 0 0 200px;
  overflow: hidden;
  border-radius: 0;
  position: relative;
  box-shadow: none;
}

.tmf-projektek__grid .tmf-postcard__img img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.tmf-projektek__grid .tmf-postcard:hover .tmf-postcard__img img { transform: scale(1.04); }

.tmf-projektek__grid .tmf-postcard__img--ph {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, #dfe8d4, #c8d4bc);
}

.tmf-projektek__grid .tmf-postcard__body {
  width: auto;
  flex: 1;
  min-width: 0;
  min-height: auto;
  margin: 0;
  padding: 18px 22px;
  background: transparent;
  border-radius: 0;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  border: none;
}

.tmf-projektek__grid .tmf-postcard__meta {
  font-size: 12px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.tmf-projektek__grid .tmf-postcard__title {
  margin: 0;
  font-family: var(--tmf-serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
}

.tmf-projektek__grid .tmf-postcard__title a {
  color: #193124;
  text-decoration: none;
}

.tmf-projektek__grid .tmf-postcard__title a:hover { color: var(--tmf-green); }

.tmf-projektek__grid .tmf-postcard__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tmf-projektek__grid .tmf-postcard__btn {
  margin-top: 4px;
  align-self: flex-start;
  padding: 10px 22px;
  border-radius: 4px;
  background: var(--tmf-green-dark);
  color: #F2F5EA;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.tmf-projektek__grid .tmf-postcard__btn:hover {
  background: #15261c;
  transform: translateY(-1px);
}

.tmf-projektek-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.tmf-projektek-badge--done { background: #3d7a2e; }
.tmf-projektek-badge--progress { background: #c08a2a; }
.tmf-projektek-badge--planned { background: #7d8f96; }

/* ==================================================================
   Felugró ablak (modal) – teljesen scope-olt
   ================================================================== */
body.tmf-modal-open { overflow: hidden; }

.tmf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 28, 20, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

.tmf-modal {
  width: 100%;
  max-width: 720px;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  animation: tmf-modal-in .45s cubic-bezier(.2, 1, .28, 1) both;
  box-shadow:
    0 4px 24px rgba(25, 49, 36, .12),
    0 32px 90px rgba(0, 0, 0, .32);
  border: 1px solid rgba(56, 82, 68, .12);
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 900px);
}

@keyframes tmf-modal-in {
  from { opacity: 0; transform: translateY(28px) scale(.96); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tmf-modal { animation: none; }
}

/* --- Hero --- */
.tmf-modal__hero {
  position: relative;
  flex: 0 0 auto;
  height: clamp(220px, 38vw, 360px);
  overflow: hidden;
  background: linear-gradient(145deg, #2a4a35 0%, #3d7a2e 45%, #5a9a48 100%);
  user-select: none;
  touch-action: none;
}

.tmf-modal__hero--empty {
  background: linear-gradient(145deg, #1a3226 0%, #2d5c38 40%, #4a8a3c 70%, #6bab52 100%);
}

.tmf-modal__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, transparent 35%, rgba(15, 28, 20, .55) 100%);
  pointer-events: none;
  z-index: 3;
}

.tmf-modal__layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tmf-modal__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tmf-modal__layer--before {
  overflow: hidden;
  width: 50%;
  z-index: 2;
}

.tmf-modal__before-inner { height: 100%; }
.tmf-modal__before-inner img { width: 100%; height: 100%; object-fit: cover; }

.tmf-modal__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.tmf-modal__placeholder-inner {
  text-align: center;
  color: rgba(255, 255, 255, .95);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tmf-modal__placeholder-inner .ti-trees {
  font-size: clamp(48px, 10vw, 72px);
  opacity: .9;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .25));
}

.tmf-modal__placeholder-trees {
  font-family: var(--tmf-serif);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 400;
  letter-spacing: -.02em;
}

.tmf-modal__placeholder-sub {
  font-size: 14px;
  opacity: .85;
}

.tmf-modal__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #fff;
  cursor: ew-resize;
  z-index: 4;
  box-shadow: 0 0 12px rgba(0, 0, 0, .25);
}

.tmf-modal__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #2f4a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: ew-resize;
  border: 2px solid #c2cfa8;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  transition: transform .15s ease;
}

.tmf-modal__divider:hover .tmf-modal__handle { transform: translate(-50%, -50%) scale(1.08); }

.tmf-modal__hlabel {
  position: absolute;
  bottom: 56px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 28, 20, .65);
  color: #fff;
  z-index: 4;
  backdrop-filter: blur(4px);
}

.tmf-modal__hlabel--before { left: 14px; }
.tmf-modal__hlabel--after { right: 14px; }

.tmf-modal__compare-hint {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #193124;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
  pointer-events: none;
  animation: tmf-hintPulse 2.5s ease-in-out infinite;
}

.tmf-modal__hero-cap {
  position: absolute;
  bottom: 14px;
  left: 16px;
  right: 16px;
  z-index: 5;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}

.tmf-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--badge-c, #3d7a2e);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}

.tmf-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 28, 20, .55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 6;
  transition: background .15s ease, transform .15s ease;
}

.tmf-modal__close:hover {
  background: rgba(15, 28, 20, .8);
  transform: scale(1.06);
}

.tmf-modal__cmp {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #193124;
  border: none;
  cursor: pointer;
  z-index: 6;
  display: none;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

/* --- Body --- */
.tmf-modal__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 28px 20px;
  -webkit-overflow-scrolling: touch;
}

.tmf-modal__head { margin-bottom: 18px; }

.tmf-modal__title {
  font-family: var(--tmf-serif);
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
  margin: 0 0 8px;
  color: #193124;
  letter-spacing: -.02em;
}

.tmf-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  font-size: 14px;
  color: #5d6f5a;
}

.tmf-modal__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tmf-modal__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.tmf-modal__stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f1e1, #e8ede0);
  border: 1px solid rgba(56, 82, 68, .1);
}

.tmf-modal__stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #193124;
  color: #eebb07;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tmf-modal__stat-v {
  display: block;
  font-family: var(--tmf-serif);
  font-size: 20px;
  line-height: 1.1;
  color: #193124;
}

.tmf-modal__stat-k {
  display: block;
  font-size: 11px;
  color: #5d6f5a;
  margin-top: 2px;
}

.tmf-modal__excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: #444;
  margin: 0 0 18px;
  padding-left: 14px;
  border-left: 3px solid #3d7a2e;
}

.tmf-modal__section-title {
  font-family: var(--tmf-serif);
  font-size: 18px;
  margin: 0 0 10px;
  color: #385244;
}

.tmf-modal__story { margin-bottom: 20px; }

.tmf-modal__story-body {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
}

.tmf-modal__story-body p { margin: 0 0 12px; }
.tmf-modal__story-body p:last-child { margin-bottom: 0; }
.tmf-modal__story-body a { color: #3d7a2e; }

.tmf-modal__gallery-wrap { margin-bottom: 8px; }

.tmf-modal__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.tmf-modal__thumb {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  background: #e8ede0;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.tmf-modal__thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(25, 49, 36, .15);
}

.tmf-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tmf-modal__thumb[aria-selected="true"] {
  border-color: #3d7a2e;
  box-shadow: 0 0 0 2px rgba(61, 122, 46, .25);
}

.tmf-modal__foot {
  flex: 0 0 auto;
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(56, 82, 68, .1);
  background: linear-gradient(180deg, #faf9f4, #f3f1e1);
}

.tmf-modal__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  border-radius: 10px;
  background: linear-gradient(135deg, #193124, #2a4a35);
  color: #f2f5ea;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 8px 24px rgba(25, 49, 36, .25);
}

.tmf-modal__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(25, 49, 36, .32);
  filter: brightness(1.05);
  color: #fff;
}

.tmf-modal__cta .ti { font-size: 18px; }

@media (max-width: 600px) {
  .tmf-modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .tmf-modal {
    max-width: none;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
    animation-name: tmf-modal-sheet;
  }

  @keyframes tmf-modal-sheet {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: none; }
  }

  .tmf-modal__body { padding: 20px 18px 16px; }
  .tmf-modal__foot { padding: 14px 18px max(18px, env(safe-area-inset-bottom)); }
  .tmf-modal__hero { height: 240px; }
  .tmf-modal__compare-hint { display: none; }
}

/* --- Reszponzív --- */
@media (max-width: 900px) {
  .tmf-mapgrid { grid-template-columns: 1fr; }
  .tmf-mapgrid__panel { position: static; }
  .panel { min-height: 240px; }
  #mapwrap { min-height: 300px; }
}

@media (max-width: 760px) {
  .tmf-counters { grid-template-columns: 1fr; }
  .tmf-projektek__grid { grid-template-columns: 1fr; max-width: none; }
  .tmf-projektek__grid > .tmf-postcard { flex-direction: column; }
  .tmf-projektek__grid .tmf-postcard__img {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
    height: 180px;
  }
  .tmf-projektek__grid .tmf-postcard__body { padding: 16px 18px; }
  .tmf-mapgrid__hint { font-size: 11px; padding: 6px 12px; }
  .tmf-legend { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .tmf-life--projektek { padding-top: 20px; }
}

/* ==================================================================
   Egyedi projekt oldal
   ================================================================== */
.tmf-life--projektek-single {
  position: relative;
  overflow: hidden;
  padding: 0 0 80px;
  background: transparent;
}

.tmf-life--projektek-single::before {
  content: '';
  position: absolute;
  inset: -5% -5% 60%;
  background:
    radial-gradient(ellipse 55% 45% at 18% 12%, rgba(61, 122, 46, .13), transparent 68%),
    radial-gradient(ellipse 45% 40% at 85% 6%, rgba(238, 187, 7, .09), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.tmf-projekt-single {
  position: relative;
  z-index: 2;
}

/* --- Hero --- */
.tmf-projekt-single__hero {
  position: relative;
  width: 100%;
  height: clamp(280px, 48vw, 520px);
  overflow: hidden;
  background: linear-gradient(145deg, #1a3226 0%, #2d5c38 40%, #4a8a3c 70%, #6bab52 100%);
  user-select: none;
}

.tmf-projekt-single__hero--compare { touch-action: none; }

.tmf-projekt-single__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, transparent 40%, rgba(15, 28, 20, .5) 100%);
  pointer-events: none;
  z-index: 4;
}

.tmf-projekt-single__layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tmf-projekt-single__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tmf-projekt-single__layer--before {
  overflow: hidden;
  width: 50%;
  z-index: 2;
}

.tmf-projekt-single__before-inner { height: 100%; }
.tmf-projekt-single__before-inner img { width: 100%; height: 100%; object-fit: cover; }

.tmf-projekt-single__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #fff;
  cursor: ew-resize;
  z-index: 5;
  box-shadow: 0 0 14px rgba(0, 0, 0, .28);
}

.tmf-projekt-single__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  color: #193124;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 2px solid #c2cfa8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}

.tmf-projekt-single__hlabel {
  position: absolute;
  bottom: 72px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(15, 28, 20, .65);
  color: #fff;
  z-index: 5;
  backdrop-filter: blur(4px);
}

.tmf-projekt-single__hlabel--before { left: 20px; }
.tmf-projekt-single__hlabel--after { right: 20px; }

.tmf-projekt-single__compare-hint {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #193124;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
  pointer-events: none;
  animation: tmf-hintPulse 2.5s ease-in-out infinite;
}

.tmf-projekt-single__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.tmf-projekt-single__placeholder-inner {
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tmf-projekt-single__placeholder-inner .ti-trees {
  font-size: clamp(56px, 12vw, 88px);
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, .28));
}

.tmf-projekt-single__placeholder-trees {
  font-family: var(--tmf-serif);
  font-size: clamp(32px, 6vw, 48px);
  line-height: 1.1;
}

.tmf-projekt-single__placeholder-sub { font-size: 16px; opacity: .88; }

.tmf-projekt-single__hero-cap {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 6;
  pointer-events: none;
}

.tmf-projekt-single__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--badge-c, #3d7a2e);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}

/* --- Tartalom lap --- */
.tmf-projekt-single__sheet {
  position: relative;
  margin-top: -56px;
  background: #fff;
  border-radius: 22px;
  padding: 28px 32px 32px;
  box-shadow:
    0 4px 24px rgba(25, 49, 36, .1),
    0 24px 60px rgba(25, 49, 36, .08);
  border: 1px solid rgba(56, 82, 68, .1);
}

.tmf-projekt-single__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #3d7a2e;
  text-decoration: none;
  margin-bottom: 20px;
  transition: gap .15s ease, color .15s ease;
}

.tmf-projekt-single__back:hover {
  color: #193124;
  gap: 10px;
}

.tmf-projekt-single__title {
  font-family: var(--tmf-serif);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.12;
  margin: 0 0 10px;
  color: #193124;
  letter-spacing: -.02em;
}

.tmf-projekt-single__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 22px;
  font-size: 15px;
  color: #5d6f5a;
}

.tmf-projekt-single__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tmf-projekt-single__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.tmf-projekt-single__stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f1e1, #e8ede0);
  border: 1px solid rgba(56, 82, 68, .1);
}

.tmf-projekt-single__stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #193124;
  color: #eebb07;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.tmf-projekt-single__stat-v {
  display: block;
  font-family: var(--tmf-serif);
  font-size: 22px;
  line-height: 1.1;
  color: #193124;
}

.tmf-projekt-single__stat-k {
  display: block;
  font-size: 11px;
  color: #5d6f5a;
  margin-top: 2px;
}

.tmf-projekt-single__excerpt {
  font-size: 16px;
  line-height: 1.65;
  color: #444;
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 4px solid #3d7a2e;
}

.tmf-projekt-single__section-title {
  font-family: var(--tmf-serif);
  font-size: 22px;
  margin: 0 0 14px;
  color: #385244;
}

.tmf-projekt-single__story { margin-bottom: 32px; }

.tmf-projekt-single__content {
  font-size: 16px;
  line-height: 1.75;
  color: #333;
}

.tmf-projekt-single__content > *:first-child { margin-top: 0; }
.tmf-projekt-single__content p { margin: 0 0 14px; }
.tmf-projekt-single__content a { color: #3d7a2e; }
.tmf-projekt-single__content img { max-width: 100%; height: auto; border-radius: 12px; }

.tmf-projekt-single__gallery-wrap { margin-bottom: 28px; }

.tmf-projekt-single__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.tmf-projekt-single__gallery-item {
  aspect-ratio: 4/3;
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #e8ede0;
  transition: transform .2s ease, box-shadow .2s ease;
}

.tmf-projekt-single__gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(25, 49, 36, .15);
}

.tmf-projekt-single__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tmf-projekt-single__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(56, 82, 68, .1);
}

.tmf-projekt-single__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: min(100%, 240px);
  padding: 14px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #193124, #2a4a35);
  color: #f2f5ea;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 24px rgba(25, 49, 36, .22);
}

.tmf-projekt-single__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(25, 49, 36, .3);
  color: #fff;
}

.tmf-projekt-single__cta--outline {
  background: transparent;
  color: #193124;
  border: 2px solid #385244;
  box-shadow: none;
}

.tmf-projekt-single__cta--outline:hover {
  background: #385244;
  color: #eebb07;
}

/* --- Galéria lightbox --- */
.tmf-projekt-single__lightbox {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(10, 18, 14, .88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tmf-projekt-single__lightbox[hidden] { display: none !important; }

.tmf-projekt-single__lightbox-img {
  max-width: min(1100px, 96vw);
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
}

.tmf-projekt-single__lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(0, 0, 0, .45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

@media (max-width: 760px) {
  .tmf-projekt-single__sheet {
    margin-top: -40px;
    padding: 22px 18px 24px;
    border-radius: 18px;
  }

  .tmf-projekt-single__hero { height: clamp(240px, 55vw, 360px); }
  .tmf-projekt-single__compare-hint { display: none; }
  .tmf-projekt-single__hlabel { bottom: 56px; }
  .tmf-projekt-single__foot { flex-direction: column; }
  .tmf-projekt-single__cta { width: 100%; min-width: 0; }
}
