/* ============================================
   KABEX — main stylesheet
   1. Reset & base
   2. Design tokens (CSS Variables)
   3. Typography
   4. Layout primitives
   5. Buttons
   6. Section header (kicker pattern)
   7. Header / Topbar / Navigation
   8. Footer
   9. Forms
  10. Breadcrumbs
  11. Loader
  12. 404
  13. Utilities & accessibility
   ============================================ */

/* 1. RESET & BASE
   ---------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, svg, video { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }


/* 2. DESIGN TOKENS
   ---------------------------------------------- */
:root {
  /* Colors — KABEX brand */
  --color-primary:        #1E5BA8;
  --color-primary-dark:   #0F2D5C;
  --color-primary-light:  #3C7DCC;
  --color-primary-tint:   #E8F0FA;

  --color-accent:         #FDE047;
  --color-accent-dark:    #E5B800;
  --color-accent-light:   #FEF3C7;

  --color-action:         #E63946;
  --color-action-dark:    #C42836;

  --color-success:        #2BB673;
  --color-warning:        #F59E0B;
  --color-danger:         #DC2626;
  --color-info:           #0EA5E9;

  /* Text */
  --color-dark:           #0F2D5C;
  --color-text:           #1F2937;
  --color-text-muted:     #6C7689;
  --color-text-light:     #9CA3AF;

  /* Backgrounds */
  --color-bg:             #FFFFFF;
  --color-bg-alt:         #F4F6F9;
  --color-bg-dark:        #0F2D5C;
  --color-border:         #E5E7EB;
  --color-border-strong:  #C5CDD9;

  /* Typography */
  --font-heading: 'Oswald', system-ui, -apple-system, sans-serif;
  --font-body:    'Poppins', system-ui, -apple-system, sans-serif;

  --text-xs:    0.75rem;    /* 12 */
  --text-sm:    0.875rem;   /* 14 */
  --text-base:  1rem;       /* 16 */
  --text-lg:    1.125rem;   /* 18 */
  --text-xl:    1.25rem;    /* 20 */
  --text-2xl:   1.5rem;     /* 24 */
  --text-3xl:   2rem;       /* 32 */
  --text-4xl:   2.5rem;     /* 40 */
  --text-5xl:   3.5rem;     /* 56 */
  --text-6xl:   4.5rem;     /* 72 */
  --text-7xl:   6rem;       /* 96 */

  /* Spacing (8px grid) */
  --space-xs:   0.5rem;     /* 8 */
  --space-sm:   1rem;       /* 16 */
  --space-md:   1.5rem;     /* 24 */
  --space-lg:   3rem;       /* 48 */
  --space-xl:   4rem;       /* 64 */
  --space-2xl:  6rem;       /* 96 */
  --space-3xl:  8rem;       /* 128 */

  /* Containers */
  --container:        1480px;
  --container-narrow:  960px;
  --container-wide:   1640px;

  /* Geometry — KABEX = ostre rogi */
  --radius-none:  0;
  --radius-sm:    2px;
  --radius-md:    4px;

  /* Shadows (minimum — KABEX woli flat) */
  --shadow-sticky: 0 4px 12px rgba(15, 45, 92, 0.08);
  --shadow-modal:  0 24px 60px rgba(15, 45, 92, 0.18);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition:      300ms ease;
  --transition-slow: 600ms ease;

  /* Z-index */
  --z-loader:   9999;
  --z-modal:    1000;
  --z-header:   100;
  --z-nav:      90;
  --z-overlay:  50;

  /* Layout heights */
  --topbar-height:        44px;
  --header-height:        80px;
  --header-height-mobile: 64px;
}


/* 3. TYPOGRAPHY
   ---------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl), 2vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }

p { line-height: 1.7; }

a { transition: color var(--transition-fast); }
a:hover { color: var(--color-primary); }

strong, b { font-weight: 600; }


/* 4. LAYOUT PRIMITIVES
   ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-lg); }
}

.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.section {
  padding: var(--space-xl) 0;
}
@media (min-width: 1024px) {
  .section { padding: var(--space-2xl) 0; }
}

.section--alt  { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: #fff; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }


/* 5. BUTTONS
   ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 2px solid transparent;
  border-radius: var(--radius-none);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  user-select: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn--accent:hover {
  background: var(--color-accent-dark);
  color: var(--color-dark);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn--outline-white {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn--outline-white:hover {
  background: #fff;
  color: var(--color-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  padding: 0.5rem 0;
  border: 0;
}
.btn--ghost:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
  transform: none;
}


/* 6. SECTION HEADER (kicker pattern)
   ---------------------------------------------- */
