/* ══════════════════════════════════════════════════════════════════
   MDM Labs — base.css
   Wspólna warstwa stron publicznych: zmienne, reset, typografia,
   skip-link, przyciski, baner cookies, stopka.
   Reguły przeniesione 1:1 ze stylów strony głównej — nie zmieniać
   wartości bez sprawdzenia wszystkich stron, które ten plik ładują.
   Style specyficzne dla stron zostają w <style> danej strony.
   ══════════════════════════════════════════════════════════════════ */

    /* ─── CSS VARIABLES ─────────────────────────────────────────── */
    :root {
      --red:         #EE3137;
      --red-glow:    rgba(238, 49, 55, 0.22);
      --red-dim:     rgba(238, 49, 55, 0.08);
      --black:       #0A0A0A;
      --charcoal:    #1A1A1A;
      --off-white:   #F8F9FA;
      --white:       #FFFFFF;
      --text-muted:  #6B7280;
      --nav-h:       76px;
      --radius-pill: 100px;
      --radius-card: 24px;
      --radius-panel: 20px;
      --radius-sm: 12px;
      --transition:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* ─── RESET & BASE ──────────────────────────────────────────── */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { scroll-behavior: smooth; font-size: 16px; }

    body {
      font-family: 'DM Sans', sans-serif;
      color: var(--charcoal);
      background: var(--white);
      overflow-x: hidden;
      -webkit-font-smoothing: antialiased;
    }

    a { text-decoration: none; color: inherit; }

    img { display: block; max-width: 100%; }

    .btn-primary {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      background: var(--red);
      color: var(--white);
      font-family: 'Montserrat', sans-serif;
      font-weight: 800;
      font-size: 0.95rem;
      letter-spacing: 0.02em;
      padding: 18px 40px;
      border-radius: var(--radius-pill);
      border: none;
      cursor: pointer;
      transition: transform var(--transition), box-shadow var(--transition);
      box-shadow: 0 8px 40px rgba(238,49,55,0.4), 0 2px 8px rgba(0,0,0,0.3);
      white-space: nowrap;
    }

    .btn-primary:hover {
      transform: translateY(-3px) scale(1.02);
      box-shadow: 0 16px 60px rgba(238,49,55,0.55), 0 4px 16px rgba(0,0,0,0.3);
    }

    .btn-primary svg { flex-shrink: 0; }

    .btn-ghost {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: rgba(255,255,255,0.07);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      color: rgba(255,255,255,0.7);
      font-family: 'Montserrat', sans-serif;
      font-weight: 600;
      font-size: 0.88rem;
      letter-spacing: 0.03em;
      padding: 16px 28px;
      border-radius: var(--radius-pill);
      border: 1px solid rgba(255,255,255,0.14);
      cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
      overflow: hidden;
      position: relative;
      transition: color 0.35s ease, border-color 0.35s ease,
                  background 0.35s ease, transform 0.35s ease;
    }

    .btn-ghost::before {
      content: '';
      position: absolute;
      top: 0; left: -80%;
      width: 50%; height: 100%;
      background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.15) 55%,
        rgba(255,255,255,0.1) 65%,
        transparent 75%
      );
      transform: skewX(-15deg);
      pointer-events: none;
      transition: left 0s;
    }

    .btn-ghost:hover {
      color: var(--white);
      border-color: rgba(255,255,255,0.28);
      background: rgba(255,255,255,0.11);
      transform: scale(1.03) translateY(-1px);
    }

    .btn-ghost:hover::before {
      left: 130%;
      transition: left 0.5s cubic-bezier(0.3, 0, 0.6, 1);
    }

    /* ─── RESPONSIVE ────────────────────────────────────────────── */
    @media (max-width: 768px) {
      .btn-primary { padding: 16px 32px; font-size: 0.88rem; }
    }

    /* ─── FOOTER ────────────────────────────────────────────────── */
    .footer {
      background: var(--black);
      position: relative;
      overflow: hidden;
    }

    .footer__grid {
      position: absolute; inset: 0;
      background-image:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
      background-size: 60px 60px;
      pointer-events: none;
    }

    .footer__orb-l {
      position: absolute; bottom: -80px; left: -80px;
      width: 420px; height: 420px; border-radius: 50%;
      background: radial-gradient(circle, rgba(238,49,55,0.13) 0%, transparent 68%);
      pointer-events: none;
    }

    .footer__orb-r {
      position: absolute; top: -60px; right: -60px;
      width: 360px; height: 360px; border-radius: 50%;
      background: radial-gradient(circle, rgba(238,49,55,0.08) 0%, transparent 68%);
      pointer-events: none;
    }

    .footer__inner {
      max-width: 1100px;
      margin: 0 auto;
      padding: 80px 24px 0;
      position: relative;
      z-index: 1;
    }

    /* Główna sekcja */
    .footer__main {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 64px;
      padding-bottom: 60px;
    }

    /* Brand */
    .footer__brand { display: flex; flex-direction: column; gap: 20px; max-width: 300px; }

    .footer__logo-img {
      height: 36px; width: auto;
      filter: brightness(0) invert(1);
      opacity: 0.88;
      transition: opacity var(--transition);
    }

    .footer__logo:hover .footer__logo-img { opacity: 0.6; }

    .footer__tagline {
      font-size: 0.95rem;
      color: rgba(255,255,255,0.62);
      line-height: 1.7;
    }

    /* Linki */
    .footer__links { display: flex; flex-direction: column; align-items: flex-end; gap: 28px; }

    .footer__nav { display: flex; gap: 28px; flex-wrap: wrap; justify-content: flex-end; }

    .footer__nav a {
      font-family: 'Montserrat', sans-serif;
      font-weight: 600; font-size: 0.76rem;
      letter-spacing: 0.07em; text-transform: uppercase;
      color: rgba(255,255,255,0.65);
      transition: color var(--transition);
    }

    .footer__nav a:hover { color: var(--white); }

    /* Social */
    .footer__social { display: flex; gap: 12px; }

    .footer__social-link {
      width: 40px; height: 40px; border-radius: 50%;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      display: flex; align-items: center; justify-content: center;
      color: rgba(255,255,255,0.60);
      transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
    }

    .footer__social-link:hover {
      background: var(--red); border-color: var(--red);
      color: var(--white); transform: translateY(-2px);
    }

    .footer__social-link svg { width: 16px; height: 16px; fill: currentColor; }

    /* Separator */
    .footer__sep {
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1) 20%, rgba(255,255,255,0.1) 80%, transparent);
    }

    /* Bottom bar */
    .footer__bottom {
      display: flex; justify-content: space-between; align-items: center;
      padding: 24px 0 32px; gap: 16px; flex-wrap: wrap;
    }

    .footer__copy {
      font-size: 0.75rem; color: rgba(255,255,255,0.50);
      font-family: 'Montserrat', sans-serif; font-weight: 500;
    }

    .footer__legal { display: flex; gap: 24px; }

    .footer__legal a {
      font-size: 0.75rem; color: rgba(255,255,255,0.50);
      font-family: 'Montserrat', sans-serif; font-weight: 500;
      transition: color var(--transition);
    }

    .footer__legal a:hover { color: rgba(255,255,255,0.85); }

    @media (max-width: 720px) {
      .footer__main { flex-direction: column; gap: 40px; }
      .footer__links { align-items: flex-start; }
      .footer__nav { justify-content: flex-start; gap: 18px; }
    }

    @media (max-width: 480px) {
      .footer__bottom { flex-direction: column; align-items: flex-start; }
    }

    /* ─── COOKIE CONSENT BANNER ─────────────────────────────── */
    /* Centrowanie marginesem, NIE translateX. Baner jest position: fixed,
       a strony mają overflow-x: clip/hidden na html i body — Safari gubi
       przy tym kompozycję elementów fixed przesuniętych transformem.
       Po tej zmianie transform animuje wyłącznie oś Y (wjazd od dołu),
       więc wygląd i ruch zostają te same, a element stoi na swoim miejscu
       nawet gdyby transform w ogóle nie zadziałał. */
    .cookie-banner {
      position: fixed;
      /* --cookie-lift podnosi baner ponad przyklejone paski (patrz
         .us-bump na /uslugi), żeby nic go nie zasłaniało. */
      bottom: calc(24px + var(--cookie-lift, 0px));
      left: 0;
      right: 0;
      margin-left: auto;
      margin-right: auto;
      transform: translateY(calc(100% + 48px));
      width: calc(100% - 48px);
      max-width: 700px;
      background: #161616;
      border-radius: 20px;
      border-top: 2px solid var(--red);
      box-shadow:
        0 0 0 1px rgba(255,255,255,0.07),
        0 28px 72px rgba(0,0,0,0.65),
        0 0 0 40px rgba(0,0,0,0);
      display: flex;
      align-items: center;
      gap: 20px;
      padding: 20px 24px;
      z-index: 9999;
      opacity: 0;
      pointer-events: none;
      transition:
        transform 0.55s cubic-bezier(0.34, 1.42, 0.64, 1),
        opacity   0.4s ease,
        bottom    0.35s cubic-bezier(0.4, 0, 0.2, 1);
      /* Bez will-change: trwała warstwa kompozycji na elemencie fixed
         niczego tu nie przyspiesza, a bywa źródłem artefaktów w Safari. */
    }

    /* Red glow pod banerem */
    .cookie-banner::before {
      content: '';
      position: absolute;
      bottom: -16px; left: 50%;
      transform: translateX(-50%);
      width: 360px; height: 60px;
      background: radial-gradient(ellipse, rgba(238,49,55,0.22) 0%, transparent 72%);
      pointer-events: none; z-index: -1; border-radius: 50%;
    }

    .cookie-banner.is-visible {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto;
    }

    /* Lewa część — ikona + tekst */
    .cookie-banner__left {
      display: flex; align-items: center;
      gap: 16px; flex: 1; min-width: 0;
    }

    .cookie-banner__icon {
      width: 46px; height: 46px; border-radius: 13px;
      background: rgba(238,49,55,0.12);
      border: 1px solid rgba(238,49,55,0.25);
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }

    .cookie-banner__icon svg {
      width: 24px; height: 24px; color: var(--red);
    }

    .cookie-banner__text { flex: 1; min-width: 0; }

    .cookie-banner__title {
      font-family: 'Montserrat', sans-serif;
      font-weight: 800; font-size: 0.88rem;
      color: var(--white); margin-bottom: 3px;
      letter-spacing: -0.01em;
    }

    .cookie-banner__desc {
      font-size: 0.78rem;
      color: rgba(255,255,255,0.42);
      line-height: 1.55;
    }

    .cookie-banner__desc a {
      color: var(--red); font-weight: 600;
      transition: opacity 0.2s ease;
    }

    .cookie-banner__desc a:hover { opacity: 0.75; }

    /* Przyciski */
    .cookie-banner__actions {
      display: flex; gap: 10px; flex-shrink: 0;
    }

    .cookie-banner__btn {
      display: inline-flex; align-items: center; justify-content: center;
      font-family: 'Montserrat', sans-serif;
      font-weight: 700; font-size: 0.78rem;
      letter-spacing: 0.04em;
      padding: 10px 20px;
      border-radius: var(--radius-pill);
      cursor: pointer; white-space: nowrap;
      transition: transform 0.3s ease, box-shadow 0.3s ease,
                  background 0.3s ease, color 0.3s ease;
      border: none;
    }

    .cookie-banner__btn--primary {
      background: var(--red); color: var(--white);
      box-shadow: 0 4px 18px rgba(238,49,55,0.38);
    }

    .cookie-banner__btn--primary:hover {
      background: #d4262b; transform: translateY(-2px);
      box-shadow: 0 10px 28px rgba(238,49,55,0.48);
    }

    .cookie-banner__btn--ghost {
      background: rgba(255,255,255,0.07);
      color: rgba(255,255,255,0.6);
      border: 1px solid rgba(255,255,255,0.13) !important;
    }

    .cookie-banner__btn--ghost:hover {
      background: rgba(255,255,255,0.13);
      color: var(--white);
      border-color: rgba(255,255,255,0.24) !important;
    }

    /* Przycisk w stopce — ustawienia cookies */
    .footer__cookie-btn {
      display: flex; align-items: center; gap: 6px;
      background: none; border: none; cursor: pointer; padding: 0;
      font-size: 0.75rem; color: rgba(255,255,255,0.25);
      font-family: 'Montserrat', sans-serif; font-weight: 500;
      transition: color var(--transition);
    }

    .footer__cookie-btn:hover { color: rgba(255,255,255,0.6); }

    .footer__cookie-btn svg {
      width: 13px; height: 13px; color: currentColor;
    }

    @media (max-width: 580px) {
      .cookie-banner {
        flex-direction: column; align-items: flex-start;
        gap: 16px; padding: 20px;
        bottom: calc(16px + var(--cookie-lift, 0px));
        width: calc(100% - 32px); border-radius: 16px;
      }
      .cookie-banner__actions { width: 100%; }
      .cookie-banner__btn { flex: 1; }
    }

    /* ─── Skip link (dostępność) ───────────────────────────────── */
    .skip-link {
      position: absolute;
      top: -100%;
      left: 16px;
      z-index: 9999;
      background: #EE3137;
      color: #fff;
      font-family: 'Montserrat', sans-serif;
      font-weight: 700;
      font-size: 0.78rem;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 10px 22px;
      border-radius: 0 0 8px 8px;
      text-decoration: none;
      transition: top 0.2s;
    }

    .skip-link:focus { top: 0; }
