/* ==========================================================================
   Albrecht Gépészdoktor — gepeszdoktor.hu
   A prototípus egyetlen <style> blokkjából kibontva. Az értékek szándékosan
   azonosak az eredetivel; ami új, azt a szakasz eleji komment jelzi.
   ========================================================================== */

/* --- Alapok, színkészlet ------------------------------------------------- */
:root {
  --bg: #0f1720;
  --card: #17212b;
  --line: #263442;
  --text: #f3f6f8;
  --muted: #afbdc9;
  --accent: #f4b942;
  --accent2: #d89d27;
  --white: #fff;
  --ok: #53c38b;
  --danger: #ff796f;
  --wrap: 1180px;
  /* Egyetlen töréspont vitte az egész oldalt; a fejléc külön, korábbi ponton
     vált, mert a menüsor már 1000px alatt szűkösen fér el. */
  --bp: 900px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* Az Inter nincs betöltve (nincs webfont-kérés): ha a látogató gépén megvan,
     azt kapja, különben a rendszer saját betűje — így nincs hálózati költség. */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background: #f5f7f8;
  color: #17212b;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: auto; padding: 0 20px; }

.small { font-size: 13px; color: #71808d; }

/* ÚJ: billentyűzetes navigáció — a sablonban semmilyen fókusz-jel nem volt. */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ÚJ: ugrás a tartalomra, képernyőolvasónak és billentyűzethez. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #111; padding: 12px 18px;
  font-weight: 800; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ÚJ: csak képernyőolvasónak szánt szöveg. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --- Fejléc -------------------------------------------------------------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 23, 32, .96);
  /* A -webkit- előtag nélkül a Safari nem homályosít a fejléc mögött. */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #24313d;
  color: white;
}

nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.brand { font-weight: 900; letter-spacing: .4px; font-size: 21px; }
.brand span { color: var(--accent); }

.navlinks { display: flex; gap: 20px; align-items: center; font-size: 14px; }
.navlinks a:not(.btn):hover { color: var(--accent); }

/* ÚJ: a menügomb. Asztali nézetben rejtve, a töréspont alatt ez nyitja a menüt —
   a prototípusban a linkek egyszerűen eltűntek, pótlás nélkül. */
