/* v3.8.3 — Front UI Polish / Layout Harmony
   Warstwa dopracowania widoków po testach ekranów: mniej pustych przestrzeni,
   lepsze shelle podstron, czytelniejsze formularze i spójniejszy rytm kart. */

:root,
body.fo-r-ui-v383{
  --fo-v383-page-max:1120px;
  --fo-v383-wide-max:1240px;
  --fo-v383-gutter:clamp(18px,3.2vw,42px);
  --fo-v383-section-gap:clamp(34px,4vw,58px);
  --fo-v383-card-gap:clamp(14px,1.7vw,22px);
  --fo-v383-card-pad:clamp(20px,2.2vw,30px);
  --fo-v383-hero-pad:clamp(28px,3.4vw,44px);
  --fo-v383-soft-shell:rgba(247,243,234,.58);
  --fo-v383-card-bg:rgba(255,255,255,.82);
  --fo-v383-card-border:rgba(14,95,103,.10);
  --fo-v383-shadow-soft:0 22px 58px rgba(14,61,74,.08),0 8px 24px rgba(16,24,40,.045);
  --fo-v383-shadow-card:0 18px 48px rgba(14,61,74,.075),inset 0 1px 0 rgba(255,255,255,.82);
}

body.fo-r-ui-v383 :where(.fo-r-wrap,.fo-r-app-shell,.fo-theme-shell){
  gap:var(--fo-v383-section-gap)!important;
}

body.fo-r-ui-v383 :where(.fo-r-wrap){
  width:min(var(--fo-v383-page-max),calc(100% - (var(--fo-v383-gutter) * 2)))!important;
  margin:clamp(34px,4vw,58px) auto clamp(64px,7vw,94px)!important;
}

