/* LAWTER v5.10.0 — production stabilization, multilingual QA and device hardening */

/* Global layout resilience */
html{scroll-padding-top:calc(var(--header) + 20px);overflow-x:clip}
body{min-height:100vh;min-height:100dvh;overflow-x:clip}
#main,.section,.shell,.site-header,.site-footer{max-width:100%}
#kezdolap,#tevekenysegek,#mukodes,#rolunk,#evidence,#kapcsolat,[id]{scroll-margin-top:calc(var(--header) + 24px)}
img{height:auto}
.hero-grid-v5>*,.capability-matrix>*,.operating-grid>*,.about-grid-v5>*,.corporate-proof-grid>*,.contact-grid-v5>*{min-width:0}

/* Header + WordPress admin bar coexistence */
.admin-bar .site-header{top:32px}
@media(max-width:782px){.admin-bar .site-header{top:46px}}
.site-header{transition:background .24s ease,border-color .24s ease,box-shadow .24s ease,transform .24s ease}
.site-header.scrolled{background:rgba(2,11,23,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);box-shadow:0 10px 32px rgba(0,0,0,.18)}
.header-inner{min-width:0}
.main-nav{min-width:0}

/* 16-language popover: stays usable instead of becoming a long column. */
.lang-panel{
  width:min(520px,calc(100vw - 32px));
  max-height:min(72vh,620px);
  overflow:auto;
  overscroll-behavior:contain;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  padding:12px;
  scrollbar-width:thin;
  scrollbar-color:rgba(194,158,106,.45) rgba(4,19,38,.7);
}
.lang-panel a{min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;padding:12px 14px;border:1px solid transparent}
.lang-panel a:hover,.lang-panel a:focus-visible,.lang-panel a.active{border-color:rgba(194,158,106,.30);background:rgba(194,158,106,.09)}
.lang-panel a span{display:grid;place-items:center;min-height:32px;border:1px solid rgba(194,158,106,.20);color:var(--gold-300);font-size:10px;font-weight:800;letter-spacing:.08em}

