/* ikszNet — világos, kártya-alapú design. Szándékosan nem hasonlít a korábbi
   sötét navy fejléc/lábléc + narancs designra. */

:root {
  --brand: #0f766e;
  --brand-dark: #0b5b54;
  --brand-light: #14b8a6;
  --accent: #e11d48;
  --ink: #172033;
  --muted: #5b6472;
  --bg: #ffffff;
  --bg-soft: #f1f6f5;
  --card-bg: #ffffff;
  --border: #e1e8e6;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 40, 35, 0.06);
  --shadow-lg: 0 14px 32px rgba(15, 40, 35, 0.12);
  --header-bg: rgba(255, 255, 255, 0.92);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2dd4bf;
    --brand-dark: #14b8a6;
    --brand-light: #5eead4;
    --accent: #fb7185;
    --ink: #e7edf0;
    --muted: #a3b0ba;
    --bg: #0f1615;
    --bg-soft: #16211f;
    --card-bg: #18201f;
    --border: #263230;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.45);
    --header-bg: rgba(15, 22, 21, 0.92);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); margin: 0 0 .4rem; }
h2 { font-size: 1.4rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 .5rem; }
p { margin: 0 0 1rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
  padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; color: var(--ink); flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff; font-weight: 900; font-size: 1.05rem;
}
.logo-text .accent { color: var(--brand); }
.main-nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.main-nav a { color: var(--muted); font-weight: 600; font-size: .95rem; padding: .4rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--brand-dark); border-bottom-color: var(--brand); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; margin-left: auto; cursor: pointer; padding: .4rem; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: .8rem 0; }
  .nav-toggle { display: flex; }
  .main-nav { flex-basis: 100%; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: .5rem 0; }
  .main-nav a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--border); }
}

/* ---------- Page intro / breadcrumbs ---------- */
.page-intro { padding: 2rem 0 1.2rem; }
.breadcrumbs { padding: .9rem 0 0; font-size: .85rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: .3rem; color: var(--border); }
.breadcrumbs a { color: var(--muted); }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 70ch; }
.intro-title-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.card {
  display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem 1.2rem;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; color: var(--ink);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; }
.card-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.card-title { font-weight: 700; }
.card-desc { color: var(--muted); font-size: .92rem; }
.cat-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--brand-dark); font-weight: 800; font-size: 1.1rem;
}

/* ---------- Line / kerület badges ---------- */
.line-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem; border-radius: 8px;
  font-weight: 800; font-size: .95rem; flex-shrink: 0;
}
.line-badge-sm { min-width: 1.8rem; height: 1.8rem; font-size: .82rem; }
.line-badge-lg { min-width: 3rem; height: 3rem; font-size: 1.2rem; border-radius: 12px; }
.kerulet-badge { background: var(--bg-soft); color: var(--brand-dark); }

/* ---------- Detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.2rem; padding-bottom: 3rem; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-main h2 { border-top: 1px solid var(--border); padding-top: 1.4rem; }
.detail-main h2:first-child { border-top: 0; padding-top: 0; }

.side-box { background: var(--bg-soft); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.side-box h3 { margin-top: 0; font-size: 1rem; }
.side-box-cta { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; }
.side-box-cta h3, .side-box-cta p { color: #fff; }
.stat-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; margin: 0; }
.stat-list dt { color: var(--muted); font-size: .85rem; }
.stat-list dd { margin: 0; font-weight: 600; text-align: right; }
.fact-list, .highlight-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.fact-list li { padding-left: 1.2rem; position: relative; }
.fact-list li::before { content: "•"; color: var(--brand); position: absolute; left: 0; font-weight: 900; }
.btn {
  display: inline-block; margin-top: .6rem; padding: .55rem 1.1rem; border-radius: 999px;
  background: #fff; color: var(--brand-dark); font-weight: 700; font-size: .9rem;
}
.btn:hover { text-decoration: none; opacity: .9; }

/* ---------- Stops / schedule ---------- */
.route-stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.stop-list { margin: 0; padding-left: 1.3rem; }
.stop-list li { padding: .15rem 0; }
.stop-list li.terminus { font-weight: 700; }
.stop-count { font-weight: 400; color: var(--muted); font-size: .85rem; }
.schedule-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.schedule-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.schedule-table th, .schedule-table td { text-align: left; padding: .3rem .4rem; border-bottom: 1px solid var(--border); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: .5rem; }
.faq-item { background: var(--bg-soft); border-radius: 10px; padding: .8rem 1rem; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin: .6rem 0 0; color: var(--muted); }

/* ---------- Full line list (busz/villamos index) ---------- */
.line-list-full { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: 1.5rem; }
@media (max-width: 860px) { .line-list-full { columns: 2; } }
@media (max-width: 560px) { .line-list-full { columns: 1; } }
.line-list-full li { break-inside: avoid; padding: .3rem 0; }
.line-list-full a { display: flex; align-items: center; gap: .5rem; color: var(--ink); }
.line-list-route { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Misc sections ---------- */
.highlight-section, .about-section { padding: 1.5rem 0; }
.highlight-list { flex-direction: row; flex-wrap: wrap; gap: .6rem; }
.highlight-list li a {
  display: inline-block; padding: .4rem .9rem; background: var(--bg-soft); border-radius: 999px; font-size: .88rem; color: var(--brand-dark); font-weight: 600;
}
.legal-page { padding-bottom: 3rem; max-width: 75ch; }
.error-page { padding: 2rem 0 4rem; }
.note { font-size: .85rem; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 2.4rem 20px; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer-col p { color: var(--muted); font-size: .9rem; }
.footer-bottom { border-top: 1px solid var(--border); padding: 1.2rem 20px 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.legal-links { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