/* Strony WordPress z shortcode: usuwamy zdublowany tytuł i ciężki shell strony. */
body.fo-r-ui-v383 :where(.fo-prosta-strona):has(.fo-r-wrap){
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.fo-r-ui-v383 :where(.fo-prosta-strona article):has(.fo-r-wrap){
  max-width:none!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border-radius:0!important;
}
body.fo-r-ui-v383 :where(.fo-prosta-strona article):has(.fo-r-wrap) > h1:first-child{
  display:none!important;
}
body.fo-r-ui-v383 :where(.fo-prosta-strona article):has(.fo-r-wrap) .fo-r-wrap:first-child{
  margin-top:clamp(40px,5vw,72px)!important;
}

/* Page hero / nagłówki shortcode. */
body.fo-r-ui-v383 :where(.fo-r-panel-head,.fo-r-hero-v3765,.fo-r-app-hero){
  border-radius:clamp(28px,2.8vw,38px)!important;
  padding:var(--fo-v383-hero-pad)!important;
  border:1px solid var(--fo-v383-card-border)!important;
  background:
    radial-gradient(circle at 90% 8%,rgba(255,255,255,.86),transparent 36%),
    linear-gradient(135deg,rgba(255,255,255,.86),rgba(247,243,234,.72))!important;
  box-shadow:var(--fo-v383-shadow-soft)!important;
  color:var(--fo-text-heading,#0B3D4A)!important;
}
body.fo-r-ui-v383 :where(.fo-r-panel-head,.fo-r-hero-v3765):before{
  opacity:.34!important;
  filter:blur(4px)!important;
}
body.fo-r-ui-v383 :where(.fo-r-panel-head h1,.fo-r-hero-v3765 h1,.fo-r-app-hero h1){
  max-width:820px!important;
  font-size:clamp(34px,4.2vw,58px)!important;
  line-height:1.02!important;
  letter-spacing:-.045em!important;
  color:var(--fo-text-heading,#0B3D4A)!important;
  margin:8px 0 12px!important;
}
body.fo-r-ui-v383 :where(.fo-r-panel-head p,.fo-r-hero-v3765 p,.fo-r-app-hero p){
  max-width:700px!important;
  color:var(--fo-text-secondary,#5f6d66)!important;
  font-size:clamp(15px,1.05vw,17px)!important;
  line-height:1.66!important;
}
body.fo-r-ui-v383 :where(.fo-r-mini,.fo-r-card-eyebrow,.fo-r-card-pill,.fo-r-home-section-title span,.fo-r-section-head-v3765 .fo-r-mini){
  min-height:30px!important;
  padding:7px 11px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(201,79,55,.14)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.78)!important;
  color:var(--fo-action-accent,#C94F37)!important;
  font-size:11px!important;
  line-height:1!important;
}

/* Karty: jeden rytm, mniej przypadkowego powiększania. */
body.fo-r-ui-v383 :where(.fo-r-karta,.fo-card,.fo-r-app-section,.fo-r-content-card-v3765,.fo-r-thread-v3765,.fo-r-empty-v3765){
  border-radius:clamp(24px,2.2vw,32px)!important;
  padding:var(--fo-v383-card-pad)!important;
  background:var(--fo-v383-card-bg)!important;
  border:1px solid rgba(14,95,103,.09)!important;
  box-shadow:var(--fo-v383-shadow-card)!important;
}
body.fo-r-ui-v383 :where(.fo-r-karta:hover,.fo-card:hover,.fo-r-content-card-v3765:hover,.fo-r-thread-v3765:hover){
  transform:translateY(-2px)!important;
  box-shadow:0 22px 58px rgba(14,61,74,.10),inset 0 1px 0 rgba(255,255,255,.86)!important;
}
body.fo-r-ui-v383 :where(.fo-r-karta h2,.fo-r-karta h3,.fo-r-content-card-v3765 h3,.fo-r-app-section h2){
  color:var(--fo-text-heading,#0B3D4A)!important;
  letter-spacing:-.03em!important;
}
body.fo-r-ui-v383 :where(.fo-r-karta h2,.fo-r-app-section-head h2){
  font-size:clamp(26px,2.8vw,40px)!important;
  line-height:1.06!important;
}
body.fo-r-ui-v383 :where(.fo-r-karta h3,.fo-r-content-card-v3765 h3){
  font-size:clamp(20px,1.9vw,28px)!important;
  line-height:1.1!important;
}
body.fo-r-ui-v383 :where(.fo-r-karta p,.fo-r-content-card-v3765 p,.fo-r-app-section p){
  color:var(--fo-text-secondary,#667085)!important;
}
body.fo-r-ui-v383 :where(.fo-r-siatka,.fo-r-grid-v3765,.fo-r-hub-grid-v3765,.fo-r-category-grid-v3765){
  gap:var(--fo-v383-card-gap)!important;
}

/* Shortcode forum/oferty/artykuly: bardziej premium, mniej pustego beżowego pola. */
body.fo-r-ui-v383 :where(.fo-r-forum-v3765,.fo-r-artykuly-v3765,.fo-r-oferty-v3765,.fo-r-jezyk-v3765){
  position:relative;
}
body.fo-r-ui-v383 :where(.fo-r-forum-v3765,.fo-r-artykuly-v3765,.fo-r-oferty-v3765,.fo-r-jezyk-v3765):before{
  content:"";
  position:absolute;
  inset:clamp(78px,8vw,118px) -22px auto -22px;
  height:min(62vh,620px);
  border-radius:44px;
  background:linear-gradient(180deg,rgba(247,243,234,.58),rgba(247,243,234,0));
  pointer-events:none;
  z-index:-1;
}
body.fo-r-ui-v383 :where(.fo-r-filtry,.fo-r-filtry-v3765,.fo-r-szukaj){
  border-radius:28px!important;
  padding:clamp(16px,1.8vw,22px)!important;
  background:rgba(255,255,255,.82)!important;
  border:1px solid rgba(14,95,103,.09)!important;
  box-shadow:var(--fo-v383-shadow-card)!important;
}
body.fo-r-ui-v383 :where(.fo-r-filtry input,.fo-r-filtry select,.fo-r-szukaj input,.fo-r-form input:not([type="checkbox"]):not([type="radio"]),.fo-r-form textarea,.fo-r-form select){
  min-height:48px!important;
  border-radius:17px!important;
  background:rgba(255,255,255,.92)!important;
  border-color:rgba(14,95,103,.13)!important;
}

/* Zgody RODO — checkboxy jak część systemu, nie surowe pola HTML. */
body.fo-r-ui-v383 .fo-r-v3766-consents{
  gap:12px!important;
  margin:18px 0 20px!important;
  padding:18px!important;
  border-radius:24px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.86),rgba(248,250,252,.72))!important;
  border:1px solid rgba(14,95,103,.10)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 14px 36px rgba(16,24,40,.055)!important;
}
body.fo-r-ui-v383 .fo-r-v3766-consents label{
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
  margin:0!important;
  padding:6px 2px!important;
  color:var(--fo-text-heading,#0B3D4A)!important;
  font:760 13.5px/1.5 var(--fo-font-body,Inter,sans-serif)!important;
}
body.fo-r-ui-v383 .fo-r-v3766-consents input[type="checkbox"]{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  min-height:22px!important;
  margin:0!important;
  border-radius:7px!important;
  border:1.5px solid rgba(14,95,103,.24)!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
  display:grid!important;
  place-items:center!important;
  cursor:pointer!important;
}
body.fo-r-ui-v383 .fo-r-v3766-consents input[type="checkbox"]:checked{
  border-color:transparent!important;
  background:linear-gradient(135deg,var(--fo-action-primary,#0E5F67),var(--fo-action-primary-2,#2E7D65))!important;
}
body.fo-r-ui-v383 .fo-r-v3766-consents input[type="checkbox"]:checked:after{
  content:"✓";
  color:#fff;
  font-size:14px;
  font-weight:950;
  line-height:1;
}
body.fo-r-ui-v383 .fo-r-v3766-consents a{
  color:var(--fo-action-primary,#0E5F67)!important;
  border-bottom:1px solid rgba(14,95,103,.28)!important;
}

/* Przyciski i kontrolki — ostrzejsza hierarchia. */
body.fo-r-ui-v383 :where(.fo-r-btn,.fo-button,.fo-przycisk,input[type="submit"].fo-r-btn){
  border-radius:17px!important;
  min-height:46px!important;
  font-weight:900!important;
}
body.fo-r-ui-v383 :where(.fo-r-btn-drugi,.fo-r-btn-light,.fo-button--secondary){
  background:rgba(255,255,255,.82)!important;
  color:var(--fo-action-primary,#0E5F67)!important;
  border:1px solid rgba(14,95,103,.12)!important;
  box-shadow:0 12px 28px rgba(16,24,40,.055)!important;
}

@media(max-width:980px){
  body.fo-r-ui-v383 :where(.fo-r-wrap){width:min(100% - 28px,var(--fo-v383-page-max))!important;margin-top:34px!important;gap:30px!important;}
  body.fo-r-ui-v383 :where(.fo-r-hero-v3765,.fo-r-panel-head,.fo-r-app-hero){padding:24px!important;border-radius:28px!important;}
  body.fo-r-ui-v383 :where(.fo-r-hero-v3765__actions,.fo-r-app-actions){display:grid!important;grid-template-columns:1fr!important;width:100%!important;}
  body.fo-r-ui-v383 :where(.fo-r-hero-v3765__actions .fo-r-btn,.fo-r-app-actions .fo-r-btn){width:100%!important;}
}
@media(max-width:640px){
  body.fo-r-ui-v383{--fo-v383-gutter:14px;--fo-v383-section-gap:28px;--fo-v383-card-pad:18px;}
  body.fo-r-ui-v383 :where(.fo-r-wrap){width:min(100% - 22px,var(--fo-v383-page-max))!important;}
  body.fo-r-ui-v383 :where(.fo-r-panel-head h1,.fo-r-hero-v3765 h1,.fo-r-app-hero h1){font-size:clamp(31px,10vw,42px)!important;}
  body.fo-r-ui-v383 .fo-r-v3766-consents{padding:14px!important;border-radius:20px!important;}
}