.section-header {
  margin-bottom: var(--space-lg);
  max-width: 720px;
}
.section-header--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header--left   { margin-right: auto; text-align: left; }

.section-header__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}
.section--dark .section-header__kicker { color: var(--color-accent); }

.section-header__dash {
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

.section-header__title {
  margin-bottom: var(--space-sm);
}

.section-header__lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.section--dark .section-header__lead { color: rgba(255, 255, 255, 0.8); }


/* 7. HEADER / TOPBAR / NAVIGATION
   Variant: Live Status (Stitch v4)
   TIER 1 — white bar with 4 branch cards (status + phone)
   TIER 2 — dark navy bar with logo + nav + yellow CTA
   ---------------------------------------------- */
.header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-bg);
  transition: box-shadow var(--transition);
  display: block;
  width: 100%;
}
.header.is-sticky { box-shadow: var(--shadow-sticky); }

.topbar {
  display: block;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.header.is-sticky .topbar { max-height: 0; }

.header__main {
  display: block;
  width: 100%;
  position: relative;
  z-index: 2;
  background: #fff;
}

/* ━━━ TIER 1: Live Status Bar (blue) ━━━ */
.topbar {
  background: var(--color-primary);
  color: #fff;
  height: var(--topbar-height);
}
.topbar > .container { height: 100%; padding: 0; }
.topbar__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 100%;
}

.topbar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  padding: 0 var(--space-md);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  min-width: 0;
}
.topbar__item:last-child { border-right: 0; }

.topbar__branch {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex: 1;
  min-width: 0;
  color: #fff;
}

.topbar__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.topbar__dot--open {
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: kabex-pulse-green 2s infinite;
}
.topbar__dot--closed { background: var(--color-text-light); }

@keyframes kabex-pulse-green {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.topbar__branch-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.topbar__branch-name {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  line-height: 1.2;
  white-space: nowrap;
}
.topbar__branch-status {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.topbar__branch-status--open   { color: #86EFAC; }
.topbar__branch-status--closed { color: rgba(255, 255, 255, 0.6); }

.topbar__phone {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.topbar__phone:hover { color: var(--color-accent); }
.topbar__phone-icon { flex-shrink: 0; }

@media (max-width: 1023px) {
  .topbar { display: none; }
}

/* ━━━ TIER 2: Main bar (white) ━━━ */
.header__main {
  display: block;
  width: 100%;
  position: relative;
  z-index: 2;
  background: #fff;
  color: var(--color-dark);
  border-bottom: 1px solid var(--color-border);
}

/* MOBILE PHONE (centrala) — obok hamburgera */
.header__phone-mobile {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: var(--color-accent);
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.header__phone-mobile:hover {
  background: var(--color-primary-dark);
  color: var(--color-accent);
}
.header__phone-mobile-num { line-height: 1; }
@media (max-width: 1023px) {
  .header__phone-mobile { display: inline-flex; }
}
@media (max-width: 380px) {
  .header__phone-mobile { padding: 6px 10px; font-size: 12px; gap: 4px; }
  .header__phone-mobile svg { width: 14px; height: 14px; }
}

/* SIDEBAR (mobile + tablet menu wysuwany z prawej) */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 45, 92, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
  touch-action: manipulation;
}
.sidebar-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

html.has-sidebar,
body.has-sidebar {
  overflow: hidden !important;
  height: 100% !important;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 92vw;
  background: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -12px 0 32px -8px rgba(15, 45, 92, 0.2);
}
.sidebar.is-open { transform: translateX(0); }

.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  border-bottom: 3px solid var(--color-accent);
}
.sidebar__head-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.sidebar__close {
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.sidebar__close:hover { background: var(--color-accent); color: var(--color-primary-dark); }

.sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.sidebar__nav { margin-bottom: 20px; }
.sidebar__menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar__menu li { border-bottom: 1px solid rgba(15, 45, 92, 0.08); }
.sidebar__menu li:last-child { border-bottom: 0; }
.sidebar__menu a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-dark);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.sidebar__menu a:hover {
  color: var(--color-primary);
  padding-left: 6px;
}
.sidebar__menu .sub-menu {
  list-style: none;
  padding: 0 0 0 16px;
  margin: 0 0 10px;
}
.sidebar__menu .sub-menu a {
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: 8px 0;
  color: var(--color-text);
}

.sidebar__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-bottom: 24px;
  transition: opacity 0.2s ease;
}
.sidebar__cta:hover { opacity: 0.85; }

.sidebar__section-title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
}

.sidebar__branches-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar__branch {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: 14px 16px;
  border-left: 3px solid var(--color-accent);
  position: relative;
  overflow: hidden;
}
.sidebar__branch::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
}
.sidebar__branch-name {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.sidebar__branch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar__branch-dot--open {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}
.sidebar__branch-dot--closed { background: rgba(255, 255, 255, 0.4); }

.sidebar__branch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sidebar__branch-text strong {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
.sidebar__branch-status {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.sidebar__branch-status--open   { color: #86EFAC; }
.sidebar__branch-status--closed { color: rgba(255, 255, 255, 0.55); }

.sidebar__branch-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  width: 100%;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.sidebar__branch-phone:hover {
  background: #fff;
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: var(--header-height);
}
@media (max-width: 1023px) {
  .header__inner { height: var(--header-height-mobile); }
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header__logo img {
  max-height: 48px;
  width: auto;
}
.header__logo-text {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  line-height: 1;
}

.header__nav {
  margin-left: auto;
}
.header__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.header__menu a {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-dark);
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}
.header__menu a:hover { color: var(--color-primary); }
.header__menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}
.header__menu a:hover::after,
.header__menu .current-menu-item > a::after { width: 100%; }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.header__search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--color-dark);
  transition: color var(--transition-fast);
}
.header__search:hover { color: var(--color-primary); }

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: background var(--transition-fast), transform var(--transition-fast), color var(--transition-fast);
}
.header__cta:hover {
  background: var(--color-accent-dark);
  color: var(--color-primary);
  transform: translateY(-1px);
}
.header__cta-arrow { display: inline-block; }

