/* Saját kiszolgálású betűtípusok (Merriweather és Source Sans 3 alapján, OFL 1.1 – lásd fonts/) */
@font-face {
  font-family: "CSB Agro Serif";
  src: url(fonts/csb-agro-serif.woff2) format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: optional;
}
@font-face {
  font-family: "CSB Agro Sans";
  src: url(fonts/csb-agro-sans.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: optional;
}

:root {
  /* A CSB Agro logó és szórólapok színei */
  --green: #173e0e;
  --green-2: #24561a;
  --accent: #4f7a2a;
  --accent-dark: #3d6320;
  --leaf: #6a9340;
  --gold: #e3b54a;
  --paper: #faf4e4;
  --tint: #efe8d3;
  --ink: #1b2417;
  --muted: #586052;
  --line: #ddd4bb;
  --card: #fffcf3;
  --radius: 10px;
  --head: "CSB Agro Serif", Georgia, "Times New Roman", serif;
  --body: "CSB Agro Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
h1, h2, h3 {
  font-family: var(--head);
  line-height: 1.15;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; color: var(--green); }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--body);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent-dark);
  margin-bottom: .6em;
}

.btn {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .8em 1.4em;
  border-radius: 999px;
  font: 700 1.05rem/1 var(--body);
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { color: #fff; border: 2px solid rgba(255,255,255,.75); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 244, 228, .95);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.brand-mark { width: 52px; height: 52px; }
.brand-text { font: 900 1.3rem/1 var(--head); }
.brand-text small {
  display: block; margin-top: 3px;
  font: 700 .72rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dark);
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { background: var(--tint); }
.nav a.nav-cta { background: var(--green); color: #fff; margin-left: 6px; }
.nav a.nav-cta:hover { background: var(--green-2); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--green); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a.nav-cta { margin: 12px 0 0; text-align: center; border-radius: 999px; border: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: flex; align-items: flex-end;
  color: #fff;
  overflow: hidden;
  background: var(--green);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,25,18,.15) 0%, rgba(15,25,18,.25) 40%, rgba(15,25,18,.82) 100%),
    linear-gradient(90deg, rgba(15,25,18,.55) 0%, rgba(15,25,18,0) 70%);
}
.hero-content { position: relative; padding: 120px 0 72px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 4.6rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: .3em;
  max-width: 14em;
  text-shadow: 0 2px 18px rgba(0,0,0,.3);
}
.hero-sub {
  display: inline-block;
  background: var(--green); color: #fff;
  font: 700 clamp(1.05rem, 2.2vw, 1.3rem)/1.3 var(--body);
  padding: .4em .9em; border-radius: 8px;
  margin-bottom: 1.1em;
}
.hero .lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 40rem; color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

/* ---------- Facts strip ---------- */
.facts { background: var(--green); color: #fff; }
.facts-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { display: flex; align-items: center; gap: 12px; padding: 20px 12px; }
.fact + .fact { border-left: 1px solid rgba(255,255,255,.16); padding-left: 24px; }
.fact svg { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fact span { font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
@media (max-width: 640px) {
  .facts-inner { grid-template-columns: 1fr; }
  .fact { padding: 12px 0; }
  .fact + .fact { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); padding-left: 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--green); color: #fff; }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: var(--gold); }
.section-head { max-width: 46rem; margin-bottom: 44px; }
.section-head > p:last-child { color: var(--muted); font-size: 1.12rem; }
.section-dark .section-head > p:last-child { color: rgba(255,255,255,.8); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- Services ---------- */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.service {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.service:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(31,58,43,.45); }
.service img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.service-body { padding: 20px 22px 24px; position: relative; }
.service-body p { color: var(--muted); margin: 0; }
.service h3 { color: var(--green); margin-bottom: .3em; }
.num {
  font: 700 .85rem/1 var(--body); color: var(--accent-dark); letter-spacing: .14em;
  display: block; margin-bottom: 8px;
}
.service-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.service-pics img { aspect-ratio: 2 / 3; }

@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- Steps ---------- */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: s;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.steps li {
  counter-increment: s;
  background: var(--card); border-radius: var(--radius); padding: 28px 26px 24px;
  border-top: 4px solid var(--accent);
}
.steps li::before {
  content: counter(s);
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green); color: #fff;
  font: 900 1.2rem/1 var(--head);
  margin-bottom: 14px;
}
.steps h3 { color: var(--green); }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Area ---------- */
.area { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.area-text > p { color: var(--muted); font-size: 1.1rem; }
.places {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.places li {
  background: var(--card); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.places li:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
.map {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--tint);
}
.map iframe { display: block; width: 100%; height: 440px; border: 0; }
.map-link { display: block; padding: 10px 14px; font-weight: 600; font-size: .95rem; background: var(--card); }
@media (max-width: 860px) {
  .area { grid-template-columns: 1fr; gap: 32px; }
  .map iframe { height: 340px; }
}

/* ---------- Video ---------- */
.video {
  position: relative; aspect-ratio: 16 / 9;
  max-width: 920px; margin: 0 auto 32px;
  border-radius: var(--radius); overflow: hidden;
  background: #0d1a12;
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.6);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0; cursor: pointer; color: #fff; background: none;
  display: grid; place-items: center; font: inherit;
}
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); transition: filter .3s; }
.video-facade:hover img { filter: brightness(.65); }
.play { position: relative; width: 84px; transition: transform .2s; }
.video-facade:hover .play { transform: scale(1.08); }
.video-note { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-weight: 600; line-height: 1.3; }
.video-note small { font-weight: 400; opacity: .75; }

/* ---------- Gallery ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.gallery a { display: block; border-radius: 8px; overflow: hidden; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.05); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(10,14,11,.92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 100px); object-fit: contain; border-radius: 6px; }
.lightbox button {
  position: fixed; background: rgba(255,255,255,.12); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 20px; transform: none; }
}

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact > div > p:last-child { color: var(--muted); font-size: 1.1rem; }
.contact-logo { width: 200px; height: 200px; margin-bottom: 28px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.contact-list small { display: block; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.contact-list a, .contact-list span:not(.ci) { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; word-break: break-word; }
.contact-list a:hover { color: var(--accent); }
.ci {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); display: grid; place-items: center;
}
.ci svg { width: 22px; height: 22px; fill: #fff; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Pályázati támogatás ---------- */
.grant { padding-top: 0; }
.section-tint + .grant { padding-top: clamp(64px, 9vw, 112px); }
.grant-card {
  background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: clamp(24px, 4vw, 40px);
}
.grant-card h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); max-width: 34em; }
.grant-card > p { color: var(--muted); max-width: 52rem; }
.grant-meta { margin: 20px 0 0; display: grid; grid-template-columns: 2fr 1fr; gap: 12px 32px; }
.grant-meta dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.grant-meta dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
@media (max-width: 700px) { .grant-meta { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--green); color: rgba(255,255,255,.75); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 28px 0; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: #fff; }
.footer-inner a { color: #fff; }
.footer-inner .slogan {
  flex-basis: 100%;
  font: italic 700 1.15rem/1.4 var(--head); color: #fff;
  padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.15);
}

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; color: var(--green); }
.not-found p { color: var(--muted); font-size: 1.1rem; }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.btn-outline { color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--tint); }
