/* ============================================================
   darfu.hu — Növénygondozási útmutatók
   ============================================================ */

:root {
  --green:        #3a7d44;
  --green-dark:   #1e4d2b;
  --green-light:  #7ab648;
  --green-pale:   #eaf4ec;
  --gold:         #f0a500;
  --gold-pale:    #fff8e6;
  --bg:           #f9f6f1;
  --card-bg:      #ffffff;
  --text:         #2d3436;
  --text-muted:   #636e72;
  --border:       #e0dbd2;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,.13);
  --radius:       10px;
  --radius-sm:    6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

h1,h2,h3,h4,h5 {
  font-family: 'Lora', Georgia, serif;
  line-height: 1.3;
  color: var(--green-dark);
}

/* ---- Navbar ---- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--green-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .75rem 1.5rem;
}
.nav-logo {
  font-family: 'Lora', serif;
  font-size: 1.5rem; font-weight: 700;
  color: #fff; text-decoration: none;
  display: flex; align-items: center; gap: .4rem;
}
.nav-logo span { color: var(--green-light); }
.nav-links { display: flex; gap: 1.25rem; margin-left: auto; }
.nav-links a { color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-search {
  display: flex; align-items: center;
  background: rgba(255,255,255,.15); border-radius: 20px;
  padding: .3rem .8rem; gap: .4rem;
  border: 1px solid rgba(255,255,255,.2);
}
.nav-search input {
  background: none; border: none; outline: none;
  color: #fff; font-size: .9rem; width: 180px;
}
.nav-search input::placeholder { color: rgba(255,255,255,.6); }
.hamburger { display: none; background: none; border: none; cursor: pointer; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; margin: 5px 0; transition: .3s;
}

/* ---- Autocomplete ---- */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute; top: 110%; left: 0; right: 0;
  background: #fff; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover); z-index: 200;
  overflow: hidden; display: none;
}
.autocomplete-list.open { display: block; }
.autocomplete-item {
  padding: .7rem 1rem; cursor: pointer;
  font-size: .9rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--green-pale); }
.autocomplete-item .icon { font-size: 1rem; }

/* ---- Hero ---- */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, #2d6a36 60%, var(--green) 100%);
  color: #fff; padding: 5rem 1.5rem 4rem;
  text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 2.5rem; color: #fff; margin-bottom: .75rem; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.85); margin-bottom: 2rem; }