.header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--color-dark);
}
.header__toggle-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.header__toggle[aria-expanded="true"] .header__toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.header__toggle[aria-expanded="true"] .header__toggle-line:nth-child(2) {
  opacity: 0;
}
.header__toggle[aria-expanded="true"] .header__toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1023px) {
  .header__toggle { display: flex; }
  .header__nav { display: none; }
  .header__cta { display: none; }
  .header__search { display: none; }
  .header__actions { margin-left: auto; gap: 10px; }
}


/* 8. FOOTER
   ---------------------------------------------- */
.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-2xl) 0 var(--space-md);
}

/* ━━━ ŻÓŁTY CTA STRIP (nad newsletter) ━━━ */
.footer-cta {
  background: var(--color-accent);
  padding: var(--space-md) 0;
}
.footer-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.footer-cta__title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-dark);
  margin: 0;
  line-height: 1.1;
}
.footer-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--color-dark);
  color: var(--color-accent);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.footer-cta__btn:hover {
  background: var(--color-primary);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ━━━ NEWSLETTER STRIP ━━━ */
.footer-newsletter {
  background: var(--color-primary);
  padding: var(--space-md) 0;
}
.footer-newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-lg);
}
@media (max-width: 1023px) {
  .footer-newsletter__inner { grid-template-columns: 1fr; gap: var(--space-md); }
}

.footer-newsletter__intro {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: #fff;
}
.footer-newsletter__icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-accent);
}
.footer-newsletter__title {
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 0 0 6px;
}
.footer-newsletter__lead {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

.footer-newsletter__form {
  display: flex;
  gap: 0;
}
.footer-newsletter__input {
  flex: 1;
  padding: 14px 18px;
  background: #fff;
  border: 0;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text);
  outline: none;
}
.footer-newsletter__input::placeholder { color: var(--color-text-muted); }
.footer-newsletter__btn {
  padding: 14px 28px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.footer-newsletter__btn:hover { background: var(--color-accent-dark); }

/* ━━━ MAIN FOOTER GRID ━━━ */
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr 1.4fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
@media (max-width: 1280px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; gap: var(--space-md); }
}
@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__col--brand,
  .footer__col--contact { grid-column: span 3; }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__col--brand,
  .footer__col--contact { grid-column: auto; }
}
@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
}
@media (max-width: 640px) {
  .footer__grid { grid-template-columns: 1fr; }
}

.footer__logo {
  max-height: 56px;
  margin-bottom: var(--space-sm);
}
.footer__about {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer__heading {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-sm);
  position: relative;
  padding-bottom: var(--space-xs);
}
.footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
}

.footer__menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__menu a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.75);
}
.footer__menu a:hover { color: var(--color-accent); }

/* Social icons */
.footer__social {
  display: flex;
  gap: 8px;
  margin-top: var(--space-md);
  list-style: none;
  padding: 0;
}
.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.footer__social-link:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