/* Language-specific typography. Long German, Ukrainian, Greek, Polish, Romanian and Slovak titles remain editorial. */
.lang-de h1,.lang-uk h1,.lang-el h1,.lang-pl h1,.lang-ro h1,.lang-sk h1{font-size:clamp(50px,6.45vw,98px);line-height:.96;letter-spacing:-.04em}
.lang-de h2,.lang-uk h2,.lang-el h2,.lang-pl h2,.lang-ro h2,.lang-sk h2{font-size:clamp(40px,4.8vw,70px);line-height:1}
.lang-pt h1,.lang-it h1,.lang-es h1,.lang-fr h1{font-size:clamp(50px,6.75vw,102px)}
.lang-zh{font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",var(--sans)}
.lang-zh h1,.lang-zh h2,.lang-zh h3{font-family:"Noto Serif SC","Songti SC","STSong",serif;letter-spacing:-.02em;line-height:1.05;text-wrap:pretty}
.lang-zh .eyebrow,.lang-zh .btn,.lang-zh .nav-cta,.lang-zh .main-nav{letter-spacing:.08em}
.lang-el h1,.lang-el h2,.lang-el h3{font-family:"Palatino Linotype",Palatino,"Times New Roman",var(--serif)}
.lang-pl h1,.lang-pl h2,.lang-ro h1,.lang-ro h2,.lang-sk h1,.lang-sk h2{hyphens:auto}
.hero-copy h1,.service-hero-copy h1,.about-copy-v5 h2,.corporate-proof-copy h2,.contact-copy-v5 h2{overflow-wrap:normal;word-break:normal;text-wrap:balance}

/* Flagship hero: robust, equal-height and no collision with rail. */
.hero-v5{min-height:calc(100svh - var(--header));display:grid;align-items:center}
.hero-grid-v5{grid-template-columns:minmax(0,1.618fr) minmax(420px,1fr);gap:clamp(48px,5vw,86px)}
.hero-copy{align-self:center;padding-block:clamp(42px,7vh,88px)}
.hero-structure{min-width:0;max-width:100%;contain:layout paint}
.hero-sector-preview{max-width:calc(100% - 72px)}
.section-rail{right:max(18px,env(safe-area-inset-right));z-index:25}

/* Capability stage: prevent empty left panel and make the visual deterministic. */
.capability-matrix{grid-template-columns:minmax(360px,.88fr) minmax(0,1.12fr);gap:0}
.capability-media{display:block!important;min-height:clamp(620px,64vw,790px)}
.capability-media-base,.capability-media-image{object-position:center center}
.capability-list{min-width:0}
.capability-row>a{grid-template-columns:84px minmax(0,1fr) 34px}
.capability-text{min-width:0}

/* Company and proof blocks */
.about-photo-frame img{aspect-ratio:1365/2048;height:auto;max-height:720px;object-fit:cover;object-position:center 52%}
.corporate-proof-copy,.proof-showcase{min-width:0}
.proof-metric-card strong{font-variant-numeric:tabular-nums}

/* Form: iOS avoids zoom, error/success states stay stable. */
.contact-form-v5 input,.contact-form-v5 select,.contact-form-v5 textarea{font-size:16px}
.contact-form-v5 input,.contact-form-v5 select,.contact-form-v5 textarea{min-width:0}
.contact-form-v5 .form-row{min-width:0}
.form-feedback[hidden]{display:none!important}
.form-feedback:not([hidden]){display:flex}

/* Popup and overlay fallbacks for Safari / browsers without backdrop-filter. */
@supports not ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))){
  .site-header.scrolled,.lang-panel,.cap-panel,.hero-sector-preview,.cookie-modal-card,.cookie-banner,.contact-form-v5{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background-color:#041326!important}
}

/* Laptop / small desktop: hide rail before it can compete with content. */
@media(max-width:1480px){
  .section-rail{display:none!important}
  .hero-grid-v5{grid-template-columns:minmax(0,1.52fr) minmax(390px,1fr);gap:clamp(36px,4vw,64px)}
}

@media(max-width:1180px){
  :root{--shell:min(1080px,calc(100% - 48px))}
  .hero-v5{min-height:auto}
  .hero-grid-v5{grid-template-columns:1fr;gap:34px}
  .hero-copy{padding-block:54px 10px;max-width:880px}
  .hero-structure{width:min(860px,100%);justify-self:center}
  .capability-matrix{grid-template-columns:minmax(300px,.85fr) minmax(0,1.15fr)}
  .about-grid-v5,.corporate-proof-grid,.contact-grid-v5{gap:clamp(32px,4vw,54px)}
}

@media(max-width:960px){
  :root{--header:76px;--shell:calc(100% - 36px)}
  html{scroll-padding-top:calc(var(--header) + 12px)}
  #kezdolap,#tevekenysegek,#mukodes,#rolunk,#evidence,#kapcsolat,[id]{scroll-margin-top:calc(var(--header) + 16px)}
  .main-nav{height:calc(100dvh - var(--header));max-height:calc(100dvh - var(--header));overflow:auto;overscroll-behavior:contain;padding-bottom:max(28px,env(safe-area-inset-bottom))}
  .admin-bar .main-nav{height:calc(100dvh - var(--header) - 46px);max-height:calc(100dvh - var(--header) - 46px)}
  .lang-panel{width:100%;max-height:none;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;padding:8px 0}
  .hero-copy{padding-top:42px}
  .hero-structure{contain:none}
  .capability-matrix{grid-template-columns:1fr;gap:20px}
  .capability-media{min-height:520px;order:0}
  .capability-list{order:1}
  .capability-mobile-image{display:none!important}
  .about-grid-v5,.corporate-proof-grid,.contact-grid-v5,.operating-grid{grid-template-columns:1fr!important}
  .about-photo-frame{width:min(560px,100%);justify-self:center}
}

@media(max-width:700px){
  :root{--shell:calc(100% - 28px);--s7:92px}
  .lang-panel{grid-template-columns:1fr}
  .lang-panel a{grid-template-columns:44px minmax(0,1fr)}
  .hero-copy h1{font-size:clamp(46px,13vw,72px)}
  .hero-actions{display:grid;grid-template-columns:1fr;gap:10px}
  .hero-actions .btn{width:100%}
  .hero-structure{padding:18px}
  .hero-structure-head{gap:10px}
  .hero-structure-kicker,.hero-structure-count{padding:12px}
  .hero-sector-preview{max-width:100%;grid-template-columns:54px minmax(0,1fr);padding:16px}
  .hero-sector-link{grid-column:2;justify-self:start}
  .capability-media{min-height:440px}
  .capability-media figcaption{inset:auto 14px 14px 14px;padding:18px}
  .capability-row>a{grid-template-columns:58px minmax(0,1fr) 24px;min-height:118px;gap:12px}
  .capability-no{width:50px;height:50px;font-size:21px}
  .operating-step{grid-template-columns:58px minmax(0,1fr)}
  .operating-step>span{width:52px;height:52px;font-size:22px}
  .about-photo-frame img{max-height:none}
  .proof-metrics{grid-template-columns:1fr}
  .proof-metric-card--wide{grid-template-columns:1fr}
}

@media(max-width:430px){
  :root{--shell:calc(100% - 24px);--header:70px}
  .brand-master-logo{max-width:76px}
  .hero-copy{padding-top:30px}
  .hero-copy h1{font-size:clamp(42px,12.4vw,58px);line-height:.98}
  .lang-de h1,.lang-uk h1,.lang-el h1,.lang-pl h1,.lang-ro h1,.lang-sk h1{font-size:clamp(38px,11.4vw,52px)}
  .hero-structure{padding:14px}
  .structure-pillars{gap:8px}
  .structure-pillar{padding:12px;grid-template-columns:38px minmax(0,1fr)}
  .pillar-no{width:38px;height:38px;font-size:19px}
  .pillar-label strong{font-size:14px}
  .hero-sector-copy strong{font-size:26px}
  .capability-media{min-height:390px}
  .capability-text h3{font-size:23px}
  .capability-text p{font-size:13px;line-height:1.48}
  .contact-form-v5{padding-inline:14px}
}

/* 4K and ultrawide: preserve intentional rhythm, do not stretch infinitely. */
@media(min-width:2200px){
  :root{--shell:min(1500px,calc(100% - 160px))}
  .hero-grid-v5{gap:110px}
  .section{padding-block:160px}
  .hero-structure{max-width:620px;justify-self:end}
}

/* Motion/accessibility guarantees */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
  .hero-sector-backdrop,.capability-media-image{transform:none!important}
}

/* Broken-image fallback never exposes browser broken-image chrome. */
.lawter-image-error{opacity:0!important}
.lawter-image-fallback{background:
  linear-gradient(135deg,rgba(194,158,106,.12),transparent 35%),
  radial-gradient(circle at 70% 20%,rgba(16,51,84,.72),transparent 42%),
  var(--navy-900)!important}
