/* ╔══════════════════════════════════════════════════════════════════════════╗
   ║  PAPIK · Footer de tot el lloc (oct 2026) · les 602 pàgines amb .rl-footer ║
   ║  Un sol bloc verd #002819 d'ample complet, cantonades superiors 56px,    ║
   ║  text i logotip en blanc càlid #fcfdf9. Marca + contacte + xarxes a      ║
   ║  l'esquerra; enllaços en columna a la dreta; copyright i "pujar" a baix. ║
   ║  Cap contingut nou: el marcat és el de sempre, només canvia la pell.     ║
   ╚══════════════════════════════════════════════════════════════════════════╝ */

body .rl-footer {
  background: #002819;
  color: #fcfdf9;
  border-top: 0;
  border-radius: 56px 56px 0 0;
  /* Es fusiona amb la secció anterior: puja tant com el radi de les cantonades,
     de manera que darrere les corbes es veu el bloc previ (verd, menta o blanc)
     i no queda cap franja blanca entremig. */
  position: relative; z-index: 1;
  padding: calc(36px + 56px) 56px 28px;
  margin-top: -56px;
}
body .rl-footer__container {
  max-width: 1440px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, max-content));
  grid-template-rows: auto auto auto auto;
  align-items: start;
  column-gap: 56px;
  row-gap: 18px;
}

