/* ==========================================================================
   Appadat – stíluslap
   1. Tokenek   2. Alap   3. Elrendezés   4. Komponensek
   5. Főoldal szekciók   6. Jogi aloldalak   7. Sütisáv   8. Animáció
   ========================================================================== */

/* ---------- 1. Tokenek ---------- */
:root {
  --navy: #0b2a3c;
  --navy-deep: #071c28;
  --teal: #0e7c86;
  --mint: #e6f6f4;
  --accent: #ff8a3d;          /* díszítő narancs: ikonok, kiemelések sötét háttéren */
  --accent-strong: #c94f08;   /* gombok háttere – fehér szöveggel 4.5:1 (WCAG AA) */
  --accent-strong-hover: #ad4307;
  --peach: #ffd2b3;
  --ink: #142630;
  --muted: #546a75;
  --line: #d7e6e8;
  --bg: #fff;
  --footer-text: #cfe3e6;

  /* a világos vég (#0e7c86) fehér szöveggel még 4.9:1 */
  --grad: linear-gradient(135deg, #0b2a3c 0%, #0d6470 55%, #0e7c86 100%);
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(11, 42, 60, .35);
  --phone-shadow: 0 30px 40px -12px rgba(11, 42, 60, .35);

  --header-h: 72px;
  --section-y: 88px;
}

/* ---------- 2. Alap ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; color: var(--navy); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: .6em 1em; border-radius: 8px;
  background: var(--accent-strong); color: #fff; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Elrendezés ---------- */
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Fejléc */
.topbar {
  position: sticky; top: 0; z-index: 20;
  color: #fff;
  background: rgba(11, 42, 60, .92);
  backdrop-filter: blur(10px);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h);
}
.topbar-contact { font-size: .85rem; }
.topbar-contact a { text-decoration: none; opacity: .9; }
.topbar-contact a:hover { opacity: 1; text-decoration: underline; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.4rem; font-weight: 800; color: #fff; text-decoration: none;
}

