/* =========================
   EDUmaro - Design Tokens
   Stage 1: foundation
   ========================= */

:root {
  /* Brand */
  --primary-900: #04347A;
  --primary-800: #0B3F8F;
  --primary-100: #E8F0FF;

  /* Neutral */
  --neutral-900: #0B1220;
  --neutral-700: #334155;
  --neutral-500: #64748B;
  --neutral-200: #E2E8F0;
  --neutral-100: #F1F5F9;
  --white: #FFFFFF;

  /* Accent (use sparingly) */
  --accent-amber: #F59E0B;
  --success: #16A34A;
  --danger: #DC2626;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --fs-body: 16px;
  --lh-body: 1.6;

  --fs-h1: clamp(28px, 4vw, 44px);
  --fs-h2: clamp(22px, 3vw, 32px);
  --fs-h3: clamp(18px, 2.2vw, 22px);

  /* Spacing (8px system) */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 88px;

  /* Layout */
  --container: 1160px;
  --gutter: 24px;

  /* UI */
  --radius: 14px;
  --radius-lg: 18px;

  --shadow-sm: 0 6px 16px rgba(11, 18, 32, 0.08);
  --shadow-md: 0 10px 28px rgba(11, 18, 32, 0.10);

  --border: 1px solid var(--neutral-200);

  /* Sticky header offset (będzie użyte przy scroll) */
  --header-h: 72px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 160ms;
  --dur-2: 260ms;
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Etap 2: smooth scroll */
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--neutral-900);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Zapobiega poziomemu przewijaniu przy złych wartościach */
  overflow-x: hidden;
}

/* Text wrapping rules (żeby nie łamało w połowie wyrazu bez potrzeby) */
p, li, a, span, small, strong {
  word-break: normal;
  overflow-wrap: break-word;
}

/* Links */
a {
  color: var(--primary-900);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Headings */
h1, h2, h3 {
  margin: 0 0 var(--space-3) 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-h1); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }

p { margin: 0 0 var(--space-3) 0; color: var(--neutral-700); }

/* Utility: container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Utility: sections */
.section {
  padding: var(--space-8) 0;
}
.section--alt {
  background: var(--neutral-100);
}
.section--tight {
  padding: var(--space-7) 0;
}

/* Placeholder styles (na Etap 2) */
.placeholder {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Visually-hidden (a11y) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}



/* =========================
   Stage 3: Components + Header/Nav
   ========================= */

/* Global focus (a11y) */
:focus-visible {
  outline: 3px solid rgba(11, 63, 143, 0.25);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary-900);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(4, 52, 122, 0.18);
}

.btn-primary:hover {
  background: var(--primary-800);
  text-decoration: none;
}

.btn-ghost {
  background: var(--white);
  color: var(--neutral-900);
  border-color: var(--neutral-200);
}

.btn-ghost:hover {
  border-color: rgba(4, 52, 122, 0.22);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

/* Cards */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card--flat {
  box-shadow: none;
}

.card-pad {
  padding: var(--space-7);
}

.card-pad-sm {
  padding: var(--space-4);
}

.card-hover {
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(4, 52, 122, 0.18);
}

/* Section header pattern */
.section-head {
  margin-bottom: var(--space-5);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-800);
  margin-bottom: var(--space-2);
}

.section-eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--primary-900);
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }
}

/* Blueprint background (subtle) */
.bg-blueprint {
  background:
    linear-gradient(to right, rgba(226,232,240,0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226,232,240,0.55) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px rgba(11, 18, 32, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 220px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--primary-100);
  border: 1px solid var(--neutral-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-900);
  font-weight: 800;
}

.brand-text strong {
  display: block;
  color: var(--neutral-900);
  line-height: 1.1;
}

.brand-text small {
  display: block;
  color: var(--neutral-500);
  line-height: 1.1;
  margin-top: 2px;
}

/* Desktop nav */
.main-nav {
  display: none;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--neutral-900);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  text-decoration: none;
}

.nav-link:hover {
  background: var(--neutral-100);
  text-decoration: none;
}