/* ── Marca ──────────────────────────────────────────────────────────────── */
body .rl-footer__logo { grid-column: 1; grid-row: 1; display: block; }
body .rl-footer__logo svg { width: 140px; height: auto; }
body .rl-footer__logo svg path,
body .rl-footer__logo svg polygon { fill: #fcfdf9; }

/* ── Contacte (dades existents) ─────────────────────────────────────────── */
body .rl-footer__contact {
  grid-column: 1; grid-row: 2;
  flex-direction: column; align-items: flex-start; gap: 6px;
  margin: 10px 0 0;
}
body .rl-footer__contact-link { gap: 10px; min-height: 40px; }
body .rl-footer__contact-circle {
  width: 32px; height: 32px;
  background: rgba(252, 253, 249, 0.12);
  color: #fcfdf9; font-size: 12px;
}
body .rl-footer__contact-link:hover .rl-footer__contact-circle { background: #fcfdf9; color: #002819; transform: none; }
body .rl-footer__contact-text { font-size: 14px; color: #fcfdf9; }

/* ── Xarxes (enllaços existents): icona dins d'un cercle translúcid + nom ── */
body .rl-footer__extra { grid-column: 1; grid-row: 3; display: block; }
body .rl-footer__social { gap: 20px; }
body .rl-footer__social a {
  height: auto; padding: 0; border-radius: 0; background: transparent;
  border: 0; box-shadow: none; outline: none;
  color: #fcfdf9; font-size: 14px; gap: 12px; min-height: 44px;
  transition: color 200ms ease;
}
body .rl-footer__social a::before {
  content: "";
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px;
  background-color: rgba(252, 253, 249, 0.12);
  background-repeat: no-repeat; background-position: center; background-size: 18px 18px;
  transition: background-color 200ms ease;
}
body .rl-footer__social a[href*="instagram"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fcfdf9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.3' cy='6.7' r='0.9' fill='%23fcfdf9' stroke='none'/%3E%3C/svg%3E");
}
body .rl-footer__social a[href*="linkedin"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fcfdf9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 10v8M8 6.5v.1M12 18v-4.5a2.5 2.5 0 0 1 5 0V18M12 10v8'/%3E%3C/svg%3E");
}
body .rl-footer__social a:hover::before,
body .rl-footer__social a:focus-visible::before { background-color: rgba(252, 253, 249, 0.24); }
body .rl-footer__social a:hover,
body .rl-footer__social a:focus-visible { background: transparent; color: #fcfdf9; }

/* ── Menú central: els apartats del header, en dos grups com al menú mòbil ── */
body .rl-footer__nav { display: contents; }
body .rl-footer__nav-group { grid-row: 1 / span 3; }
body .rl-footer__nav-group:nth-child(1) { grid-column: 2; }
body .rl-footer__nav-group:nth-child(2) { grid-column: 3; }
body .rl-footer__nav-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body .rl-footer__nav-title {
  margin: 0 0 12px;
  font-size: 20px; font-weight: 400; letter-spacing: -0.005em; color: #fcfdf9;
}
body .rl-footer__nav a {
  position: relative; display: inline-block;
  font-size: 14px; color: #fcfdf9; padding: 3px 0; text-decoration: none;
  transition: color 200ms ease;
}
body .rl-footer__nav a::after {
  content: ""; position: absolute; left: 0; bottom: 1px;
  width: 0; height: 1px; background: #fcfdf9;
  transition: width 200ms ease;
}
body .rl-footer__nav a:hover::after,
body .rl-footer__nav a:focus-visible::after { width: 100%; }

/* ── Columna d'enllaços (legals existents) ──────────────────────────────── */
body .rl-footer__menu {
  grid-column: 4; grid-row: 1 / span 3;
  flex-direction: column; gap: 8px;
  justify-self: start; min-width: 0;
}
body .rl-footer__menu::before {
  content: "Legal";
}
body:lang(fr) .rl-footer__menu::before { content: "Légal"; }
body:lang(de) .rl-footer__menu::before { content: "Rechtliches"; }
body .rl-footer__menu::before {
  display: block; margin-bottom: 4px;
  font-size: 20px; font-weight: 400; letter-spacing: -0.005em; color: #fcfdf9;
}
body .rl-footer__menu a {
  position: relative; display: inline-block;
  font-size: 14px; color: #fcfdf9; padding: 3px 0;
  transition: color 200ms ease;
}
body .rl-footer__menu a::after {
  content: ""; position: absolute; left: 0; bottom: 1px;
  width: 0; height: 1px; background: #fcfdf9;
  transition: width 200ms ease;
}
body .rl-footer__menu a:hover { color: #fcfdf9; }
body .rl-footer__menu a:hover::after,
body .rl-footer__menu a:focus-visible::after { width: 100%; }

/* ── Peu: copyright + pujar ─────────────────────────────────────────────── */
body .rl-footer__copy {
  grid-column: 1 / span 3; grid-row: 4; align-self: end;
  margin-top: 16px; padding-top: 0;
  font-size: 12px; color: #fcfdf9; opacity: 0.72;
  border-top: 0;
}
body .rl-footer__top {
  grid-column: 4; grid-row: 4; justify-self: end; align-self: end;
  width: 40px; height: 40px;
  background: transparent; color: #fcfdf9;
  box-shadow: inset 0 0 0 1px #fcfdf9;
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}
body .rl-footer__top:hover { background: #fcfdf9; color: #002819; transform: translateY(-3px); }

/* Focus visible sobre verd: anell blanc càlid */
body .rl-footer :where(a, button):focus-visible { outline: 2px solid #fcfdf9; outline-offset: 3px; }

/* ── Mòbil ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  body .rl-footer { border-radius: 32px 32px 0 0; padding: calc(28px + 32px) 24px 24px; margin-top: -32px; }
  body .rl-footer__logo, body .rl-footer__contact, body .rl-footer__extra,
  body .rl-footer__menu, body .rl-footer__copy, body .rl-footer__top { grid-column: auto; grid-row: auto; }
  body .rl-footer__logo { grid-area: logo; }
  body .rl-footer__contact { grid-area: contact; }
  body .rl-footer__extra { grid-area: social; }
  body .rl-footer__nav { display: flex; grid-area: nav; }
  body .rl-footer__nav-group { grid-column: auto; grid-row: auto; }
  body .rl-footer__menu { grid-area: menu; }
  body .rl-footer__copy { grid-area: copy; }
  body .rl-footer__top { grid-area: top; }
  body .rl-footer__container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-template-areas:
      "logo    logo"
      "contact contact"
      "social  social"
      "nav     nav"
      "menu    menu"
      "copy    top";
    column-gap: 24px; row-gap: 20px;
    align-items: start;
  }
  body .rl-footer__logo svg { width: 112px; }
  body .rl-footer__menu { justify-self: start; min-width: 0; }
  body .rl-footer__nav { justify-self: start; gap: 24px; width: 100%; }
  body .rl-footer__nav-group { flex: 1 1 0; }
  body .rl-footer__social { flex-wrap: wrap; gap: 16px 24px; }
}
@media (max-width: 359px) {
  body .rl-footer__container {
    grid-template-columns: 1fr;
    grid-template-areas: "logo" "contact" "nav" "menu" "social" "copy" "top";
  }
  body .rl-footer__top { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  body .rl-footer * { transition: none !important; }
}

/* ── Excepció menta (oct 2026, per instrucció d'operativa@papik.cat) ────────
   Quan la pàgina acaba en un bloc verd fosc (formulari de les pàgines
   de servei, CTA de tancament de la plantilla clàssica, configurador), el
   verd sobre verd el feia desaparèixer: en aquests casos, i només en aquests,
   el peu és menta #d9e4e0 amb text i logotip en verd. */
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) { background: #d9e4e0; color: #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__logo svg path,
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__logo svg polygon { fill: #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) :is(.rl-footer__menu a, .rl-footer__nav a, .rl-footer__nav-title, .rl-footer__contact-text, .rl-footer__social a, .rl-footer__copy) { color: #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__menu::before { color: #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) :is(.rl-footer__menu a, .rl-footer__nav a)::after { background: #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__contact-circle { background: rgba(0, 40, 25, 0.08); color: #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__contact-link:hover .rl-footer__contact-circle { background: #002819; color: #d9e4e0; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__social a::before { background-color: rgba(0, 40, 25, 0.08); }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__social a:hover::before,
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__social a:focus-visible::before { background-color: rgba(0, 40, 25, 0.16); }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__social a[href*="instagram"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002819' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.3' cy='6.7' r='0.9' fill='%23002819' stroke='none'/%3E%3C/svg%3E");
}
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__social a[href*="linkedin"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002819' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 10v8M8 6.5v.1M12 18v-4.5a2.5 2.5 0 0 1 5 0V18M12 10v8'/%3E%3C/svg%3E");
}
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__top { color: #002819; box-shadow: inset 0 0 0 1px #002819; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) .rl-footer__top:hover { background: #002819; color: #d9e4e0; }
:is(body:has(.svc-contact) .rl-footer, body:has(.block-cta) .rl-footer, body.atelier .rl-footer) :where(a, button):focus-visible { outline-color: #002819; }
