/* ================================================
   ESETTANULMÁNY OLDALAK (referencia/*.html)
   ================================================ */

/* ── Hero ── */
.cs-hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 128px;
  color: white;
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(233,69,96,0.28), transparent 60%),
    radial-gradient(700px 380px at 0% 100%, rgba(99,102,241,0.22), transparent 60%),
    linear-gradient(135deg, var(--primary) 0%, #24244a 100%);
}
.cs-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.cs-hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.cs-crumbs { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-bottom: 18px; font-family: var(--font-h); }
.cs-crumbs a { color: rgba(255,255,255,0.75); text-decoration: none; }
.cs-crumbs a:hover { color: white; text-decoration: underline; }
.cs-label {
  display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px;
  background: rgba(233,69,96,0.16); border: 1px solid rgba(233,69,96,0.4); color: #ffb3c0;
  font-family: var(--font-h); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.cs-hero h1 { color: white; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; margin-bottom: 16px; }
.cs-lead { color: rgba(255,255,255,0.75); font-size: 1.02rem; line-height: 1.75; margin-bottom: 22px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cs-chip {
  padding: 6px 12px; border-radius: 8px; font-family: var(--font-h); font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.9);
}
.cs-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Eszköz-mockup ── */
.cs-device { position: relative; padding: 0 28px 40px 0; }
.cs-browser {
  border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.08);
  transform: perspective(1800px) rotateY(-7deg) rotateX(3deg);
  transform-origin: left center;
}
.cs-browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #eceef3; }
.cs-browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.cs-browser-bar i:nth-child(2) { background: #febc2e; }
.cs-browser-bar i:nth-child(3) { background: #28c840; }
.cs-browser-bar span {
  flex: 1; margin-left: 10px; max-width: 260px; padding: 3px 10px; border-radius: 6px; background: #fff;
  font-family: var(--font-h); font-size: 0.68rem; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-browser img { display: block; width: 100%; height: auto; aspect-ratio: 960 / 500; object-fit: cover; object-position: top; }
.cs-phone {
  position: absolute; right: 0; bottom: 0; width: 25%; min-width: 110px;
  aspect-ratio: 390 / 844; border-radius: 22px; overflow: hidden; background: #000;
  border: 6px solid #0d0d14; box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.12);
}
.cs-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ── KPI csempék ── */
.cs-kpis {
  position: relative; z-index: 2; margin-top: -76px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.cs-kpi {
  background: white; border-radius: 14px; padding: 22px 22px 20px; box-shadow: var(--shadow-md);
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.cs-kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #ff8a5c); }
.cs-kpi b { display: block; font-family: var(--font-h); font-size: 1.75rem; line-height: 1.1; color: var(--primary); margin-bottom: 6px; }
.cs-kpi span { display: block; font-size: 0.8rem; line-height: 1.5; color: var(--text-light); }

/* ── Fő elrendezés ── */
.cs-main { padding-top: 64px; }
.cs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.cs-aside { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 18px; }
.cs-section { margin-bottom: 56px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.cs-section:last-child { margin-bottom: 0; }
.article-body .cs-h2 { display: flex; align-items: center; gap: 14px; font-size: 1.45rem; margin: 0 0 18px; }
.cs-h2 span {
  flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(233,69,96,0.1); color: var(--accent); font-size: 0.85rem; font-weight: 700;
}
.article-body .cs-section h3 { font-size: 1rem; margin: 0 0 6px; }

/* Kihívások */
.cs-challenges { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.cs-challenge {
  display: flex; gap: 14px; padding: 18px; border-radius: 14px;
  background: #fff7f8; border: 1px solid rgba(233,69,96,0.18);
}
.cs-challenge-ico { flex: none; font-size: 1.4rem; line-height: 1; }
.article-body .cs-challenge p { margin: 0; font-size: 0.88rem; line-height: 1.65; }

/* Megoldás – funkciókártyák */
.cs-features { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.cs-feature {
  padding: 22px; border-radius: 14px; background: white; border: 1.5px solid var(--border);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.cs-feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(233,69,96,0.35); }
.cs-feature-ico {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 12px;
  font-size: 1.35rem; background: linear-gradient(135deg, rgba(233,69,96,0.14), rgba(255,138,92,0.14));
}
.article-body .cs-feature p { margin: 0; font-size: 0.88rem; line-height: 1.7; }

/* Folyamat – idővonal */
.cs-timeline { list-style: none; counter-reset: step; padding: 0 !important; margin: 0; position: relative; }
.cs-timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), rgba(233,69,96,0.1)); }
.article-body .cs-timeline li { position: relative; padding: 0 0 22px 60px; margin: 0; }
.cs-timeline li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: white; border: 2px solid var(--accent);
  color: var(--accent); font-family: var(--font-h); font-weight: 700;
}
.article-body .cs-timeline p { margin: 0; }

/* Technológia */
.cs-tech { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.article-body .cs-tech li {
  margin: 0; padding: 7px 12px; border-radius: 8px; background: var(--primary); color: white;
  font-family: var(--font-h); font-size: 0.78rem; font-weight: 600;
}

/* Eredmény */
.cs-result {
  padding: 30px; border-radius: 18px; color: white;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(233,69,96,0.3), transparent 60%),
    linear-gradient(135deg, var(--primary), #2b2b58);
}
.article-body .cs-result p { color: rgba(255,255,255,0.82); }
.article-body .cs-result strong { color: white; }
.article-body .cs-result a { color: #ffb3c0; }
.cs-quote { margin: 22px 0 0; padding: 20px 22px; border-radius: 14px; background: rgba(255,255,255,0.07); border-left: 4px solid var(--accent); }
.article-body .cs-quote p { margin: 0 0 8px; font-size: 1.05rem; font-style: italic; color: white; }
.cs-quote cite { font-style: normal; font-size: 0.8rem; color: rgba(255,255,255,0.6); font-family: var(--font-h); }

/* Tanulságok */
.cs-lessons { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.article-body .cs-lessons li {
  margin: 0; padding: 18px 18px 18px 56px; position: relative; border-radius: 14px;
  background: #f4f6fb; border: 1px solid var(--border);
}
.cs-lessons li::before {
  content: "✓"; position: absolute; left: 18px; top: 18px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: #16a34a; color: white; font-size: 0.8rem; font-weight: 700;
}
.article-body .cs-lessons p { margin: 0; font-size: 0.9rem; }

/* ── Oldalsáv ── */
.cs-card { background: white; border: 1.5px solid var(--border); border-radius: 14px; padding: 22px; }
.cs-card h2 { font-size: 0.95rem; margin-bottom: 14px; }
.cs-facts { margin: 0 0 16px; }
.cs-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 0.82rem; }
.cs-facts div:last-child { border-bottom: 0; }
.cs-facts dt { color: var(--text-light); flex: none; }
.cs-facts dd { margin: 0; text-align: right; font-weight: 600; color: var(--text); }
.cs-facts a { color: var(--accent); }
.cs-audit { display: block; }
.cs-audit img { display: block; width: 100%; height: auto; }
.cs-toc ol { margin: 0; padding-left: 20px; font-size: 0.85rem; line-height: 1.9; }
.cs-toc a { color: var(--text); text-decoration: none; }
.cs-toc a:hover { color: var(--accent); }

/* ── További esettanulmányok ── */
.cs-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.cs-next-card {
  display: flex; flex-direction: column; background: white; border: 1.5px solid var(--border);
  border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--text);
  transition: transform var(--t), box-shadow var(--t);
}
.cs-next-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); text-decoration: none; }
.cs-next-card img { width: 100%; height: 160px; object-fit: cover; object-position: top; display: block; }
.cs-next-cat { padding: 16px 18px 0; font-family: var(--font-h); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.cs-next-card strong { padding: 4px 18px 0; font-family: var(--font-h); font-size: 1.05rem; }
.cs-next-more { padding: 10px 18px 18px; font-size: 0.82rem; color: var(--text-light); }
.cs-next-all { margin-top: 24px; text-align: center; }
.cs-next-all a { font-family: var(--font-h); font-weight: 700; color: var(--accent); text-decoration: none; }

/* ── Reszponzív ── */
@media (max-width: 1024px) {
  .cs-layout { grid-template-columns: 1fr; gap: 40px; }
  .cs-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .cs-aside .article-cta-box { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .cs-hero { padding: 32px 0 112px; }
  .cs-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-browser { transform: none; }
  .cs-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cs-device { padding: 0 14px 28px 0; }
  .cs-phone { width: 30%; min-width: 0; border-width: 4px; border-radius: 16px; }
  .cs-kpis { gap: 10px; }
  .cs-kpi { padding: 16px; }
  .cs-kpi b { font-size: 1.35rem; }
  .cs-challenges, .cs-features, .cs-next-grid, .cs-aside { grid-template-columns: 1fr; }
  .cs-result { padding: 22px; }
  .cs-hero-actions .btn { width: 100%; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-feature, .cs-next-card { transition: none; }
  .cs-feature:hover, .cs-next-card:hover { transform: none; }
}

/* Gyakori kérdések */
.cs-faqs { display: grid; gap: 10px; }
.cs-faq { border: 1.5px solid var(--border); border-radius: 14px; background: white; transition: border-color var(--t), box-shadow var(--t); }
.cs-faq[open] { border-color: rgba(233,69,96,0.35); box-shadow: var(--shadow); }
.cs-faq > summary {
  cursor: pointer; list-style: none; position: relative; padding: 18px 56px 18px 20px;
  font-family: var(--font-h); font-weight: 700; font-size: 0.98rem; color: var(--text);
}
.cs-faq > summary::-webkit-details-marker { display: none; }
.cs-faq > summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(233,69,96,0.1); color: var(--accent); font-size: 1.1rem; transition: transform var(--t);
}
.cs-faq[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
.cs-faq > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.cs-faq-body { padding: 0 20px 18px; }
.article-body .cs-faq-body p { margin: 0; font-size: 0.92rem; }

/* Túlcsordulás elleni védelem keskeny kijelzőn */
.cs-hero-grid > *, .cs-layout > *, .cs-kpis > *, .cs-aside > * { min-width: 0; }
.cs-hero-actions .btn { white-space: normal; overflow-wrap: anywhere; }
.cs-facts dd, .cs-crumbs, .cs-label { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .cs-hero-grid, .cs-layout { grid-template-columns: minmax(0, 1fr); }
  .cs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cs-aside, .cs-challenges, .cs-features, .cs-next-grid { grid-template-columns: minmax(0, 1fr); }
  .cs-label { white-space: normal; }
}