.nav-link.is-active {
  color: var(--primary-900);
  background: rgba(232, 240, 255, 0.85);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-phone {
  font-weight: 700;
  color: var(--neutral-900);
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover { text-decoration: underline; }

@media (min-width: 1024px) {
  .main-nav { display: flex; }
}

/* Mobile nav */
.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mobile-toggle { display: none; }
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(11,18,32,0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
  z-index: 1200;
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(92vw, 420px);
  background: var(--white);
  border-left: 1px solid var(--neutral-200);
  transform: translateX(20px);
  transition: transform var(--dur-2) var(--ease);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-drawer.is-open .mobile-panel {
  transform: translateX(0);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--space-2);
}

.mobile-nav .nav-link {
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 16px;
}

.mobile-close-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  cursor: pointer;
}

/* Hero layout */
.hero-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border);
  background: linear-gradient(180deg, rgba(232,240,255,0.75), rgba(255,255,255,1));
}

.hero-inner {
  padding: var(--space-7);
}

@media (min-width: 900px) {
  .hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-6);
    align-items: start;
  }
}

.hero-copy p {
  max-width: 62ch;
}

.badge-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-100);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-900);
  font-weight: 700;
  font-size: 13px;
}

/* Small form styles (for hero quick form later) */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 600;
  color: var(--neutral-900);
  font-size: 14px;
}

input, select, textarea {
  font: inherit;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 12px 12px;
  background: var(--white);
  color: var(--neutral-900);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

textarea { min-height: 120px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(4, 52, 122, 0.45);
  box-shadow: 0 0 0 4px rgba(232, 240, 255, 0.95);
}

.helper {
  color: var(--neutral-500);
  font-size: 13px;
}

/* Anchor offset helper (not required but handy for in-page links) */
.scroll-target {
  scroll-margin-top: calc(var(--header-h) + 18px);
}


/* =========================
   Stage 4: Section layouts
   ========================= */

/* Generic muted panel */
.panel {
  background: var(--neutral-100);
  border: var(--border);
  border-radius: var(--radius);
}

/* Hero right card tweaks */
.hero-inner aside.card {
  position: relative;
}
@media (min-width: 900px) {
  .hero-inner aside.card {
    top: 8px;
  }
}

/* About / profile section */
.profile {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 900px) {
  .profile {
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-6);
  }
}

.photo-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
}


.photo .mono {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: rgba(4,52,122,0.08);
  border: 1px solid rgba(4,52,122,0.16);
  display: grid;
  place-items: center;
  color: var(--primary-900);
  font-weight: 800;
  letter-spacing: 0.02em;
  font-size: 28px;
}

.photo-caption {
  margin-top: var(--space-3);
  display: grid;
  gap: 2px;
}

.photo-caption strong {
  color: var(--neutral-900);
}

.photo-caption small {
  color: var(--neutral-500);
}

/* Scope mini cards */
.scope-cards {
  margin-top: var(--space-5);
}

.scope-cards .card {
  box-shadow: none;
}

.scope-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.scope-pill {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-900);
  background: rgba(232,240,255,0.9);
  border: 1px solid rgba(4,52,122,0.18);
  padding: 6px 10px;
  border-radius: 999px;
}

/* Services grid */
.services-grid {
  margin-top: var(--space-5);
}

.service-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  margin-bottom: 0;
  color: var(--neutral-700);
}