.nav-toggle {
  display: none; background: transparent; border: 1px solid #526171;
  border-radius: 10px; padding: 9px 11px; cursor: pointer; color: white;
}
.nav-toggle-bar { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle-bar + .nav-toggle-bar { margin-top: 4px; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, #101922 0%, #172735 60%, #1d3344 100%);
  color: white; padding: 88px 0 72px;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 46px; align-items: center; }
.eyebrow {
  display: inline-block; border: 1px solid #3a4b59; border-radius: 999px;
  padding: 7px 12px; color: #dbe4eb; font-size: 13px; margin-bottom: 18px;
}
.hero h1 { font-size: 56px; line-height: 1.05; margin: 0 0 18px; letter-spacing: -1.3px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 20px; color: #c6d1d9; max-width: 680px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; color: #d8e0e6; font-size: 14px; }
.hero-card {
  background: #fff; color: #17212b; border-radius: 22px; padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}
.hero-card h3 { margin-top: 0; font-size: 23px; }
/* A .hero p világos szürkéje a fehér kártyára is ráöröklődött, ott viszont
   alig olvasható — a kártyán belül sötét szöveg kell. */
.hero-card p { color: #4a5763; }
.hero-card ul { padding-left: 20px; }
.hero-card li { margin: 9px 0; }

/* --- Gombok -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 20px; border-radius: 11px; font-weight: 800; border: 0; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #111; }
.btn-primary:hover { background: var(--accent2); }
.btn-outline { border: 1px solid #526171; color: white; background: transparent; }
/* A körvonalas gomb a sötét fejlécre készült; a fehér foglalás-kártyán a fehér
   szöveg olvashatatlan volt (üres doboznak látszott). */
.booking .btn-outline { color: #17212b; border-color: #c3ced6; }
.booking .btn-outline:hover:not(:disabled) { background: #f2f5f7; }
.booking .btn-outline[disabled] { cursor: not-allowed; }
.btn[disabled] { opacity: .6; cursor: progress; }
/* A `.btn` display:inline-flex-e ERŐSEBB a böngésző [hidden] szabályánál: enélkül
   a varázsló elrejtett gombjai (Vissza, Küldés) végig látszanának. */
.btn[hidden] { display: none; }
.btn-block { width: 100%; }

/* --- Szakaszok ----------------------------------------------------------- */
section { padding: 76px 0; }
.section-dark { background: var(--bg); color: white; }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head h2 { font-size: 40px; line-height: 1.15; margin: 0 0 10px; }
/* A prototípus #667684-et használt; egy árnyalattal sötétebb, hogy a világos
   háttéren elérje a WCAG AA kontrasztot. */
.section-head p { color: #5a6975; font-size: 18px; }
.section-dark .section-head p { color: #aebbc5; }

/* --- Szolgáltatás-kártyák ------------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: white; border: 1px solid #e0e6ea; border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 18px rgba(28, 42, 54, .04);
}
.card h3 { margin: 5px 0 8px; }
.icon { font-size: 28px; }
.problem { font-weight: 800; color: #283844; }
.tag { display: inline-block; background: #eef3f6; padding: 5px 9px; border-radius: 999px; font-size: 12px; margin-top: 10px; }

/* --- Árlista ------------------------------------------------------------- */
.price-table {
  width: 100%; border-collapse: collapse; background: white;
  border-radius: 16px; overflow: hidden; border: 1px solid #dfe6ea; color: #17212b;
}
.price-table th, .price-table td { padding: 17px 18px; border-bottom: 1px solid #e7ecef; text-align: left; }
.price-table th { background: #f1f4f6; font-size: 14px; }
.price-table td:last-child { font-weight: 900; white-space: nowrap; }
.price-table tr:last-child td { border-bottom: 0; }
/* ÚJ: keskeny kijelzőn a táblázat maga görgethető, nem feszíti szét a lapot. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.price-note { color: #aebbc5; margin-top: 14px; font-size: 13px; }

/* --- Miért mi ------------------------------------------------------------ */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.why-item { background: #17212b; border: 1px solid #2b3945; border-radius: 14px; padding: 18px; color: var(--text); }
.why-item strong { display: block; margin-bottom: 3px; }
.check { color: var(--ok); font-weight: 900; }

/* --- Referenciák --------------------------------------------------------- */
.ref-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ref {
  min-height: 230px; background: linear-gradient(150deg, #233343, #111c25); color: white;
  border-radius: 18px; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end;
}
.ref .loc { color: #bac5ce; font-size: 14px; }
.ref h3 { margin: 5px 0; }

/* --- Foglalási űrlap ----------------------------------------------------- */
.booking {
  background: white; border-radius: 20px; padding: 28px;
  box-shadow: 0 14px 40px rgba(18, 33, 45, .08); border: 1px solid #dfe6ea;
}
.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 800; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid #cbd5dc; border-radius: 10px;
  font: inherit; background: white; color: inherit;
  /* Safari alatt az input saját beépített megjelenést kap (lekerekítés, belső
     árnyék), amitől kilóg a többi mező közül. */
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 110px; resize: vertical; }
/* Safari iOS 16px alatti betűnél ráközelít a mezőre — ezt kerüljük el. */
.field input, .field select, .field textarea { font-size: 16px; }
.field .hint { font-size: 12px; color: #71808d; font-weight: 400; }
/* A hibás mezőt CSAK az első beküldési kísérlet után jelöljük. A korábbi
   :invalid:not(:placeholder-shown) a placeholder nélküli dátummezőt már
   érintetlenül pirosra festette. */
.wiz-panel.was-validated .field :invalid { border-color: var(--danger); }

.notice { background: #fff7df; border: 1px solid #f2db96; padding: 14px; border-radius: 10px; font-size: 14px; margin: 16px 0; }
.success { display: none; background: #eaf8f0; border: 1px solid #b7e7ca; color: #1e6f43; padding: 15px; border-radius: 10px; margin-top: 15px; }
/* ÚJ: hibaüzenet-doboz — a prototípusban csak siker-ág volt. */
.formerror { display: none; background: #fdeceb; border: 1px solid #f5bdb8; color: #8c2f26; padding: 15px; border-radius: 10px; margin-top: 15px; }
.is-visible { display: block; }


/* --- Foglalási varázsló (#023) ------------------------------------------- */
/* A négy lépés EGY űrlapon él: a lépésváltás csak `hidden`-t mozgat, így a
   beírt érték a DOM-ban marad, és visszalépéskor nem vész el. */
.wiz-panel { border: 0; padding: 0; margin: 0; min-width: 0; }
.wiz-panel:focus { outline: none; }
.wiz-panel > legend {
  font-size: 22px; font-weight: 900; padding: 0; margin-bottom: 16px; line-height: 1.3;
}

.wiz-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  list-style: none; margin: 0 0 6px; padding: 0; counter-reset: none;
}
.wiz-steps li {
  display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 800;
  color: #8a98a4; border-top: 4px solid #e3e9ed; padding-top: 10px; min-width: 0;
}
.wiz-steps li.aktiv { color: #17212b; border-top-color: var(--accent); }
.wiz-steps li.kesz { color: #4a5a67; border-top-color: var(--accent2); }
.wiz-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: #e3e9ed; color: #586672; display: grid; place-items: center; font-size: 12px;
}
.wiz-steps li.aktiv .wiz-num { background: var(--accent); color: #111; }
.wiz-steps li.kesz .wiz-num { background: var(--accent2); color: #111; }
.wiz-cim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiz-allas { font-size: 13px; color: #71808d; font-weight: 800; margin: 0 0 20px; }

.wiz-gombok { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.wiz-hiba { color: #8c2f26; font-size: 14px; font-weight: 700; margin: 10px 0 0; }

.wiz-alcim { margin: -8px 0 16px; font-size: 14px; color: #6b7a86; }

/* 1. lépés — szolgáltatás-kártyák. Gomb, nem checkbox-elem: az egész felület
   kattintható, az aria-checked viszi a jelölőnégyzet-jelentést a képernyőolvasónak.
   Több is bejelölhető, ezért a kártya látható pipa-négyzetet kap: a puszta
   keret-kiemelésből nem derülne ki, hogy nem egymást kizáró választás. */
.szolg-racs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.szolg-kartya {
  display: flex; align-items: flex-start; gap: 11px; text-align: left; cursor: pointer;
  background: #f7fafb; border: 2px solid #dfe6ea; border-radius: 14px; padding: 15px;
  font: inherit; color: inherit;
}
.szolg-szoveg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.szolg-kartya strong { font-size: 16px; }
.szolg-kartya .szolg-szoveg span { font-size: 13px; color: #6b7a86; }
.szolg-pipa {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid #c3ced6; border-radius: 6px; background: white;
  display: grid; place-items: center;
}
.szolg-kartya[aria-checked="true"] .szolg-pipa {
  background: var(--accent); border-color: var(--accent2);
}
/* A pipa jele CSS-ből: nem kell hozzá se kép, se ikonkészlet. */
.szolg-kartya[aria-checked="true"] .szolg-pipa::after {
  content: ""; width: 6px; height: 11px; margin-top: -3px;
  border: solid #111; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.szolg-kartya:hover { border-color: #c3ced6; }
.szolg-kartya[aria-checked="true"] { border-color: var(--accent); background: #fff8e8; }
.ar-sav {
  margin-top: 16px; background: #0f1720; color: var(--accent);
  border-radius: 12px; padding: 14px 16px; font-weight: 800; font-size: 15px;
}
.ar-sav:empty { display: none; }

/* 3. lépés — fotó-előnézet */
.foto-elonezet {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px;
}
.foto-elonezet li {
  position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
  border: 1px solid #dfe6ea; background: #f2f5f7;
  display: grid; place-items: center;
}
.foto-elonezet img { width: 100%; height: 100%; object-fit: cover; }
.foto-nev { font-size: 11px; padding: 6px; text-align: center; word-break: break-all; color: #586672; }
.foto-torol {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  border: 0; background: rgba(15, 23, 32, .8); color: white; font-size: 17px; line-height: 1;
  cursor: pointer;
}

/* 4. lépés — heti naptár */
.naptar-fej { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.naptar-fej strong { font-size: 15px; text-align: center; }
.btn-kicsi { padding: 9px 13px; font-size: 13px; }
.naptar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.nap {
  border: 1px solid #e3e9ed; border-radius: 12px; padding: 8px; background: #f9fbfc; min-width: 0;
}
.nap.ma { border-color: var(--accent); }
.nap h4 {
  margin: 0 0 8px; font-size: 12px; text-align: center; line-height: 1.25;
  display: flex; flex-direction: column;
}
.nap h4 span { font-weight: 400; color: #71808d; font-size: 11px; }
.savok { display: flex; flex-direction: column; gap: 5px; }
.sav {
  font: inherit; font-size: 13px; font-weight: 700; padding: 7px 4px; cursor: pointer;
  border-radius: 8px; border: 1px solid #bfe0cd; background: #eaf8f0; color: #1e6f43;
  width: 100%;
}
.sav:hover:not(:disabled) { background: #d7f0e3; }
.sav-foglalt { background: #f1f4f6; border-color: #e0e6ea; color: #9aa7b1; cursor: not-allowed; text-decoration: line-through; }
/* A `:not(:disabled)` nem díszítés: enélkül a hover-szabály (azonos
   specifikusság, de korábbi) elnyomta a sárga kiválasztás-jelet. */
.sav[aria-pressed="true"]:not(:disabled) { background: var(--accent); border-color: var(--accent2); color: #111; }
.sav[aria-pressed="true"]:not(:disabled):hover { background: var(--accent2); }
.nap-ures { margin: 0; font-size: 12px; color: #9aa7b1; text-align: center; padding: 6px 0; }
.naptar-jel { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #586672; margin-top: 14px; }
.naptar-jel .jel { display: inline-block; width: 13px; height: 13px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.jel-szabad { background: #eaf8f0; border: 1px solid #bfe0cd; }
.jel-foglalt { background: #f1f4f6; border: 1px solid #e0e6ea; }
.jel-valasztott { background: var(--accent); border: 1px solid var(--accent2); }

/* A kiszolgáló ajánlotta szabad időpontok a hibadobozban */
.ajanlott-savok { margin: 10px 0 0; font-size: 14px; }
.ajanlott-sav {
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
  background: white; border: 1px solid #f5bdb8; border-radius: 8px; padding: 6px 10px;
  color: #8c2f26;
}
.ajanlott-sav:hover { background: #fff5f4; }

/* Összegzés */
.osszegzo { display: grid; grid-template-columns: 200px 1fr; gap: 10px 18px; margin: 0; }
.osszegzo dt { font-weight: 800; font-size: 14px; color: #586672; }
.osszegzo dd { margin: 0; font-size: 15px; }

/* --- Záró CTA ------------------------------------------------------------ */
.cta { background: var(--accent); padding: 50px 0; color: #111; }
.cta-row { display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.cta h2 { font-size: 38px; margin: 0; }
.cta p { margin: 7px 0 0; }
.cta .btn { background: #111; color: white; }

/* --- Lábléc -------------------------------------------------------------- */
footer { background: #0b1218; color: #d6dfe5; padding: 45px 0 90px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: white; }
.footer-grid a:hover { color: var(--accent); }

/* --- Mobil alsó sáv ------------------------------------------------------ */
.bottom-mobile { display: none; }

/* --- Töréspont ----------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }

  /* A menü lenyílik a fejléc alá, nem tűnik el. */
  .navlinks {
    display: none; position: absolute; left: 0; right: 0; top: 72px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0f1720; border-bottom: 1px solid #24313d; padding: 8px 20px 16px;
  }
  .navlinks.is-open { display: flex; }
  .navlinks a { padding: 13px 0; border-bottom: 1px solid #1c2935; font-size: 16px; }
  .navlinks a.btn { margin-top: 12px; border-bottom: 0; }

  .hero-grid, .grid, .ref-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 42px; }
  .booking-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .why { grid-template-columns: 1fr; }
  .cta-row { display: block; }
  .cta .btn { margin-top: 18px; }
  .section-head h2 { font-size: 32px; }

  /* A varázsló mobilon: a lépésjelzőn csak a szám fér el, a naptár pedig
     napokra bomlik — 400px-en 7 oszlop olvashatatlanul keskeny lenne. */
  .wiz-cim { display: none; }
  .wiz-steps li { justify-content: center; }
  .wiz-gombok .btn { flex: 1 1 140px; text-align: center; }
  /* Rugalmas rács töréspont nélkül: 390 px-en egy oszlop (a pipa mellett a
     „Kéménybélelés” két oszlopban már kilógott), tableten kettő. */
  .szolg-racs { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .naptar { grid-template-columns: 1fr; }
  .nap h4 { flex-direction: row; gap: 6px; text-align: left; font-size: 14px; }
  .nap h4 span { font-size: 13px; }
  .savok { flex-direction: row; flex-wrap: wrap; }
  .sav { width: auto; flex: 0 1 auto; min-width: 74px; padding: 9px 10px; }
  .osszegzo { grid-template-columns: 1fr; gap: 2px 0; }
  .osszegzo dd { margin-bottom: 10px; }

  /* Az árlista 469 px-es táblázata 390 px-en az EGÉSZ lapot oldalra
     görgethetővé tette (mérve). Mobilon a sorok kártyává állnak össze: a
     fejléc-cellák helyett minden érték a saját data-cimke feliratát kapja. */
  .price-table { border: 0; box-shadow: none; }
  .price-table thead { display: none; }
  .price-table, .price-table tbody, .price-table tr, .price-table td { display: block; width: 100%; }
  .price-table tr {
    border: 1px solid #e7ecef; border-radius: 14px; padding: 14px 16px;
    margin-bottom: 12px; background: white;
  }
  .price-table tr:last-child { margin-bottom: 0; }
  .price-table td { border-bottom: 0; padding: 3px 0; }
  .price-table td:first-child { font-weight: 900; font-size: 16px; padding-bottom: 7px; }
  .price-table td:not(:first-child) { font-size: 14px; color: #586672; }
  .price-table td:not(:first-child)::before {
    content: attr(data-cimke) ": "; color: #8a98a4; font-weight: 700;
  }
  .price-table td:last-child { font-weight: 800; color: #17212b; white-space: normal; }

  /* Érintőfelületek: a hamburger 34 px, a lábléc-linkek 20 px magasak voltak. */
  .nav-toggle { padding: 12px 13px; }
  .footer-linkek a { display: inline-block; padding: 9px 0; }

  .bottom-mobile {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    background: white; border-top: 1px solid #d9e1e6;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
    /* iPhone-on a sáv a kezdőjelző alá csúszna. */
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-mobile a { padding: 13px 6px; text-align: center; font-size: 12px; font-weight: 800; color: #17212b; }
  .bottom-mobile a:last-child { background: var(--accent); }
}

/* Aki kikapcsolta a mozgást, ne kapjon gördülő animációt. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
