/* Mobil / tablet finomhangolás – az inline stílusok miatt !important kell */
html { -webkit-text-size-adjust: 100%; }
img, svg, video { max-width: 100%; }
body { overflow-wrap: break-word; }

/* Tablet és lefelé: minden többoszlopos elrendezés egy oszlopba törik */
@media (max-width: 900px) {
  [style*="grid-template-columns"]:not(.nav *) {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 28px !important;
  }
  [style*="grid-template-columns"] > * { min-width: 0; }
  h1, h2, h3 { max-width: none !important; }
  [style*="max-width: 15ch"], [style*="max-width: 52ch"], [style*="max-width: 42ch"] { max-width: none !important; }
  image-slot[style*="aspect-ratio: 4/5"] { aspect-ratio: 4/3 !important; }
  .steps-img { aspect-ratio: 4/3 !important; }
}

/* Telefon */
@media (max-width: 760px) {
  .nav { padding: 8px 0 !important; }
  .nav .btn { display: none !important; }              /* helyette az alsó, fix gomb */
  .nav a[aria-label]:not(.nav-logo) { width: 44px !important; height: 44px !important; }
  .nav-logo { min-width: 0; }
  .nav img.nav-logo-img, .nav-logo img { height: auto !important; width: auto !important; max-height: 56px; max-width: calc(100vw - 40px - 44px - 14px) !important; }
  .nav-icon { display: none !important; }
  .nav > div { grid-template-columns: 1fr auto !important; }
  .nav-links { display: none !important; }

  section, [style*="padding: 64px"], [style*="padding: 72px"], [style*="padding: 80px"] {
    padding-top: 36px !important; padding-bottom: 36px !important;
  }
  [style*="padding: 64px 0 56px"] { padding-top: 28px !important; padding-bottom: 32px !important; }
  h1 { font-size: clamp(28px, 8vw, 36px) !important; }
  h2 { font-size: clamp(24px, 6.6vw, 30px) !important; line-height: 1.18 !important; }
  .btn, button { min-height: 48px; }
  .btn-block, form .btn { width: 100%; }
  /* iOS ne nagyítson az űrlapmezőkre */
  input, select, textarea, .input { font-size: 16px !important; min-height: 48px; }
  input[type="checkbox"] { min-height: 0; }
  form [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
  form[data-newsletter], footer form { flex-direction: column; }
  footer form input[type="email"] { min-width: 0 !important; width: 100%; }
  footer form button { width: 100%; }
  footer { padding-bottom: 96px !important; }         /* ne takarja az alsó fix gomb */
}

/* Kicsi telefonok: a kártyákon belüli 2 oszlopos adatsorok is egymás alá */
@media (max-width: 420px) {
  [style*="repeat(2, minmax(0, 1fr))"]:not(form *) { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
}

/* Űrlap visszajelzés */
.form-msg { margin: 0; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.5; text-align: center; }
.form-msg.ok { background: #e8f6ec; color: #17612e; }
.form-msg.err { background: #fdecec; color: #9b1c1c; }
button[disabled] { opacity: .65; cursor: progress; }

@media (max-width: 900px) {
  figure[style*="max-width: 88%"] { max-width: 100% !important; justify-self: stretch !important; }
}

/* Hamburger menü */
.nav-burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #f4f6fb; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0; flex-shrink: 0; }
.nav-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #2f5fd8; transition: transform .2s, opacity .2s; }
.nav-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-panel { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
  border-bottom: 1px solid #e8ebf1; box-shadow: 0 16px 32px rgba(15,23,42,.12); padding: 8px clamp(20px, 5vw, 72px) 20px; }
.nav-panel a { display: block; padding: 15px 4px; font-size: 17px; font-weight: 600; color: #1b1d23; text-decoration: none; border-bottom: 1px solid #eef0f5; }
.nav-panel a.nav-panel-cta { margin-top: 14px; border: 0; border-radius: 999px; background: #2f5fd8; color: #fff; text-align: center; padding: 15px 20px; }
@media (max-width: 1024px) {
  .nav-burger { display: flex; }
  .nav-panel.is-open { display: block; }
}
@media (min-width: 761px) { .nav-panel a.nav-panel-cta { display: none; } }

/* A ragadós fejléc ne takarja el a szekciók címét horgonyra ugrásnál */
section[id], div[id], [id="signup"] { scroll-margin-top: 72px; }

/* Mintacégek elérhetősége: telefonszám külön sorban, nem tör */
@media (max-width: 760px) {
  .contact-row { flex-direction: column; align-items: flex-start !important; }
  .contact-dot { display: none; }
}

/* Az image-slot csak megjelenítő: ne fogja el az érintést, hogy a kép fölött is lehessen görgetni */
image-slot { pointer-events: none !important; touch-action: auto !important; }

/* Mobil: "A helyzet" szekció – a kép a kérdés (cím) alá kerül */
@media (max-width: 900px) {
  #program > div[style*="grid-template-columns"] { gap: 0 !important; }
  #program > div > div { display: contents; }
  #program > div > div > span { order: 1; }
  #program > div > div > p { order: 2; }
  #program > div > figure { order: 3; margin: 24px 0 8px !important; }
  #program > div > div > div { order: 4; }
}

/* Alsó lebegő gomb: zöld, középre igazított szöveg (hover/fókusz/érintés után sem vált kékre) */
.mobile-cta a.btn, .mobile-cta a.btn:hover, .mobile-cta a.btn:focus, .mobile-cta a.btn:visited {
  background: #2b8a3e !important; border-color: #2b8a3e !important; color: #fff !important;
  text-align: center !important; box-shadow: 0 6px 16px rgba(43,138,62,.3) !important;
}
.mobile-cta a.btn:active { background: #23702f !important; border-color: #23702f !important; }
.mobile-cta a.btn { -webkit-tap-highlight-color: transparent; }

/* Teljes szélességű gombok (űrlap beküldése stb.): szöveg középre, asztali nézeten is */
.btn-block, form button[type="submit"] { justify-content: center !important; text-align: center !important; }

/* Menü panel: elérhetőségek csak telefonon (ott az ikonok nincsenek a fejlécben) */
.nav-panel a.nav-panel-contact { display: none; }
@media (max-width: 760px) { .nav-panel a.nav-panel-contact { display: block; font-weight: 500; font-size: 15px; color: #2f5fd8; } }

/* Navbar logó: egy koppintásra működjön, ne jelölődjön ki (iOS "hover-koppintás" és kijelölés ellen) */
.nav-logo, .nav-logo:hover, .nav-logo:focus, .nav-logo:active {
  color: inherit !important; text-decoration: none !important; outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.nav-logo img { pointer-events: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.nav-burger, .nav-panel a, .nav a, .mobile-cta a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* "Nyíregyházi vállalkozás vagyok" kapcsoló + legördülő mezők */
.local-cb { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.local-toggle { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px solid #d8dce6; border-radius: 16px; background: #f8f9fd; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent; }
.local-toggle:hover { border-color: #9fb3ea; }
.local-toggle strong { display: block; font-size: 16px; color: #1b1d23; }
.local-toggle small { display: block; margin-top: 2px; font-size: 13px; color: #6b7183; }
.local-box { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #b8bfd0; background: #fff; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.local-box svg { opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
.local-cb:focus-visible + .local-toggle { box-shadow: 0 0 0 4px rgba(47,95,216,.25); }
.local-cb:checked + .local-toggle { border-color: #2f5fd8; background: #eef2fd; }
.local-cb:checked + .local-toggle .local-box { background: #2f5fd8; border-color: #2f5fd8; }
.local-cb:checked + .local-toggle .local-box svg { opacity: 1; transform: scale(1); }
.local-cb:checked + .local-toggle small { display: none; }

.reg-fields { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .45s ease, visibility 0s linear .45s; }
.reg-fields > .reg-inner { overflow: hidden; min-height: 0; padding: 0 4px; margin: 0 -4px; }
.local-cb:checked ~ .reg-fields { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .45s ease, visibility 0s; }
@media (prefers-reduced-motion: reduce) { .reg-fields, .local-toggle, .local-box, .local-box svg { transition: none !important; } }

/* Mobil lebegő gomb: alapból rejtve, görgetésre becsúszik, a regisztrációs modulnál eltűnik */
html.cta-js .mobile-cta {
  transform: translateY(110%); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s;
}
html.cta-js.cta-visible .mobile-cta {
  transform: none; opacity: 1; visibility: visible; pointer-events: auto;
  transition: transform .3s ease, opacity .3s ease, visibility 0s;
}
@media (prefers-reduced-motion: reduce) { html.cta-js .mobile-cta { transition: none !important; } }

/* 2. lépés: székhely / telephely, utána a további mezők */
.reg-step { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 700; color: #1b1d23; }
.reg-step-n { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 999px; background: #2f5fd8; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.reg-hint { margin: 0; font-size: 13.5px; color: #6b7183; }
.input[readonly] { background: #eef0f5 !important; color: #555b6b; cursor: not-allowed; }
.reg-more { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .45s ease, visibility 0s linear .45s; }
.reg-more > .reg-inner { overflow: hidden; min-height: 0; padding: 0 4px; margin: 0 -4px; }
.reg-form[data-s2] .reg-more { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .45s ease, visibility 0s; }
.reg-form[data-s2] .reg-next-wrap { display: none; }
@media (prefers-reduced-motion: reduce) { .reg-more { transition: none !important; } }

/* "Tovább" gomb a 2. lépésben */
.reg-next-wrap { display: grid; gap: 10px; justify-items: start; }
.reg-next { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 34px; border: 0; border-radius: 999px; background: #2f5fd8; color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(47,95,216,.3); transition: background .2s, box-shadow .2s, transform .15s; -webkit-tap-highlight-color: transparent; }
.reg-next:hover:not(:disabled) { background: #1f4499; transform: translateY(-1px); }
.reg-next:disabled { background: #c9cfdd; color: #fff; box-shadow: none; cursor: not-allowed; }
@media (max-width: 760px) { .reg-next { width: 100%; } .reg-next-wrap { justify-items: stretch; } .reg-hint { text-align: center; } }

/* Regisztrációs blokk: animált logó – asztalon balra, mobilon (form fölötte) felfelé mutat */
@media (max-width: 900px) {
  .logo-anim-left { display: none !important; }
  .logo-anim-up { display: block !important; max-width: 300px; margin: 0 auto; }
}

/* Regisztrációs blokk: animált ikon fehér kártyán – asztalon balra, mobilon felfelé (a form felé) mutat */
@media (max-width: 900px) {
  .signup-icon-card { padding: 28px !important; }
  .signup-icon-card .logo-anim-up { max-width: 200px !important; }
}

/* A design-komponens szaggatott "üres hely" kerete ne látszódjon a fotókon */
image-slot::part(ring) { display: none !important; }