.service-footer {
  margin-top: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.service-link {
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.service-link:hover {
  text-decoration: underline;
}

.service-meta {
  color: var(--neutral-500);
  font-size: 13px;
}

/* Pillar cards (BHP training and services) */
.pillar-grid {
  margin-top: var(--space-5);
}

.pillar-card h3 {
  margin-bottom: 8px;
}

.list {
  margin: var(--space-3) 0 0 0;
  padding-left: 18px;
  color: var(--neutral-700);
}

.list li {
  margin-bottom: 8px;
}

/* Process stepper */
.stepper {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .stepper {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-3);
    align-items: stretch;
  }
}

.step {
  position: relative;
  padding: var(--space-4);
  border-radius: var(--radius);
  border: var(--border);
  background: var(--white);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(232,240,255,0.9);
  border: 1px solid rgba(4,52,122,0.18);
  display: grid;
  place-items: center;
  color: var(--primary-900);
  font-weight: 800;
  margin-bottom: var(--space-3);
}

.step strong {
  display: block;
  margin-bottom: 6px;
  color: var(--neutral-900);
}

.step p {
  margin: 0;
  color: var(--neutral-700);
}

/* UDT grid list */
.udt-grid {
  margin-top: var(--space-5);
}

.udt-item {
  padding: var(--space-4);
  border-radius: var(--radius);
  border: var(--border);
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.udt-item strong {
  color: var(--neutral-900);
}

.udt-item small {
  color: var(--neutral-500);
}

/* FAQ accordion */
.faq {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-3);
}

.faq-item {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.faq-btn {
  width: 100%;
  text-align: left;
  padding: var(--space-4);
  background: var(--white);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.faq-btn span {
  font-weight: 700;
  color: var(--neutral-900);
}

.faq-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-100);
  position: relative;
  flex: 0 0 auto;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--neutral-900);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::before {
  width: 14px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 14px;
}

.faq-item.is-open .faq-icon {
  background: rgba(232,240,255,0.9);
  border-color: rgba(4,52,122,0.18);
}

.faq-item.is-open .faq-icon::after {
  display: none;
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-2) var(--ease);
  border-top: 1px solid var(--neutral-200);
  background: rgba(241,245,249,0.5);
}

.faq-panel-inner {
  padding: var(--space-4);
}

.faq-panel-inner p {
  margin: 0;
  color: var(--neutral-700);
}

/* Contact section */
.contact-grid {
  margin-top: var(--space-5);
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: var(--space-6);
  }
}

.contact-card {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--white);
  border: var(--border);
  box-shadow: var(--shadow-sm);
}

.contact-kicker {
  color: var(--neutral-500);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 8px;
}

.contact-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.contact-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-4);
}

.contact-line a {
  font-weight: 700;
}

.contact-legal {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--neutral-200);
  color: var(--neutral-500);
  font-size: 14px;
}

/* Form layout */
.form-grid {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 520px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.form-actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
  display: none;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: rgba(220,38,38,0.55);
  box-shadow: 0 0 0 4px rgba(220,38,38,0.08);
}

.field.is-invalid .form-error {
  display: block;
}

/* =========================
   Hero full-width background
   ========================= */

.hero {
  /* Full width tło */
  background: linear-gradient(180deg, rgba(232,240,255,0.85), rgba(255,255,255,1));
  position: relative;
}

/* delikatny blueprint jako motyw */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(226,232,240,0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226,232,240,0.55) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.55;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  padding: var(--space-7) -20;
  display: grid;
  gap: var(--space-6);
}

/* CTA */
.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

/* kolumny */
@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }
}

.hero-side .card {
  border-radius: var(--radius-lg);
}
/* =========================
   Form polish: select + checkbox
   ========================= */

/* Select: remove ugly arrows and add custom arrow */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px; /* space for arrow */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--neutral-700) 50%),
    linear-gradient(135deg, var(--neutral-700) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position:
    calc(100% - 20px) 52%,
    calc(100% - 14px) 52%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

/* checkbox styling */
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  color: var(--neutral-700);
  font-size: 14px;
  line-height: 1.4;
}

.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 6px;
  border: 1px solid var(--neutral-200);
  accent-color: var(--primary-900);
}

.check span {
  flex: 1;
}

/* =========================
   Lists polish (żeby nie wyglądały "zwykle")
   ========================= */

.list {
  list-style: none;
  padding-left: 0;
  margin-top: var(--space-3);
}

.list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--neutral-700);
}

/* replace default bullet with subtle tick */
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: rgba(232, 240, 255, 0.95);
  border: 1px solid rgba(4, 52, 122, 0.18);
}