/* Lábléc */
.footer { padding: 40px 0; font-size: .95rem; color: var(--footer-text); background: var(--navy-deep); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-info { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.footer-info strong { color: #fff; }
.footer-info [aria-current="page"] { color: var(--accent); }

@media (max-width: 900px) {
  .topbar-contact { display: none; }
}
@media (max-width: 560px) {
  :root { --header-h: 60px; --section-y: 64px; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 32px; height: 32px; }
}

/* ---------- 4. Komponensek ---------- */
.btn {
  display: inline-block;
  padding: .8em 1.5em;
  font: inherit; font-size: .95rem; font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--accent { color: #fff; background: var(--accent-strong); box-shadow: 0 8px 20px -8px var(--accent-strong); }
.btn--accent:hover { background: var(--accent-strong-hover); }
.btn--outline { color: var(--ink); background: #fff; border-color: var(--line); }
.btn--outline:hover { background: var(--mint); }

/* Gomb, ami linknek néz ki (pl. „Süti beállítások”) */
.link-btn {
  padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-decoration: underline; cursor: pointer;
}

.eyebrow {
  margin: 0 0 .4rem;
  font-size: .95rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal);
}
.eyebrow--light { color: var(--accent); }

.icon {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* Telefon-mockup árnyékkal.
   SZÁNDÉKOSAN nem `filter: drop-shadow()`: azt egyes böngészők (főleg Safari)
   nagy, átlátszó PNG-knél a kép teljes téglalapjára számolják, ami szürke
   keretként látszik. Helyette egy, a telefontesthez igazított lekerekített
   elem kap box-shadow-t. Az arányok a mockupokból mérve (760×1392 px):
   a test x: 47–710 px, sarokív ≈ 111 × 106 px; az oldalgombok kilógnak. */
.phone { position: relative; display: block; }
.phone::before {
  content: "";
  position: absolute; top: 0; bottom: .2%; left: 6.2%; right: 6.6%;
  border-radius: 16.7% / 7.6%;
  box-shadow: var(--phone-shadow);
}
.phone img { position: relative; width: 100%; }

/* Mobilon rövidebb gombfelirat: „Kérjen személyes konzultációt” → „Konzultáció” */
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .topbar .btn { padding: .6em 1em; font-size: .8rem; }
}

/* ---------- 5. Főoldal szekciók ---------- */

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: 64px;
  text-align: center;
  color: #fff;
  background: var(--grad);
}
.hero::before {
  content: "";
  position: absolute; right: -10%; bottom: -40%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, .35), transparent 70%);
}
.hero h1 { margin-bottom: .3em; font-size: clamp(2rem, 5.5vw, 4rem); font-weight: 800; color: #fff; }
.hero-sub { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.8rem); font-weight: 600; color: var(--peach); }
.hero-lead { margin: 1.2em 0 2em; font-size: clamp(1rem, 2vw, 1.4rem); opacity: .9; }

/* Telefon-legyező. --pw a telefon szélessége; a sáv magassága ebből adódik,
   így a képek sosem csúsznak fel a szövegre (a kép aránya 760×1392). */
.hero-visual { --pw: clamp(150px, 22vw, 280px); position: relative; height: calc(var(--pw) * 1.68); }
.hero-phone {
  position: absolute; left: 50%; bottom: 0;
  width: var(--pw);
}
.hero-phone::before { box-shadow: 0 30px 40px -10px rgba(0, 0, 0, .4); }
.hero-phone--1 { z-index: 1; transform: translate(-170%, 24%) rotate(-12deg) scale(.78); opacity: .9; }
.hero-phone--2 { z-index: 2; transform: translate(-112%, 18%) rotate(-7deg) scale(.88); }
.hero-phone--3 { z-index: 3; transform: translate(-50%, 12%); }
.hero-phone--4 { z-index: 2; transform: translate(12%, 18%) rotate(7deg) scale(.88); }
.hero-phone--5 { z-index: 1; transform: translate(70%, 24%) rotate(12deg) scale(.78); opacity: .9; }

@media (max-width: 560px) {
  .hero-visual { --pw: 46vw; }
  .hero-phone--1, .hero-phone--5 { display: none; }
  .hero-phone--2 { transform: translate(-100%, 30%) rotate(-7deg) scale(.85); }
  .hero-phone--4 { transform: translate(0, 30%) rotate(7deg) scale(.85); }
}

/* Csomag */
.package {
  display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 48px;
  padding-block: calc(var(--section-y) + 8px);
}
.package-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: pk; }
.package-list li {
  counter-increment: pk;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  font-weight: 500;
  background: var(--mint); border-radius: 14px;
}
.package-list li::before {
  content: counter(pk);
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  font-weight: 700; color: #fff; background: var(--teal);
}

/* Kiemelt funkciók */
.highlights {
  display: grid; grid-template-columns: 340px 1fr; align-items: start; gap: 64px;
  padding-bottom: calc(var(--section-y) + 8px);
}
.highlights-phone { position: sticky; top: calc(var(--header-h) + 18px); }
.highlights-phone .phone { max-width: 320px; margin-inline: auto; }
.hl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 36px; margin-top: 28px; }
.hl-grid article { padding-top: 16px; border-top: 3px solid var(--accent); }
.hl-grid p { margin: 0 0 .6em; color: var(--muted); }

/* Menüpont-rács */
.menu { padding-block: var(--section-y); color: #fff; background: var(--grad); }
.menu h2 { color: #fff; }
.menu-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px;
  margin: 40px 0 0; padding: 0; list-style: none;
}
.menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  height: 100%;
  padding: 22px 10px;
  font-size: .95rem; font-weight: 600; text-align: center; text-decoration: none;
  color: #fff;
  background: rgba(7, 28, 40, .22);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  transition: background .2s, transform .2s;
}
a.menu-item:hover { background: rgba(7, 28, 40, .38); transform: translateY(-3px); }
.menu-item .icon { width: 42px; height: 42px; color: var(--accent); }