.hero-search {
  display: flex; max-width: 500px; margin: 0 auto;
  background: #fff; border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2); overflow: hidden;
}
.hero-search input {
  flex: 1; border: none; outline: none;
  padding: .9rem 1.5rem; font-size: 1rem; color: var(--text);
}
.hero-search button {
  background: var(--green); color: #fff; border: none;
  padding: .9rem 1.5rem; cursor: pointer; font-size: 1rem;
  transition: background .2s;
}
.hero-search button:hover { background: var(--green-dark); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  max-width: 1200px; margin: 1.25rem auto .5rem;
  padding: 0 1.5rem; font-size: .85rem; color: var(--text-muted);
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.breadcrumb a { color: var(--green); }
.breadcrumb .sep { color: var(--border); }

/* ---- Layout ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0 4rem;
}

/* ---- Kártyák ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.card-img {
  width: 100%; height: 200px; object-fit: cover;
  background: var(--green-pale);
}
.card-img-placeholder {
  width: 100%; height: 200px;
  background: linear-gradient(135deg, var(--green-pale), #d4edda);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.card-body { padding: 1.1rem 1.25rem 1.25rem; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: .25rem; color: var(--green-dark); }
.card-latin { font-size: .8rem; color: var(--text-muted); font-style: italic; margin-bottom: .6rem; }
.card-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.card-foot { margin-top: .5rem; }

/* ---- Badge-ek ---- */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.badge-easy   { background: #e8f5e9; color: #2e7d32; }
.badge-medium { background: #fff3e0; color: #e65100; }
.badge-hard   { background: #fce4ec; color: #b71c1c; }
.badge-cat    { background: var(--green-pale); color: var(--green); }

/* ---- Gomb ---- */
.btn {
  display: inline-block; padding: .65rem 1.4rem;
  border-radius: 6px; font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none; transition: .2s; text-align: center;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; text-decoration: none; }

/* ---- Növény oldal — article ---- */
.article-header { margin-bottom: 2rem; }
.article-title { font-size: 2rem; margin-bottom: .5rem; }
.article-latin {
  font-size: 1rem; color: var(--text-muted); font-style: italic;
  margin-bottom: 1rem; display: block;
}
.article-meta {
  display: flex; gap: .75rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.article-meta span { display: flex; align-items: center; gap: .3rem; }
.article-cover {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius); margin-bottom: 1.75rem;
}
.article-cover-placeholder {
  width: 100%; height: 320px;
  background: linear-gradient(135deg, var(--green-pale), #c8e6c9);
  border-radius: var(--radius); margin-bottom: 1.75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}

/* TOC */
.toc {
  background: var(--green-pale); border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.1rem 1.25rem; margin-bottom: 2rem;
}
.toc h4 { font-size: .9rem; color: var(--green); margin-bottom: .6rem; font-family: 'Inter', sans-serif; }
.toc ol { padding-left: 1.2rem; }
.toc li { font-size: .88rem; margin-bottom: .3rem; }
.toc a { color: var(--green-dark); }
.toc a:hover { color: var(--green); }

/* Bevezető */
.article-lead {
  font-size: 1.1rem; line-height: 1.8; color: #444;
  border-left: 4px solid var(--green-light);
  padding-left: 1.2rem; margin-bottom: 2rem;
}

/* Cikk szöveg */
.article-content h2 {
  font-size: 1.45rem; margin: 2.2rem 0 .9rem;
  padding-bottom: .4rem; border-bottom: 2px solid var(--green-pale);
}
.article-content h3 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; color: var(--green); }
.article-content p { margin-bottom: 1.1rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.1rem; }
.article-content li { margin-bottom: .4rem; }
.article-content strong { color: var(--green-dark); }

/* Pro tip doboz */
.tip-box {
  background: var(--gold-pale); border: 1px solid #ffe082;
  border-left: 5px solid var(--gold); border-radius: var(--radius-sm);
  padding: 1rem 1.25rem; margin: 1.5rem 0;
  display: flex; gap: .75rem; align-items: flex-start;
}
.tip-box .tip-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.tip-box p { margin: 0; font-size: .93rem; }

/* Figyelmeztetés doboz */
.warn-box {
  background: #fff3e0; border-left: 5px solid #ff9800;
  border-radius: var(--radius-sm); padding: 1rem 1.25rem; margin: 1.5rem 0;
}

/* ---- Adatlap sidebar ---- */
.plant-card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
  position: sticky; top: 80px;
}
.plant-card-header {
  background: var(--green); color: #fff;
  padding: .9rem 1.25rem; font-weight: 600; font-size: .95rem;
}
.plant-card-body { padding: 0; }
.plant-data-row {
  display: grid; grid-template-columns: 100px 1fr;
  padding: .65rem 1.25rem; border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.plant-data-row:last-child { border-bottom: none; }
.plant-data-label { color: var(--text-muted); font-weight: 500; }
.plant-data-value { color: var(--text); }
.plant-card-cta { padding: 1rem 1.25rem; }

/* ---- Képgaléria ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem; margin: 1.5rem 0;
}

.gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm); cursor: pointer;
  margin: 0;
}

.gallery-item img {
  width: 100%; height: 130px; object-fit: cover;
  display: block; transition: transform .25s;
}

.gallery-item:hover img { transform: scale(1.06); }

/* Hover tooltip — növény neve + licenc */
.gallery-item::after {
  content: attr(data-caption);
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  color: #fff; font-size: .72rem; line-height: 1.35;
  padding: 1.5rem .55rem .45rem;
  opacity: 0; transition: opacity .22s;
  pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }

/* Licenc badge a kép alatt */
.gallery-caption {
  padding: .25rem .4rem;
  background: rgba(0,0,0,.04);
  border-top: 1px solid var(--border);
  min-height: 0;
}
.lic-badge {
  display: inline-block;
  font-size: .68rem; color: var(--text-muted);
  background: var(--green-pale); color: var(--green);
  border-radius: 10px; padding: .1rem .5rem;
  font-weight: 600; letter-spacing: .01em;
}

/* Borítókép alatti licenc */
.cover-license {
  font-size: .78rem; color: var(--text-muted);
  margin-top: .35rem; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: .4rem;
}

/* ---- FAQ ---- */
.faq-section h2 { font-size: 1.4rem; margin-bottom: 1.2rem; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 1rem 0; font-size: .95rem; font-weight: 600;
  color: var(--green-dark); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq-question:hover { color: var(--green); }
.faq-question .faq-icon { flex-shrink: 0; transition: transform .3s; font-style: normal; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1rem; font-size: .92rem; line-height: 1.75; }
.faq-item.open .faq-answer { display: block; }

/* ---- Kapcsolódó növények ---- */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.related-section h2 { margin-bottom: 1.25rem; font-size: 1.35rem; }

/* ---- Lista oldal ---- */
.lista-header {
  background: var(--green-dark); color: #fff;
  padding: 2.5rem 1.5rem; text-align: center;
}
.lista-header h1 { color: #fff; font-size: 1.8rem; }
.lista-filters {
  background: var(--card-bg); border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.filter-form {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
}
.filter-form input, .filter-form select {
  padding: .55rem .9rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem;
  background: #fff; color: var(--text);
}
.filter-form input { min-width: 220px; }
.results-meta { color: var(--text-muted); font-size: .85rem; padding: 1rem 0 0; }

/* ---- Főoldal ---- */
.section-title {
  font-size: 1.6rem; margin-bottom: .4rem;
}
.section-sub { color: var(--text-muted); font-size: .95rem; margin-bottom: 1.75rem; }
.home-section { padding: 3.5rem 0; }
.home-section:nth-child(even) { background: #f2ede7; }

/* Kategória kártyák */
.kat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.kat-card {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 1.5rem 1.25rem; text-align: center;
  box-shadow: var(--shadow); cursor: pointer;
  transition: .2s; text-decoration: none; color: var(--text);
  border: 2px solid transparent;
}
.kat-card:hover { border-color: var(--green); transform: translateY(-2px); text-decoration: none; }
.kat-card .kat-icon { font-size: 2.2rem; margin-bottom: .5rem; }
.kat-card .kat-name { font-weight: 600; font-size: .95rem; color: var(--green-dark); }
.kat-card .kat-count { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }

/* Stat dobozok */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stat-box {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
}
.stat-number { font-size: 2.2rem; font-weight: 700; color: var(--green); font-family: 'Lora', serif; }
.stat-label  { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }

/* ---- Lapozó ---- */
.pagination {
  display: flex; gap: .5rem; justify-content: center;
  padding: 2.5rem 0; flex-wrap: wrap;
}
.page-btn {
  padding: .5rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: .88rem; cursor: pointer; text-decoration: none;
  transition: .15s;
}
.page-btn:hover, .page-btn.active {
  background: var(--green); color: #fff; border-color: var(--green);
  text-decoration: none;
}

/* ---- Footer ---- */
.footer {
  background: var(--green-dark); color: rgba(255,255,255,.75);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-brand .brand-name {
  font-family: 'Lora', serif; font-size: 1.4rem;
  color: #fff; margin-bottom: .5rem;
}
.footer-brand p { font-size: .88rem; line-height: 1.7; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; font-family: 'Inter', sans-serif; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: .4rem; }
.footer ul a { color: rgba(255,255,255,.7); font-size: .88rem; }
.footer ul a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.25rem; text-align: center; font-size: .8rem;
}

/* ---- 404 ---- */
.error-page { text-align: center; padding: 5rem 1.5rem; }
.error-page h1 { font-size: 5rem; color: var(--green); }
.error-page h2 { font-size: 1.5rem; margin: .5rem 0 1rem; }

/* ============================================================
   RESZPONZÍV
   ============================================================ */
@media (max-width: 960px) {
  .page-grid { grid-template-columns: 1fr; }
  .plant-card { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links, .nav-search { display: none; }
  .hamburger { display: block; margin-left: auto; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--green-dark); padding: 1rem 1.5rem; gap: .75rem;
  }
  .hero h1 { font-size: 1.8rem; }
  .article-title { font-size: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .kat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .filter-form { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .hero { padding: 3rem 1rem 2.5rem; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
}