.list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--primary-900);
  border-bottom: 2px solid var(--primary-900);
  transform: rotate(-45deg);
}
.photo {
  border-radius: 16px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  overflow: hidden;

  /* USUŃ to ↓ */
  /* aspect-ratio: 4 / 5; */
  /* display: grid; */
  /* place-items: center; */
}

.photo img{
  width: 100%;
  height: auto;        /* kluczowe */
  object-fit: contain; /* pokazuje całe zdjęcie */
  display: block;
}

/* =========================
   UDT thumbnails
   ========================= */

.udt-item {
  overflow: hidden; /* żeby thumb nie wychodził poza card */
}

.udt-thumb {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-100);
  margin-bottom: 12px;
}

/* kontrola proporcji miniatur */
.udt-thumb img {
  width: 100%;
  height: 140px;      /* możesz zwiększyć do 160 jeśli chcesz większe */
  object-fit: cover;
  display: block;
}

/* Na większych ekranach trochę większe miniatury */
@media (min-width: 1024px) {
  .udt-thumb img {
    height: 150px;
  }
}

.udt-item {
  display: flex;
  flex-direction: column;
}

.udt-item .service-link {
  margin-top: auto;
  padding-top: 10px;
}

.btn {
  font-size: 15px;
}
.h2-uslugi{
  width: 100%;
  text-align: center;
}