/* Részletes funkciók – váltakozó elrendezés és háttér */
.feature { padding-block: var(--section-y); }
.feature:nth-child(even) { background: var(--mint); }
.feature-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
.feature:nth-child(even) .feature-text { order: 2; }
.feature-title { display: flex; align-items: center; gap: 14px; margin-bottom: .5em; }
.feature-title h2 { margin: 0; }
.feature-icon {
  flex: none; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 16px;
  color: #fff; background: var(--grad);
}
.feature-icon .icon { width: 30px; height: 30px; }
.feature-text p { font-size: 1.05rem; color: var(--muted); }
.feature-text .lead { font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.feature-media { display: flex; justify-content: center; }
.feature-media .phone { width: min(300px, 80%); }


/* Kapcsolat */
.cta { padding-block: 72px; color: #fff; background: var(--navy); }
.cta h2 { color: #fff; }
.cta p { max-width: 560px; margin: 0; opacity: .85; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }

@media (max-width: 900px) {
  .package, .highlights, .feature-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .highlights-phone { position: static; max-width: 280px; margin-inline: auto; }
  .feature:nth-child(even) .feature-text { order: 0; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .hl-grid { grid-template-columns: 1fr; }
  .feature-title { gap: 12px; }
  .feature-title h2 { font-size: 1.5rem; hyphens: auto; overflow-wrap: anywhere; }
  .feature-icon { width: 44px; height: 44px; border-radius: 12px; }
  .feature-icon .icon { width: 24px; height: 24px; }
  /* minmax(0, 1fr): a hosszú szavak („Problémabejelentő”) ne feszítsék szét a rácsot */
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .menu-item { padding-inline: 8px; font-size: .9rem; hyphens: auto; overflow-wrap: anywhere; }
}

/* ---------- 6. Jogi aloldalak ---------- */
.page-hero { padding: 56px 0 48px; color: #fff; background: var(--grad); }
.page-hero h1 { margin: 0; font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; color: #fff; }
.page-hero p { margin: .5em 0 0; opacity: .85; }

.legal { padding: 56px 0 var(--section-y); }
.legal .wrap { max-width: 820px; }
.legal h2 { margin-top: 2em; padding-top: 1em; font-size: 1.4rem; border-top: 1px solid var(--line); }
.legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal h3 { margin-top: 1.4em; font-size: 1.1rem; }
.legal p, .legal li { color: var(--muted); }
.legal a, .legal .link-btn { color: var(--teal); }

.table-scroll { overflow-x: auto; }
.legal table { width: 100%; margin: 1em 0; font-size: .95rem; border-collapse: collapse; }
.legal th, .legal td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal th { color: var(--navy); background: var(--mint); }

.info-card {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 28px;
  margin: 0; padding: 28px 32px;
  background: var(--mint); border-radius: var(--radius);
}
.info-card dt { font-weight: 700; color: var(--navy); }
.info-card dd { margin: 0; color: var(--ink); }

.back-link { display: inline-block; margin-top: 40px; font-weight: 700; color: var(--teal); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .info-card { grid-template-columns: 1fr; gap: 2px; padding: 22px; }
  .info-card dd { margin-bottom: 10px; }
}

/* ---------- 7. Sütisáv ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  max-width: 720px; margin-inline: auto; padding: 18px 22px;
  font-size: .95rem; color: var(--ink);
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 20px 50px -12px rgba(11, 42, 60, .45);
}
.cookie-banner p { flex: 1; margin: 0; }
.cookie-banner a { color: var(--teal); }
.cookie-actions { flex: none; display: flex; gap: 10px; }

@media (max-width: 560px) {
  .cookie-banner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-actions .btn { flex: 1; }
}

/* ---------- 8. Animáció ----------
   Csak akkor rejtjük el előre, ha fut a JS (html.js) – különben a tartalom JS nélkül is látszik. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Telefonképek: amíg nem töltöttek be teljesen, rejtve maradnak – így a félig kirajzolt
   kép ne villanjon fel, és az árnyék ne jelenjen meg a telefon előtt. A main.js a
   .phone tartóra teszi az .is-loaded osztályt; ha az valamiért nem fut le, 4 mp után
   mindenképp megjelennek. */
.phone { transition: opacity .4s ease; }
.js .phone:not(.is-loaded) { opacity: 0; animation: img-failsafe 0s 4s forwards; }
@keyframes img-failsafe { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .phone { transition: none; }
  .btn, .menu-item { transition: none; }
}