/* Contact column */
.footer__col--contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer__phone {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  text-decoration: none;
}
.footer__phone:hover { color: var(--color-accent); }
.footer__email {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  word-break: break-all;
  text-decoration: none;
}
.footer__email:hover { color: var(--color-accent); }
.footer__address,
.footer__hours {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-style: normal;
  line-height: 1.5;
  margin: 0;
}
.footer__hours { margin-top: 4px; }
.footer__chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-sm);
  width: fit-content;
  text-decoration: none;
  transition: background 0.2s ease;
}
.footer__chat-btn:hover { background: var(--color-accent-dark); }

/* ━━━ FOOTER BRANCHES STRIP ━━━ */
.footer__branches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
@media (max-width: 1023px) {
  .footer__branches { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .footer__branches { grid-template-columns: 1fr; }
}

.footer-branch {
  position: relative;
  display: block;
  padding: 18px 20px 20px 24px;
  background: rgba(255, 255, 255, 0.04);
  background-size: cover;
  background-position: center;
  border-left: 4px solid var(--color-accent);
  color: #fff;
  text-decoration: none;
  min-height: 180px;
  transition: transform 0.2s ease;
}
.footer-branch:hover { transform: translateY(-3px); color: #fff; }

.footer-branch__name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin: 0 0 8px;
  line-height: 1.2;
}
.footer-branch__addr {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
  margin: 0 0 6px;
}
.footer-branch__phones {
  font-size: 13px;
  color: #fff;
  margin: 0 0 8px;
}
.footer-branch__phones strong {
  color: var(--color-accent);
  font-weight: 700;
}
.footer-branch__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
}
.footer-branch__cta {
  display: block;
  margin-top: 8px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.footer__copyright { margin: 0; }
.footer__author {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer__author-label { color: rgba(255, 255, 255, 0.55); }
.footer__author a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}
.footer__author-on {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  padding: 1px 6px;
  margin: 0 2px;
}
.footer__author-media { color: rgba(255, 255, 255, 0.5); font-weight: 500; }


/* 9. FORMS
   ---------------------------------------------- */
.kabex-form,
.contact-form { display: flex; flex-direction: column; gap: var(--space-sm); }

.contact-form__group { display: flex; flex-direction: column; gap: 6px; }

.contact-form__label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.contact-form__input,
.contact-form__textarea,
.contact-form__select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}
.contact-form__input:focus,
.contact-form__textarea:focus,
.contact-form__select:focus {
  outline: none;
  border-color: var(--color-primary);
  border-width: 2px;
  padding: calc(0.875rem - 1px) calc(1rem - 1px);
}

.contact-form__textarea { resize: vertical; min-height: 120px; }

.contact-form__rodo {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}
.contact-form__rodo a { color: var(--color-primary); text-decoration: underline; }

.kabex-form__message {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
}
.kabex-form__message--success {
  background: rgba(43, 182, 115, 0.1);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}
.kabex-form__message--error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}


/* 10. BREADCRUMBS
   ---------------------------------------------- */
.breadcrumbs {
  background: var(--color-bg-alt);
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
}
.breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-muted);
}
.breadcrumbs__item:not(:last-child)::after {
  content: '›';
  margin-left: var(--space-xs);
  color: var(--color-text-light);
}
.breadcrumbs__link { color: var(--color-text); }
.breadcrumbs__link:hover { color: var(--color-primary); }
.breadcrumbs__item--current { color: var(--color-primary); font-weight: 500; }


/* 11. LOADER
   ---------------------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 400ms ease, visibility 400ms ease;
}
.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: kabex-spin 700ms linear infinite;
}
@keyframes kabex-spin {
  to { transform: rotate(360deg); }
}


/* 12. 404
   ---------------------------------------------- */
.error-404 { text-align: center; padding: var(--space-3xl) 0; }
.error-404__code {
  font-family: var(--font-heading);
  font-size: clamp(6rem, 16vw, 12rem);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}
.error-404__title { margin: var(--space-md) 0 var(--space-sm); }
.error-404__lead { max-width: 520px; margin: 0 auto var(--space-lg); color: var(--color-text-muted); }
.error-404__actions { display: flex; gap: var(--space-sm); justify-content: center; flex-wrap: wrap; }


/* 13. UTILITIES & ACCESSIBILITY
   ---------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: var(--z-loader);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 600;
}
.skip-link:focus { top: 0; }

.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;
}

.no-emoji {
  font-family: var(--font-body);
  font-variant-emoji: text;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: var(--color-dark);
}

/* Focus states (keyboard) */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Page content (default page.php) */
.page-content {
  max-width: var(--container-narrow);
}
.page-content__title { margin-bottom: var(--space-md); }
.page-content__body p { margin-bottom: var(--space-sm); }
.page-content__body h2,
.page-content__body h3 { margin: var(--space-lg) 0 var(--space-sm); }
.page-content__body a { color: var(--color-primary); text-decoration: underline; }