/* Smaller H3 only in Services tiles */
.service-title{
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.field .form-error{
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: #b42318;
}

.field.is-invalid .form-error{
  display: block;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea{
  border-color: rgba(180, 35, 24, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 228, 230, 0.9);
}

.brand-mark{ overflow: hidden; }


/* =========================
   Reviews (Opinie)
========================= */

.section-head--center{
  text-align: center;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.reviews-grid{
  margin-top: var(--space-6);
  align-items: stretch;
}

.review-card{
  border-radius: var(--radius-lg);
}

.review-top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.review-person strong{
  display: block;
  font-size: 16px;
  line-height: 1.2;
  color: var(--neutral-900);
}

.review-person small{
  display: block;
  margin-top: 6px;
  color: var(--neutral-600);
}

.review-rating{
  text-align: right;
  flex: 0 0 auto;
}

.review-score{
  display: inline-block;
  font-weight: 800;
  color: var(--neutral-900);
  margin-right: 10px;
}

.review-stars{
  letter-spacing: 1px;
  color: var(--primary);
  font-size: 14px;
  vertical-align: middle;
}

.review-text{
  margin: 0;
  color: var(--neutral-800);
  line-height: 1.7;
}

/* Mobile */
@media (max-width: 720px){
  .review-top{
    flex-direction: column;
    align-items: flex-start;
  }
  .review-rating{
    text-align: left;
  }
}



/* OFERTA: spójny grid 2 kolumny, bez “boxa” całej sekcji */
.offer-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.offer-item{
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.offer-item:hover{
  border-color: var(--neutral-300);
}

.offer-top{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin-bottom: var(--space-3);
}

.offer-tag{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary-800);
  background: rgba(4, 52, 122, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
}

.offer-title{
  margin: 0 0 10px 0;
  font-size: 18px;
  line-height: 1.25;
}

.offer-item p{
  margin: 0 0 12px 0;
  color: var(--neutral-700);
}

.offer-list{
  margin: 0 0 12px 18px;
  padding: 0;
}

.offer-list li{
  margin: 6px 0;
}

@media (max-width: 900px){
  .offer-grid{ grid-template-columns: 1fr; }
}
/* 1) Nigdy nie pozwalaj layoutowi wyjść poza viewport */
html, body { max-width: 100%; overflow-x: hidden; }

/* 2) Najważniejsze przy gridach/flexach: pozwól dzieciom się zwężać */
.grid, .header-inner, .hero-inner, .profile, .contact-grid, .offer-grid {
  min-width: 0;
}

/* Header overflow fix: na mobile chowamy numer telefonu w top bar */
@media (max-width: 1023px) {
  .header-phone { display: none; }
}

/* Dodatkowo (bezpiecznik), żeby brand nie wypychał */
@media (max-width: 520px) {
  .brand { min-width: 0; }
  .brand-text { max-width: 160px; }
  .brand-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

}
/* Mobile drawer – hard fix (żeby nie wchodził w layout i nie robił "drugiej strony") */
.mobile-drawer{
  display: none;            /* kluczowe */
  position: fixed;
  inset: 0;
  background: rgba(11,18,32,0.52);
  z-index: 1200;
}

.mobile-drawer.is-open{
  display: block;           /* kluczowe */
}

.mobile-panel{
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(92vw, 420px);
  background: var(--white);
  border-left: 1px solid var(--neutral-200);
  padding: var(--space-5);
  overflow-y: auto;         /* ważne na małych ekranach */
  -webkit-overflow-scrolling: touch;
}


/* Header: na mobile chowamy elementy, które powodują overflow */
@media (max-width: 720px){
  .header-phone{ display:none; }
  .header-actions .btn{ display:none; } /* "Wyślij zapytanie" zostaje w drawerze */
  .brand{ min-width: 0; }
  .brand-text{ min-width: 0; }
  .brand-text small{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Bezpiecznik: nigdy nie pozwól headerowi wyjść poza ekran */
.header-inner{ min-width: 0; }
.header-actions{ min-width: 0; }
/* MOBILE header – schowaj tel i CTA w top barze (CTA zostaje w drawerze) */
@media (max-width: 1023px){
  .site-header .header-actions .header-phone{ display:none !important; }
  .site-header .header-actions > a.btn{ display:none !important; }
  .site-header .brand{ min-width: 0 !important; }
}


/* Header: zabezpieczenie przed overflow na mobile */
.header-inner {
  min-width: 0;
}

.brand {
  min-width: 0;           /* pozwala się zwężać */
}

.brand-text {
  min-width: 0;
}

.brand-text strong,
.brand-text small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Na mobile chowamy numer i zostawiamy CTA + hamburger */
@media (max-width: 520px) {
  .header-phone { display: none; }
  .header-actions { gap: 10px; }
  .header-actions .btn { padding: 0 14px; }
}

/* Dodatkowo: jeśli jeszcze brakuje miejsca, chowamy CTA i zostaje tylko hamburger */
@media (max-width: 380px) {
  .header-actions .btn { display: none; }
}
/* Mobile drawer: pewny overlay i panel */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(11,18,32,0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
  z-index: 2000; /* wyżej niż header */
}

.mobile-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(92vw, 420px);
  background: var(--white);
  border-left: 1px solid var(--neutral-200);
  transform: translateX(100%);              /* start poza ekranem */
  transition: transform var(--dur-2) var(--ease);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mobile-drawer.is-open .mobile-panel {
  transform: translateX(0);
}

/* ==== FIX: mobile drawer always on top ==== */
.site-header{
  position: sticky;
  top: 0;
  z-index: 4000; /* było 1000 - daj większe */
}

.mobile-drawer{
  position: fixed;
  inset: 0;
  z-index: 9999;   /* MUSI być wyżej niż cała reszta */
}

.mobile-panel{
  z-index: 10000;
  position: absolute;
}

/* Ważne: backdrop-filter potrafi robić nowy stacking context */
.site-header{
  isolation: isolate;
}

/* ==== Mobile spacing: H1 -> nav/badges ==== */
@media (max-width: 720px){
  h1{
    margin-bottom: 15px;
  }
}

@media (max-width: 720px){
  .hero-copy h1{
    margin-bottom: 15px;
  }
}

/* 1) HERO: mniejszy odstęp od góry na mobile (15px) */
@media (max-width: 720px){
  .hero-inner{
    padding-top: 15px !important;
  }
}


.form-status{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--neutral-200);
  background: var(--neutral-100);
  color: var(--neutral-900);
  font-weight: 700;
  display: none;
}

.form-status.is-visible{ display:block; }

.form-status.is-success{
  border-color: rgba(22,163,74,0.25);
  background: rgba(22,163,74,0.08);
}

.form-status.is-error{
  border-color: rgba(220,38,38,0.25);
  background: rgba(220,38,38,0.08);
}
