/* =========================================================
   GUIA FPE — Full d’estils principal
   Estructura:
   1)  Variables i base
   2)  Tipografia
   3)  Enllaços i botons
   4)  Accessibilitat
   5)  Capçalera i navegació superior
   6)  Hero (portada)
   7)  Portada: targetes (capítols)
   8)  Pàgines de bloc: heroi + layout
   9)  Índex lateral (TOC) — mòbil/escriptori
   10) Contingut interior
   11) Buscador global
   12) Tip (bombeta)
   13) Acordió
   14) Infocard + Lightbox
   15) Modals genèrics
   16) Paginació (pager)
   17) Peu de pàgina
   18) Ajustos responsive específics
  19) Contingut apartat RLPT
  20) Apartat Bones pràctiques
  21) Bloc recursos addicionals oficials
  22) Formats de conclusions
  23) Bloc 4 — pseudoestructura i navegació
  24) Bloc 4 — estils generals (taules, imatges, exemples, rols, modals)
  25) Bloc 4 — botó i modal d’infografia
  26) Pàgina d’infografia FPE
  27) Bloc 8 — Recursos addicionals
  28) Requadre d’agraïments (index)
  29) Utilitats i ajustos finals (vídeo, taules, navegació següent, etc.)
  30) Menú mòbil bàsic
   ========================================================= */

 



/* ========== 1) Variables i base ========== */
:root{
  --brand:#004987;
  --brand-2:#79CCD0;
  --ink:#1c1c1c;
  --muted:#5f6b7a;
  --bg:#ffffff;
  --focus:#79CCD0;
  --header-h:84px;
  --toc-w:320px;
  --card-h:280px;
  --acc-title-size:clamp(1.0rem,0.7rem + 0.3vw,2rem);
}

html,body{ height:100%; }
body{
  font-family:"Open Sans", Arial, sans-serif;
  font-weight:400; font-size:16px; line-height:1.6;
  color:var(--ink);
  background:var(--bg);
  /* El contingut no queda sota el header fix */
  padding-top:var(--header-h);
}


/* ========== 2) Tipografia ========== */
h1,h2,h3,h4,h5,h6,p,a,button,input,label{ font-family:"Open Sans", Arial, sans-serif; }

h1,.h1{
  font-size:16pt; font-weight:800; color:var(--brand);
  line-height:1.4; margin:1.2rem 0 .6rem;
}
h2, .h2 {
  font-size: 14pt;
  font-weight: 700;
  color: #004987 !important; 
  line-height: 1.5;
  margin: 1rem 0 .5rem;
}

strong,b{ color:var(--brand); font-weight:700; }

@media (max-width:600px){
  h1,.h1{ font-size:14pt; }
  h2,.h2{ font-size:12pt; }
}


/* ========== 3) Enllaços i botons ========== */
a{ color:inherit; text-decoration:none; }
p a{
  color:#66b8bb; font-weight:600; border-bottom:2px solid transparent;
  transition:color .25s, border-bottom-color .25s;
}
p a:hover, p a:focus-visible{ color:#004987; border-bottom-color:#66b8bb; }
p a:visited{ color:#66b8bb; }

.btn, .btn:visited, .btn:hover, .btn:focus-visible{
  color:#fff !important; border-bottom:none !important;
}
.btn{
  display:inline-block; cursor:pointer; user-select:none;
  border-radius:9999px; font-weight:700; padding:.8rem 1.2rem;
}
.btn-primary{
  background:var(--brand); color:#fff; border:2px solid var(--brand);
  box-shadow:0 8px 20px rgba(0,73,135,.18);
}
.btn-primary:hover{ filter:brightness(1.07); }
.btn.btn-outline,
.btn.btn-outline:visited,
.btn.btn-outline:hover,
.btn.btn-outline:focus-visible{ color:var(--brand) !important; }


/* ========== 4) Accessibilitat ========== */
:focus-visible{ outline:3px solid var(--focus); outline-offset:2px; }
.sr-only{ position:absolute !important; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.skip-link:focus{
  position:fixed; left:1rem; top:1rem; width:auto; height:auto;
  background:#fff; color:#000; padding:.5rem .75rem; border-radius:.5rem;
  box-shadow:0 4px 18px rgba(0,0,0,.15); z-index:1000;
}


/* ========== 5) Capçalera i navegació superior ========== */
.site-header{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 2000;             
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.65));
  backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.header-inner{
  max-width:1200px;
  margin:0 auto;
  padding:.5rem 1rem;
  display:flex;
  align-items:center;
  gap:.75rem;
}

/* Botó “casa” */
.home-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px; height:36px;
  border-radius:10px;
  color:var(--brand);
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}
.home-link:hover{
  background:#eef7fb;
  border-color:rgba(0,73,135,.35);
}

/* ====== MENÚ ESCRIPTORI (≥ 901px) ====== */

.topnav {
  margin-left:.5rem;
}

.menubar{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  gap:.5rem;
  align-items:center;
}
.menu{
  position:relative;
  list-style:none;
}
.menu-toggle{
  background:#fff;
  border:1px solid rgba(13,71,138,.08);
  border-radius:0;
  padding:.6rem 1.1rem;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  font-size:.9rem;
  letter-spacing:.2px;
  border-bottom:none !important;
}
.menu-toggle:hover{
  background:#eef7fb;
  border-color:rgba(0,73,135,.35);
}
.menu.is-open > .menu-toggle {
  background:#eef7fb;
  color:#004987;
  border-color: rgba(0,73,135,.35);
}

.dropdown{
  position:absolute;
  top:calc(100% + .4rem);
  left:0;
  min-width:260px;
  max-width:320px;
  background:#fff;
  display:none;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:0.75rem 0.75rem 0.9rem;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  z-index: 3000;
}
.menu.is-open > .dropdown{ display:block; }

.dropdown li{ list-style:none; }
.dropdown li + li { margin-top: 0.35rem; }
.dropdown a{
  display:block;
  color:#004987;
  text-decoration:none;
  font-weight:400;
  border-radius:0;
  border:none;
  padding:0.45rem 0.6rem;
  transition:all 0.2s ease;
}
.dropdown a:hover,
.dropdown a:focus-visible{
  text-decoration:underline;
  color:#004987;
  background:transparent;
  border:none;
}

/* Cercador (només escriptori) */
.search{
  margin-left:auto;
}
.search input{ min-width:10ch; }

/* ====== MENÚ MÒBIL (≤ 900px) ====== */

/* Per defecte (escriptori) amaguem menú mòbil */
/* Per defecte: botó mòbil i menú mòbil ocults */
.mobile-menu-toggle{
  display:none;
}
.mobile-menu{
  display:none;
}

/* ------ Vista mòbil ------ */
@media (max-width:900px){

  /* Amaguem menú d’escriptori i cercador */
  .topnav{
    display:none;
  }
  .search{
    display:none !important;
  }

  /* Mostrem botó mòbil */
  .mobile-menu-toggle{
    display:inline-flex;
    margin-left:auto;
    align-items:center;
    gap:.35rem;
    background:#004987;
    color:#fff;
    border:none;
    border-radius:9999px;
    padding:.45rem .9rem;
    font-weight:700;
    font-size:.95rem;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(0,0,0,.18);
  }
  .mobile-menu-toggle:hover{
    background:#0b5fa7;
  }

  /* Overlay a pantalla completa */
  .mobile-menu{
    position:fixed;
    inset:0;                           /* top, right, bottom, left = 0 */
    background:rgba(0,0,0,.45);
    z-index:2500;
    display:flex;
    justify-content:flex-end;
    align-items:stretch;               /* el panell ocupa tota l’alçada */
  }

  .mobile-menu[hidden]{
    display:none;
  }

  /* Panell lateral blanc amb scroll intern */
  .mobile-menu__panel{
    background:#fff;
    width:80%;
    max-width:340px;
    height:100%;                       /* 100% de l’alçada disponible */
    overflow-y:auto;                   /* scroll si el contingut és llarg */
    -webkit-overflow-scrolling:touch;
    padding:1.25rem 1.5rem 2.5rem;
    box-shadow:-4px 0 20px rgba(0,0,0,.35);
    border-radius:16px 0 0 0;
    position:relative;
  }

  .mobile-menu__title{
    margin:0 0 .75rem;
    font-size:1.2rem;
    font-weight:800;
    color:#004987;
  }

  .mobile-menu__section-label{
    margin:1.25rem 0 .35rem;
    font-weight:700;
    font-size:.9rem;
    color:#004987;
    text-transform:uppercase;
    letter-spacing:.03em;
  }

  .mobile-menu ul{
    list-style:none;
    margin:0 0 .5rem;
    padding:0;
  }
  .mobile-menu li + li{
    margin-top:.2rem;
  }
  .mobile-menu a{
    display:block;
    padding:.32rem 0;
    color:#1f2937;
    text-decoration:none;
    font-size:.95rem;
  }
  .mobile-menu a:hover{
    color:#004987;
    text-decoration:underline;
  }

  .mobile-menu__close{
    position:absolute;
    top:.6rem;
    right:.8rem;
    background:#004987;
    color:#fff;
    border:none;
    border-radius:50%;
    width:30px;
    height:30px;
    font-size:1.1rem;
    font-weight:700;
    cursor:pointer;
    box-shadow:0 2px 6px rgba(0,0,0,.25);
  }
  .mobile-menu__close:hover{
    background:#0b5fa7;
  }

  /* Quan el menú mòbil és obert, bloquegem scroll del body */
  body.mobile-menu-open{
    overflow:hidden;
  }
}


/* ========== 6) Hero (portada) ========== */
.hero{
  position:relative; min-height:40vh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; color:#fff; overflow:hidden;
  scroll-margin-top:var(--header-h);
}
.index-root .hero-bg{
  background-image: url("../assets/images/Fons\ v1.jpg") !important;
  background-size: cover;
  background-position: center;
}
.hero-bg{
  position:absolute; inset:0;
  background-image:url("../assets/images/Fons\\ v1.jpg");
  background-size:cover; background-position:center;
  filter:brightness(.8) contrast(1.05);
  z-index:0;
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(0,73,135,.85), rgba(0,73,135,.55));
  z-index:1;
}
.hero-content{ position:relative; z-index:2; max-width:900px; padding:2.5rem 1rem 2rem; }
.hero-title{
  font-size:clamp(2.2rem, 3.5vw + 1rem, 3.2rem);
  font-weight:600; color:#fff; line-height:1.2; margin-bottom:1rem;
  text-shadow:0 3px 10px rgba(0,0,0,.35);
}
.hero a.btn.btn-primary,
.hero a.btn.btn-primary:visited,
.hero a.btn.btn-primary:focus-visible{
  background:#fff; border:2px solid var(--brand); color:var(--brand) !important;
  box-shadow:0 6px 14px rgba(0,0,0,.12);
  padding:.8rem 1.6rem; border-radius:9999px; font-weight:700;
  transition:all .25s;
}
.hero a.btn.btn-primary:hover{ background:var(--brand); border-color:var(--brand); color:#fff !important; }
@media (max-width:900px){ .hero-content{ padding-top:1.75rem; } }


/* ========== 7) Portada: targetes (capítols) ========== */
.container{ max-width:1200px; margin:0 auto; padding:0 1rem; }
#capitols,.intro,.video-banner,.resources{ scroll-margin-top:var(--header-h); }

.chapters .grid{
  display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; margin-top:1.25rem;
}
@media (max-width:1100px){ .chapters .grid{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:800px){  .chapters .grid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px){  .chapters .grid{ grid-template-columns:1fr; } }

.card{
  position:relative; display:block; height:var(--card-h); color:var(--ink);
  border-radius:18px; overflow:hidden; background-size:cover; background-position:center; background-repeat:no-repeat;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  transition:transform .25s, box-shadow .25s;
}
.card:hover, .card:focus-visible{
  transform:translateY(-6px);
  box-shadow:0 16px 36px rgba(0,0,0,.12), 0 0 18px 2px rgba(121,204,208,.35);
}
.card::before{ content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,0) 60%); z-index:1; pointer-events:none; }
.card .card-info{
  position:absolute; left:0; right:0; bottom:0; background:#fff;
  border-top:1px solid rgba(0,0,0,.08); padding:.85rem 1rem; min-height:84px; z-index:2;
}
.card .card-info h3{
  margin:0 0 .25rem; text-align:center; font-weight:800; color:var(--brand);
  font-size:clamp(.95rem, .72rem + .5vw, 1.15rem); line-height:1.25; display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden;
}
.card .card-info p{
  margin:0; text-align:center; color:var(--muted);
  font-size:clamp(.85rem, .7rem + .3vw, .95rem); line-height:1.35; display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden;
}
@media (max-width:520px){ .card .card-info{ min-height:96px; padding:1rem; } }
.card img{ display:none !important; }
.card1{ background-image:url("../assets/images/Imatge bloc 1.jpg"); }
.card2{ background-image:url("../assets/images/Imatge bloc 2.jpg"); }
.card3{ background-image:url("../assets/images/Imatge bloc 3.jpg"); }
.card4{ background-image:url("../assets/images/Imatge bloc 4.jpg"); }
.card5{ background-image:url("../assets/images/Imatge bloc 5 v2.jpg"); }
.card6{ background-image:url("../assets/images/Imatge bloc 6.jpg"); }
.card7{ background-image:url("../assets/images/Imatge bloc 7.jpg"); }
.card8{ background-image:url("../assets/images/Imatge bloc 8.jpg"); }
.chapters{ padding-bottom:4rem; }


/* ========== 8) Pàgines de bloc: heroi + layout ========== */
.page [id]{ scroll-margin-top:calc(var(--header-h) + 12px); }

.page-hero {
  position: relative;
  color: #fff;
  padding: 6rem 0 3rem;
  background-image: url("../assets/images/Imatge bloc 1.jpg");
  background-size: cover;
  background-position: center;
  text-align: center; /* 🔹 Centra tot el contingut */
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25));
  z-index: 0;
}

.page-hero .container {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto; /* 🔹 centra el contenidor */
}

.page-title {
  background: rgba(255,255,255,0.85);
  display: inline-block;
  margin: 0 auto; /* 🔹 centra el títol dins del contenidor */
  padding: 1rem 1.75rem;
  border-radius: 14px;
  color: var(--brand);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  font-size: clamp(2rem, 1.2rem + 2vw, 2.5rem);
  line-height: 1.2;
}

.page-layout{ padding:1rem 0 2rem; transition:margin-left .25s ease; }
.layout{ display:grid; grid-template-columns:1fr; gap:2rem; }


/* ========== 9) Índex lateral (TOC) — mòbil/escriptori ========== */
/* Botó flotant (mòbil) */
.sidenav-toggle{
  position:fixed; left:1rem; bottom:1rem; z-index:2000;
  display:inline-flex; align-items:center; gap:.45rem;
  background:var(--brand); color:#fff; border:0; border-radius:9999px;
  padding:.7rem 1rem; font-weight:800; cursor:pointer;
  box-shadow:0 10px 26px rgba(0,73,135,.22);
  transition:background .25s, transform .15s;
}
.sidenav-toggle:hover{ background:var(--brand-2); }
.sidenav-toggle:active{ transform:scale(.98); }

/* Panell lateral */
.sidenav{
  position:fixed; top:var(--header-h); left:0; z-index:1000;
  width:min(var(--toc-w), 86vw);
  height:calc(100svh - var(--header-h));
  transform:translateX(-105%); transition:transform .25s ease;
}
.sidenav.is-open{ transform:translateX(0); }
@media (max-width:979px){ body.toc-open{ overflow:hidden; } }

.sidenav-list{
  position:relative;
  height:100%;
  overflow:auto;
  margin:.8rem;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#fff;
  box-shadow:8px 0 24px rgba(0,0,0,.15);
  box-sizing: border-box;

  padding:1rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom) + 24px);

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sidenav-list ol{ list-style:none; margin:0; padding-left:0; display:grid; gap:.6rem; }
.sidenav-list ol ol{ padding-left:1rem; gap:.4rem; margin-top:.4rem; }

.sidenav-list a{
  display:inline-block; color:#1f2937;
  text-decoration:none; border:1px solid rgba(0,0,0,.06);
  border-radius:8px; padding:.35rem .5rem; transition:background .25s, color .25s;
}
.sidenav-list a:hover, .sidenav-list a:focus-visible{ background:#eef7fb; color:#004987; border-color:rgba(0,73,135,.35); }

/* Estat actiu */
.sidenav-list a.is-active,
.sidenav-list a[aria-current="true"]{
  background:#eef7fb; color:#004987; border-color:rgba(0,73,135,.35);
  font-weight:800; position:relative; scroll-margin: 12px 0 24px 0;
}
.sidenav-list a.is-active::before{
  content:""; position:absolute; left:-8px; top:8px; bottom:8px;
  width:3px; background:#004987; border-radius:2px;
}

/* Botó tancar dins el panell */
.sidenav-close{
  position:absolute; top:.4rem; right:.6rem; z-index:1001;
  background:var(--brand); color:#fff !important; border:none;
  width:28px; height:28px; border-radius:50%;
  font-size:1.1rem; font-weight:700; line-height:1; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 6px rgba(0,0,0,.15); transition:background .2s;
}
.sidenav-close:hover{ background:var(--brand-2); }

.sect, .subsect, [id^="b4-"]{
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* Amaga el botó flotant quan el TOC està obert */
body.toc-open .sidenav-toggle{
  opacity:0; pointer-events:none; transform:scale(.9);
  transition:opacity .2s, transform .2s;
}

/* — Escriptori (>=980px): el TOC pot obrir-se o tancar-se (no fix permanent) */
@media (min-width:980px){
  .sidenav{ width:var(--toc-w); }
  /* Quan està obert: desplaça */
  body.toc-open .sidenav{ transform: translateX(0) !important; }
  body.toc-open .page-layout{ margin-left: var(--toc-w); }
  /* Quan està tancat: tot a 0 i panell fora de la vista */
  body:not(.toc-open) .page-layout{ margin-left:0 !important; }
  body:not(.toc-open) .sidenav{ transform:translateX(-105%) !important; }
  /* En escriptori el botó flotant no cal, però si vols mostrar-lo deixa'l */
}

/* — Mòbil (<980px): off-canvas segons .is-open i sense desplaçar contingut */
@media (max-width:979px){
  .sidenav.is-open{ transform:translateX(0); }
  .page-layout, .page-hero .container{ margin-left:0 !important; }
}


/* ========== 10) Contingut interior ========== */
.content{ min-width:0; }
.sect{ padding:1.25rem 0; border-top:1px solid rgba(0,0,0,.06); }
.sect:first-of-type{ border-top:0; }
.sect h2{ font-weight:800; color:var(--ink); margin:.25rem 0 .5rem; }
.subsect{ margin-top:1rem; }
.subsect h3{ font-weight:800; color:var(--ink); margin:.5rem 0 .25rem; }
.muted{ color:var(--muted); }

/* targetes petites */
.cards-2{ display:grid; grid-template-columns:1fr; gap:1rem; margin-top:.5rem; }
@media (max-width:700px){ .cards-2{ grid-template-columns:1fr; } }
.mini-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:1rem 1rem .75rem;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
  margin-bottom:1rem;
}
.mini-card h3{ margin:.25rem 0 .5rem; font-weight:800; color:var(--brand); font-size:1rem; }
.mini-card ul{ margin:.25rem 0 0 1rem; }


/* ========== 11) Buscador global ========== */
.search-backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.15); backdrop-filter:blur(1px); z-index:1900;
}
.search-results{
  position:fixed; top:84px; right:1rem; width:min(560px,92vw); max-height:calc(100vh - 120px); overflow:auto;
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:14px; box-shadow:0 18px 40px rgba(0,0,0,.2);
  z-index:2001; font-family:"Open Sans", Arial, sans-serif;
}
.search-results__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:.75rem 1rem; border-bottom:1px solid rgba(0,0,0,.06);
}
.search-results__close{
  background:transparent; border:0; cursor:pointer; font-size:1.1rem; font-weight:800; color:var(--ink);
}
.search-results__close:hover{ color:var(--brand); }
.search-results__list{ list-style:none; padding:.25rem 0; margin:0; display:grid; gap:.25rem; }
.search-results__item{ display:block; color:inherit; padding:.6rem 1rem; border-radius:10px; transition:background .15s; }
.search-results__item:hover{ background:#f7fafc; }
.search-results__item p{ margin:.25rem 0 0; color:var(--muted); font-size:.95rem; }
.search-results__empty{ padding:1rem; color:var(--muted); }
.search-results mark{ background:#fff3b0; padding:0 .1em; border-radius:3px; }


/* ========== 12) Tip (bombeta) ========== */
.tip-box{ margin:.5rem 0 1rem; }
.tip-toggle{
  background:var(--brand); color:#fff; border:0; border-radius:9999px;
  padding:.45rem .9rem; font-size:.9rem; font-weight:700; cursor:pointer;
  display:inline-flex; align-items:center; gap:.4rem;
  box-shadow:0 6px 18px rgba(0,73,135,.25);
  transition:background .25s, transform .15s;
  max-height:40px; margin-top:.1rem;
}
.tip-toggle:hover{ background:var(--brand-2); transform:scale(1.02); }
.tip-icon{
  width:30px; height:30px; object-fit:contain; display:inline-block;
  filter:brightness(0) invert(1); vertical-align:middle;
}
.tip-content{
  background:#f7fafc; border-left:4px solid var(--brand); border-radius:8px;
  padding:.9rem 1rem; margin-top:.6rem; box-shadow:0 6px 16px rgba(0,0,0,.05);
  animation:fadeIn .3s ease;
}
@keyframes fadeIn{ from{opacity:0; transform:translateY(-4px);} to{opacity:1; transform:translateY(0);} }




/* ========== 13) Acordió ========== */
.acc-group{ display:grid; grid-template-columns:1fr; gap:.75rem; }
.acc-toggle{
  appearance:none; -webkit-appearance:none; width:100%; text-align:left; cursor:pointer;
  background:#fff; color:var(--brand);
  border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:1rem 1.1rem;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  transition:background .2s, border-color .2s, box-shadow .2s;
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
  font-size:var(--acc-title-size); line-height:1.35; font-weight:800;
}
.acc-toggle:hover{ background:#f7fafc; border-color:rgba(0,73,135,.25); box-shadow:0 12px 26px rgba(0,0,0,.1); }
.acc-toggle[aria-expanded="true"]{ background:#eef7fb; border-color:rgba(0,73,135,.35); }
.acc-caret{ margin-left:.75rem; transform:rotate(0); transition:transform .2s; opacity:.75; }
.acc-toggle[aria-expanded="true"] .acc-caret{ transform:rotate(90deg); opacity:1; }
.acc-panel{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-left:4px solid var(--brand);
  border-radius:12px; padding:1rem; box-shadow:0 10px 22px rgba(0,0,0,.08);
  margin-top:-.5rem; margin-bottom:.5rem;
}
.acc-anchor{ position:relative; display:block; height:0; top:calc(-1 * var(--header-h) - 12px); }
.acc-panel p{ margin:.25rem 0 .75rem; }
.tipologies p{ margin-bottom:1rem; }
.tipologia-card{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px;
  padding:1rem 1.2rem; margin-bottom:1rem;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
  transition:transform .25s, box-shadow .25s;
}
.tipologia-card:hover{ transform:translateY(-3px); box-shadow:0 10px 26px rgba(0,73,135,.15); }
.tipologia-card h4{ color:var(--brand); font-weight:800; margin-bottom:.5rem; font-size:1.1rem; }
.tipologia-card ul{ margin:.5rem 0 0 1.2rem; }
.highlight-box{ background:#eef7fb; border-left:4px solid var(--brand); padding:.75rem 1rem; border-radius:8px; margin-top:1rem; }
.warning-box{ background:#f3eacf; border-left:4px solid #e0a800; padding:.8rem 1rem; border-radius:8px; margin-top:1rem; }
.warning-box h5{ color:#946200; margin-bottom:.3rem; }


/* ========== 14) Infocard + Lightbox ========== */
.infocard{ margin:1rem 0; display:flex; justify-content:center; }
.infocard-open{
  display:inline-block; background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px;
  overflow:hidden; cursor:pointer; text-align:left;
  box-shadow:0 10px 22px rgba(0,0,0,.08); transition:transform .25s;
}
.infocard-open:hover{ transform:translateY(-4px); box-shadow:0 14px 28px rgba(0,0,0,.12); }
.infocard img{
  display:block; width:100%; height:auto; max-width:500px;
  border-radius:12px 12px 0 0; transform:scale(1); transition:transform .25s;
}
.infocard-open:hover img{ transform:scale(1.02); }
.infocard figcaption{
  padding:.6rem .8rem; font-size:.95rem; color:var(--ink); background:#fff;
  border-top:1px solid rgba(0,0,0,.06); text-align:center; font-style:italic;
}

/* Lightbox */
.lightbox[hidden]{ display:none !important; }
.lightbox{ position:fixed; inset:0; display:grid; place-items:center; z-index:2100; }
.lightbox__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(2px); }
.lightbox__dialog{
  position:relative;
  background:#fff;
  border-radius:14px;
  box-shadow:0 30px 80px rgba(0,0,0,.35);
  padding:1rem;
  width:min(960px,92vw);
  max-height:86vh;
  display:grid;
  gap:.5rem;
}
.lightbox__dialog img{ width:100%; height:auto; max-height:72vh; object-fit:contain; border-radius:8px; }
.lightbox__close{
  position:absolute; top:.5rem; right:.5rem; width:36px; height:36px; border-radius:50%;
  background:var(--brand); color:#fff; border:0; font-size:1.2rem; font-weight:800; cursor:pointer;
  box-shadow:0 6px 16px rgba(0,0,0,.2);
}
.lightbox__close:hover{ background:var(--brand-2); }
.lightbox__download{
  justify-self:end; display:inline-block; text-decoration:none;
  background:#fff; color:var(--brand); border:2px solid var(--brand);
  border-radius:9999px; padding:.5rem .9rem; font-weight:800;
}
.lightbox__download:hover{ background:#eef7fb; }


/* ========== 15) Modals genèrics ========== */
.modal[hidden]{ display:none !important; }
.modal{ position:fixed; inset:0; display:grid; place-items:center; z-index:120; }
.modal__backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.2); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
.modal__panel{
  position:relative; z-index:1; width:min(760px, 92vw);
  background:#fff; color:#1f2937; border:2px solid #004987; border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.25); padding:1rem 1rem .9rem;
}
.modal__panel--image{ width:min(1100px, 96vw); padding:.75rem; }
.modal__title{ margin:0 2rem .4rem 0; color:#004987; font-weight:800; font-size:1.15rem; }
.modal__body{ line-height:1.6; }
.modal__footer{ display:flex; justify-content:flex-end; padding:.6rem 0 .2rem; }

.modal__close{
  position:absolute; top:.5rem; right:.5rem;
  background:#004987; color:#eef7fb !important; border:2px solid #004987;
  width:36px; height:36px; border-radius:9999px; display:flex; align-items:center; justify-content:center;
  font-size:1.1rem; font-weight:800; line-height:1; cursor:pointer; transition:all .2s;
}
.modal__close:hover{ background:#004987; color:#fff !important; transform:translateY(-1px); box-shadow:0 4px 12px rgba(0,0,0,.15); }
.modal__panel img{ max-width:100%; height:auto; display:block; border-radius:8px; }

.modal .btn.btn-primary{
  background:#004987; color:#fff !important; border:2px solid #004987;
  border-radius:9999px; padding:.6rem 1.2rem; font-weight:700;
}
.modal .btn.btn-primary:hover{ filter:brightness(1.1); }


.modality-row{
  display:grid; grid-template-columns:repeat(3, minmax(200px, 1fr)); gap:14px; margin:.5rem 0 1rem;
}
@media (max-width:900px){ .modality-row{ grid-template-columns:1fr; } }
.modality-tile{
  display:flex; align-items:center; gap:.75rem; background:#fff; color:#004987;
  border:2px solid #004987; border-radius:12px; padding:.85rem 1rem; cursor:pointer; font-weight:700; text-align:left;
  box-shadow:0 8px 20px rgba(0,0,0,.06); transition:transform .1s, filter .15s, box-shadow .1s;
}
.modality-tile:hover{ transform:translateY(-2px); filter:brightness(1.03); }
.modality-ico{ font-size:1.15rem; }
.modality-title{ font-size:1rem; }

.modal__body{
  display: block !important;  
  column-count: 1 !important;  
  columns: auto !important;   
}

.modal__panel .content,
.modal__panel .columns-2,
.modal__panel [style*="column-count"]{
  column-count: 1 !important;
  columns: auto !important;
}

/* ========== 16) Paginació (pager) ========== */
.pager{
  display:flex; align-items:center; gap:1rem;
  margin-bottom:3rem;
}
.pager .spacer{ flex:1; }
.btn.btn-outline{
  background: #dde7ed;
  color: var(--brand);
  border-radius: 9999px;
  padding: .7rem 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0,73,135,.1);  
  transition: all .2s ease;
}
.btn.btn-outline:hover{
  background: #dde7ed;
  border-color: var(--brand);      
}
@media (max-width:640px){
  .pager{ flex-wrap:wrap; }
  .pager .btn{ width:100%; justify-content:center; }
}


/* ========== 17) Peu de pàgina ========== */
.site-footer{ background:var(--brand); color:#ffffff; padding:1.2rem 0; text-align:center; margin-top: 0 !important; }
.site-footer p{ margin:.5rem 0; }


/* ========== 18) Ajustos responsive específics ========== */

@media (max-width:900px){
  .header-inner{ gap:.5rem; padding:.4rem .8rem; }
  .search{ display:none !important; }
  .menubar{
    flex-wrap:nowrap !important; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:thin; gap:.4rem;
  }
  .menu{ flex:0 0 auto; }

 
  .dropdown{
    position:fixed !important; left:0; right:0; top:var(--header-h);
    margin:0 auto; max-width:none; width:100%;
    border-radius:0 0 12px 12px; box-shadow:0 14px 30px rgba(0,0,0,.18);
  }

  
  body:has(.menu.is-open) main{ filter:none; pointer-events:auto; }
}


.page [id], .toc-anchor{ scroll-margin-top:calc(var(--header-h) + 10px); }


.page-hero{ padding-top:calc(3.5rem + 0px); }

/* ========== 19) Contingut apartat RLPT ========== */
.rlpt-block{ margin: 1.25rem 0 1.5rem; }
.rlpt-block__head{
  background: var(--brand);
  color: #fff;
  border-radius: 14px 14px 0 0;
  padding: .85rem 1rem;
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
}
.rlpt-block__head h1,
.rlpt-block__head h2,
.rlpt-block__head h3,
.rlpt-block__head .rlpt-block__title {
  color: #fff !important;       
}
.rlpt-block__title{
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.05rem, .9rem + .6vw, 1.35rem);
  line-height: 1.25;
}


.rlpt-block__body{
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-top:0;
  border-radius: 0 0 14px 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}
.rlpt-block__body > *:first-child{ margin-top:.1rem; }
.rlpt-block__body > *:last-child{ margin-bottom:.1rem; }


.rlpt-block .checklist{ margin: .5rem 0 .75rem 1.1rem; }
.rlpt-block li{ margin:.25rem 0; }


.rlpt-block + .rlpt-block{ margin-top: 1.25rem; }
.rlpt-block + .pager{ margin-top: 1.75rem; }


.rlpt-block__head{
  background: linear-gradient(180deg, var(--brand) 0%, #003a6c 100%);
}

/* ========== 20) Apartat Bones pràctiques========== */
.check-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  padding: 1.5rem 1.5rem 1rem;
  margin-bottom: 2rem;
  overflow: hidden;
}


.check-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 45%; 
  background-image:
    linear-gradient(to left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 35%, rgba(255,255,255,1) 100%),
    var(--bg-url);
  background-size: cover;
  background-position: center right;
  opacity: 0.8; 
  pointer-events: none; 
  border-radius: inherit;
  transition: opacity .3s ease;
}

.check-card:hover::after {
  opacity: 0.4; 
}


.check-card > * {
  position: relative;
  z-index: 2;
}


.checklist{
  list-style: none;
  margin: .25rem 0 .75rem 0;
  padding: 0;
  display: grid;
  gap: .5rem;
}
.checklist li{
  position: relative;
  padding-left: 1.65rem; 
  line-height: 1.5;
}
.checklist li::before{
  content: "";
  position: absolute;
  left: 0; top: .15rem;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  
  mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23004987" d="M9.00039 16.2002L4.80039 12.0002L3.40039 13.4002L9.00039 19.0002L21.0004 7.0002L19.6004 5.6002L9.00039 16.2002Z"/></svg>') center / 70% 70% no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23004987" d="M9.00039 16.2002L4.80039 12.0002L3.40039 13.4002L9.00039 19.0002L21.0004 7.0002L19.6004 5.6002L9.00039 16.2002Z"/></svg>') center / 70% 70% no-repeat;
  background-color: var(--brand); 
}


.card-actions{
  display: flex;
  gap: .5rem;
  margin-top: .5rem;
  flex-wrap: wrap;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.modal[hidden] { display: none; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(3px);
}


.modal__panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 50px rgba(0,0,0,.4);
  width: min(900px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
  animation: popIn .25s ease;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}


.modal__close {
  position: absolute;
  top: .6rem;
  right: .8rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  z-index: 3;
}
.modal__close:hover { background: var(--brand-2); }


.modal__body {
  flex: 1;
  display: flex;
  align-items: center;    
  justify-content: center; 
  padding: 1rem;
  background: #fff;
}
.modal__body img {
  max-width: 100%;
  max-height: 80vh;        
  border-radius: 8px;
  object-fit: contain;
  margin: auto;
}


.modal__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: .8rem 1rem;
  border-top: 1px solid rgba(0,0,0,.08);
  background: #fafafa;
}

/* ========== 21) Bloc recursos addicionals oficials ========== */
/* Acordió de documents (6.1) */
.doc-accordion { margin-top: .75rem; }
.acc-group, .doc-accordion { position: relative; z-index: 0; }

.acc-toggle { cursor: pointer; position: relative; z-index: 1; }

.acc-toggle.doc-toggle{
  position: relative;
  overflow: hidden;
  --doc-bg: url("../assets/images/acordiódescarregar.png");
  background:#fff;
}

.acc-toggle.doc-toggle::after{
  content:"";
  position:absolute; inset:0;
  background: var(--doc-bg) no-repeat right 1rem center / 44px auto;
  opacity:.25;
  pointer-events:none;              
}

.doc-toggle .doc-title{
  color: var(--brand);
  font-weight: 800;
}

.doc-actions{
  margin-top:.5rem;
  display:flex; gap:.5rem; justify-content:flex-start;
  margin-top: 0.6rem;    
  margin-bottom: 1.2rem; 
}

.doc-btn{ display:inline-flex; align-items:center; gap:.5rem; }

.doc-icon{
  width:20px; height:20px; display:inline-block; object-fit:contain;
  filter: brightness(0) invert(1);
}

.doc-actions .btn {
  padding: 0.45rem 0.9rem; 
  font-size: 0.9rem;        
  border-radius: 9999px;    
}

.acc-toggle.doc-toggle[aria-expanded="true"]{
  background:#eef7fb;
  border-color: rgba(0,73,135,.35);
}
.acc-panel { display: block; }
.acc-panel[hidden] { display: none !important; }


.link-cards{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1rem 0 0;
}
@media (max-width: 1100px){
  .link-cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .link-cards{ grid-template-columns: 1fr; }
}

.link-card{
  appearance:none; -webkit-appearance:none;
  width:100%; text-align:left; cursor:pointer;
  background:
    radial-gradient(140px 120px at 95% 50%, rgba(121,204,208,.18), transparent 70%),
    #fff;
  color: var(--brand);
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:1.1rem 1.25rem;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  display:flex; flex-direction:column; gap:.35rem;
  transition:background .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.link-card:hover{
  transform:translateY(-3px);
  background:#ceecee;
  border-color:rgba(0,73,135,.25);
  box-shadow:0 14px 28px rgba(0,0,0,.12);
}
.link-card__title{
  font-weight:800; font-size:1.05rem; line-height:1.35;
}
.link-card__cta{
  font-weight:700; opacity:.8;
}


.link-list{
  margin:.25rem 0 0 1rem;
}
.link-list li{ margin:.35rem 0; }
.link-list a {
  color: #000000;            
  text-decoration: underline; 
  font-weight: 600;
  transition: color .2s ease;
}

.link-list a:hover {
  color: #79CCD0;             
  text-decoration-thickness: 2px;
}

/* ====== 22) Formats Conculsions ====== */
.conclusions {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

.conclusion {
  position: relative;
  padding: 1.5rem 1.75rem;
  background: #f8fafc;
  border-left: 5px solid var(--brand);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
  font-size: 1.05rem;
  line-height: 1.6;
  transition: transform .25s ease, box-shadow .25s ease;
}

.conclusion::before {
  content: "“";
  position: absolute;
  top: -10px;
  left: 3px;
  font-size: 3rem;
  color: rgba(0,73,135,.15);
  font-weight: 800;
}

.conclusion:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,73,135,.12);
}

.conclusion.highlight {
  background: #eef7fb;
  border-left-color: #0074B7;
  font-weight: 600;
  color: #003E6B;
}

/* ========== 23) Bloc 4 — pseudoestructura i navegació ========== */
body.only-one-b4 .content .sect { display: none; }
body.only-one-b4 .content .sect.is-current { display: block; }


.section-controls { margin: .75rem 0 1rem; display:flex; gap:.5rem; }


.page-layout { min-height: 50vh; }

/* ========== 24) Bloc 4 — estils generals (taules, imatges, exemples, rols, modals) ========== */



/* ----------------------------------------------------------
  0) Variables del bloc
---------------------------------------------------------- */
:root{
  --brand-blue:#0b5fa7;          
  --brand-blue-600:#0a4f8a;      
  --row-hover:#f3f7fb;
  --ring:#ffd666;
  --text:#0b1721;
  --muted:#004987;               
  --link:#79CCD0;               
  --border:#e5e7eb;
  --radius:14px;
  --section-separator:#e6edf2;   
}

/* ----------------------------------------------------------
  1) Separadors seccions
---------------------------------------------------------- */
.sect h1, .sect h2, .sect h3,
.subsect h1, .subsect h2, .subsect h3{
  border-top: 1px solid var(--section-separator);
  padding-top: 1rem;
  margin-top: 2rem;
}
.sect > h1:first-child, .sect > h2:first-child, .sect > h3:first-child,
.subsect > h1:first-child, .subsect > h2:first-child, .subsect > h3:first-child{
  border-top: none; padding-top: 0; margin-top: 0;
}
.subsect h3{ padding-top:.75rem; margin-top:1.5rem; }

/* ----------------------------------------------------------
  2) Taules bàsiques (table-basic)
---------------------------------------------------------- */
.table-basic{
  width:100%; border-collapse:collapse; margin:1.25rem 0;
  font-size:.95rem; box-shadow:0 2px 6px rgba(0,0,0,.05);
}
.table-basic th{
  background:#004987; color:#fff; text-align:left;
  padding:.6rem 1rem; font-weight:700;
}
.table-basic td{
  border:1px solid #bcd0e0; padding:.6rem 1rem; color:#222;
}
.table-basic tr:nth-child(even){ background:#f8fafc; }

/* ----------------------------------------------------------
  3) Taula “doc-table” interactiva 
---------------------------------------------------------- */
.table-wrap{
  overflow:auto; border:1px solid var(--border); border-radius:var(--radius);
  background:#fff; box-shadow:0 2px 10px rgba(16,24,40,.06);
}
.doc-table{
  width:100%; border-collapse:separate; border-spacing:0;
  font-size:15px; line-height:1.45; color:var(--text);
}
.doc-table caption{
  text-align:left; padding:.9rem 1rem; font-weight:600; color:var(--muted);
  border-bottom:1px solid var(--border); background:#fafbfc;
}

.doc-table thead th{
  position:sticky; top:0; background:var(--brand-blue-600); color:#fff;
  padding:.85rem 1rem; text-align:left; font-weight:700; cursor:pointer; user-select:none;
}
.doc-table thead th.sort-asc::after{ content:"▲"; margin-left:.5rem; font-size:.8em; }
.doc-table thead th.sort-desc::after{ content:"▼"; margin-left:.5rem; font-size:.8em; }

.doc-table td{ padding:1rem; border-top:1px solid var(--border); vertical-align:top; }
.doc-table tbody tr:hover{ background:var(--row-hover); }

.doc-table a{ color:var(--link); text-decoration:underline; }
.doc-table a:hover{ text-decoration:none; }


.table-actions{ margin:.75rem .25rem 0; color:#003a6c; }
.btn.btn-secondary{
  background:#004987; color:#fff; border:none; border-radius:8px;
  padding:.6rem 1.2rem; font-weight:600; cursor:pointer;
  transition: background-color .25s ease, transform .15s ease;
}
.btn.btn-secondary:hover{ background:#0b5fa7; transform:translateY(-1px); }
.btn.btn-secondary:active{ background:#003a6d; transform:translateY(0); }


@media (max-width: 820px){

  .doc-table thead{ display:none; }


  .doc-table,
  .doc-table tbody,
  .doc-table tr{
    display:block;
    width:100%;
  }


  .doc-table td{
    display:block;
    width:auto;                     
    border:0;
    border-bottom:1px dashed var(--border);
    padding:.75rem .9rem .75rem 5.8rem;
    position:relative;
  }

  .doc-table tr{
    border:1px solid var(--border);
    border-radius:12px;
    margin:12px 0;
    box-shadow:0 1px 6px rgba(16,24,40,.05);
  }

  .doc-table td:last-child{ border-bottom:0; }

  .doc-table td::before{
    content:attr(data-label);
    position:absolute;
    left:.9rem;
    top:.75rem;
    width:5rem;
    font-weight:600;
    color:var(--muted);
    white-space:normal;
  }

 
  .doc-table td,
  .doc-table td::before,
  .doc-table td a {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
}


/* ----------------------------------------------------------
  4) Enllaços dintre de modals
---------------------------------------------------------- */
.modal__body a, ul li a{
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
  transition: color .2s ease, text-decoration .2s ease;
}
.modal__body a:hover, ul li a:hover{
  color:#003a6c;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.modal__body a:visited, ul li a:visited{ color:#003a6c; }
.modal__body a:focus-visible, ul li a:focus-visible{
  outline:2px solid #80bfff; outline-offset:2px;
}

/* ----------------------------------------------------------
  5) Imatges
---------------------------------------------------------- */
.gallery{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr));
  gap:12px; margin:1rem 0;
}
.gallery a.thumb{
  display:block; position:relative; overflow:hidden; border-radius:10px;
  background:#f5f7fa; box-shadow:0 6px 16px rgba(0,0,0,.06);
}
.gallery a.thumb img{
  display:block; width:100%; height:140px; object-fit:cover; transition:transform .25s ease;
}
.gallery a.thumb:hover img{ transform:scale(1.04); }
.gallery .thumb__caption{
  position:absolute; left:0; right:0; bottom:0; padding:.35rem .5rem;
  background:linear-gradient(to top, rgba(0,0,0,.45), transparent);
  color:#fff; font-size:.85rem;
}

.gallery--wide .thumb{ height:auto !important; overflow:visible !important; display:block; }
.gallery--wide .thumb img{
  width:100%; height:auto !important; object-fit:contain !important; max-width:100%; border-radius:12px;
}


.img-centered{
  display:block; margin:1.5rem auto; max-width:50%; height:auto; box-shadow:0 4px 12px rgba(0,0,0,.1);
}
@media (max-width:768px){
  .img-centered{ max-width:90%; margin:1rem auto; }
}

/* ----------------------------------------------------------
  6) Franja destacada (highlight)
---------------------------------------------------------- */
.highlight-banner{
  background:#004987; color:#fff; font-weight:800; font-size:1rem;
  text-align:center; padding:.6rem 1rem; border-radius:4px; margin:1rem 0;
  display:block; box-shadow:0 4px 8px rgba(0,0,0,.1);
}
@media (max-width:768px){
  .highlight-banner{ font-size:.9rem; padding:.5rem .8rem; }
}

/* ----------------------------------------------------------
  7) Exemples (ex-*)
---------------------------------------------------------- */
.ex-group{ display:grid; grid-template-columns:1fr; gap:.75rem; }
.ex-toggle{
  appearance:none; width:100%; cursor:pointer; text-align:left;
  display:flex; align-items:center; justify-content:space-between; gap:.75rem;
  background:#fff; color:var(--muted);
  border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:1rem 1.1rem;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  transition:background .2s, border-color .2s, box-shadow .2s;
  font-size:1rem; font-weight:800; line-height:1.35;
}
.ex-toggle:hover{ background:#f7fafc; border-color:rgba(0,73,135,.25); box-shadow:0 12px 26px rgba(0,0,0,.1); }
.ex-toggle[aria-expanded="true"]{ background:#eef7fb; border-color:rgba(0,73,135,.35); }
.ex-label{ display:inline-flex; align-items:center; gap:.5rem; color:var(--muted); }
.ex-right{ display:inline-flex; align-items:center; gap:.5rem; opacity:.9; }
.ex-icon{ width:22px; height:22px; display:inline-block; object-fit:contain; }
.ex-caret{ transition:transform .2s ease; }
.ex-toggle[aria-expanded="true"] .ex-caret{ transform:rotate(90deg); }
.ex-panel{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-left:4px solid var(--muted);
  border-radius:12px; padding:1rem; box-shadow:0 10px 22px rgba(0,0,0,.08);
  margin-top:-.5rem; margin-bottom:.5rem;
}
.ex-panel p{ margin:.25rem 0 .75rem; }

/* ----------------------------------------------------------
  8) Cards de rols
---------------------------------------------------------- */
.role-cards{
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr));
  gap:1rem; margin:.75rem 0 1rem;
}
@media (max-width:900px){ .role-cards{ grid-template-columns:1fr; } }
.role-card{
  background:#fff; border:1px solid rgba(0,0,0,.08); border-radius:12px;
  padding:1rem 1.1rem; box-shadow:0 10px 22px rgba(0,0,0,.08);
  display:grid; align-content:start; gap:.5rem; transition:transform .2s, box-shadow .2s, border-color .2s;
}
.role-card:hover{ transform:translateY(-3px); border-color:rgba(0,73,135,.25); box-shadow:0 14px 28px rgba(0,0,0,.12); }
.role-icon{ width:44px; height:44px; object-fit:contain; }
.role-title{ margin:.25rem 0 .25rem; font-weight:800; color:var(--muted); font-size:1.1rem; }
.role-copy{ margin:0 0 .25rem; color:var(--ink); }
.role-list{ margin:.25rem 0 0 1.1rem; }
.role-list li{ margin:.25rem 0; }

/* ----------------------------------------------------------
  9) Modals: scroll + amples
---------------------------------------------------------- */
.modal__panel {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; 
}

.modal__body {
  overflow-y: auto; 
  flex-grow: 1;
  padding-right: .5rem;
}

.modal__footer {
  flex-shrink: 0;
}

.warning-box {
  position: relative;
  margin-top: 1.5rem;
  max-width: 100%;
}
.modal__panel::-webkit-scrollbar{ width:8px; }
.modal__panel::-webkit-scrollbar-thumb{ background:var(--muted); border-radius:8px; }
.modal__panel::-webkit-scrollbar-track{ background:#f7f7f7; }
.modal__body{ max-height:calc(70vh - 3rem); overflow-y:auto; }
.modal__panel--wide{ max-width:1000px; width:90%; }

/* ----------------------------------------------------------
  10) Roadmap (steps-card) 
---------------------------------------------------------- */
.steps-card{
  background:#f7fafc; border-radius:20px; padding:2rem 1.5rem;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
}
.steps-header{ text-align:center; margin-bottom:2rem; }
.steps-title{ font-weight:800; color:var(--muted); font-size:1.4rem; margin-bottom:.25rem; }


.steps-track{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  justify-items:center; align-items:center;
  row-gap:2.5rem; column-gap:1.5rem;
  position:relative; padding:2rem 0;
}

.steps-track::before{
  content:""; position:absolute; top:calc(50% - 3px); left:5%; right:5%;
  height:6px; background:linear-gradient(90deg, #a6c7eb 0%, #0074c7 100%); border-radius:6px; z-index:0;
}


.step{
  position:relative; background:#004987; color:#fff;
  border:0; border-radius:16px; padding:1.5rem 1rem;
  width:160px; height:180px; text-align:center; cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
}
.step:hover{ transform:translateY(-5px); box-shadow:0 10px 20px rgba(0,0,0,.2); }
.step:focus-visible{ outline:3px solid #ffce00; outline-offset:4px; }
.step.is-active{ background:#004987; box-shadow:0 0 0 3px #fff3cd, 0 8px 20px rgba(0,0,0,.25); }
.step-dot{
  font-size:1.8rem;
  font-weight:800;
  width:50px;
  height:50px;
  border-radius:50%;
  background:rgba(255,255,255,.15);
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:.5rem;
  flex-shrink:0;
}


.step-label{
  font-weight:600;
  line-height:1.2;
  font-size:.95rem;
  color:#fff;
  max-width:8rem;
  margin:0;                           
  text-align:center;
}


.step-arrow{
  position:absolute;
  bottom:0.85rem;                    
  left:50%;
  transform:translateX(-50%);
  width:28px;
  height:auto;
}


@media (max-width:900px){
  .steps-track{
    grid-template-columns:1fr;
    row-gap:1.25rem;
    padding:1rem 0;
  }

  .steps-track::before{
    content:"";
    position:absolute;
    left:35px;
    top:10%;
    bottom:5%;
    width:6px;
    height:auto;
    background:linear-gradient(180deg, #a6c7eb 0%, #0074c7 100%);
  }

  .step{
    flex-direction:row;
    align-items:center;
    width:100%;
    height:auto;
    padding:1rem 1.25rem;
  }

  .step-dot{
    margin:0 1rem 0 0;
  }

  .step-label{
    font-size:1rem;
    text-align:left;
  }

 
  .step-arrow{
    position:static;
    bottom:auto;
    left:auto;
    margin-left:auto;
    margin-top:0;
    width:28px;
    height:auto;
    transform:rotate(90deg);
  }

  .step:hover .step-arrow{
    transform:rotate(90deg) translateX(3px);
  }
}


/* ----------------------------------------------------------
/* ----------------------------------------------------------
   11) Roadmap PIF — només en #b4-4
---------------------------------------------------------- */


#b4-4 .steps-track{
  display:grid;
  gap:20px;
  grid-template-columns:1fr;
  align-items:stretch;
}

#b4-4 .step{
  width:100%;
}


@media (min-width:768px){
  #b4-4 .steps-track{
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}


@media (min-width:1200px){
  #b4-4 .steps-track{
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}


/* ----------------------------------------------------------
  12) Botó i infografia (modal)
---------------------------------------------------------- */
.btn-infografia{
  display:inline-flex; align-items:center; gap:.5rem;
  background:#004987; color:#fff; border:none; border-radius:8px;
  padding:10px 16px; font-size:1rem; cursor:pointer; text-decoration:none;
  transition:background .2s ease;
}
.btn-infografia:hover{ background:#003a6f; }
.btn-infografia--ghost{ background:#e6f0fa; color:#004987; }
.btn-icon{ width:24px; height:24px; }

.infografia-img{ width:100%; height:auto; border-radius:8px; }
.infografia-caption{ text-align:right; font-size:.9rem; color:#555; margin-top:.5rem; }

.mini-card,
.content-box,
.table-basic {
  margin-top: 1.5rem;
}

/* ========== 26) Pàgina d’infografia FPE ========== */
#infografia-fpe-page {
  max-width: 1400px;
  margin: 6rem auto 4rem;
  padding: 0 2rem;
  text-align: center;
}


#infografia-fpe-page h1 {
  color: #004987;                  
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

#infografia-fpe-page p {
  color: #333;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}


#infografia-fpe-page .ppt-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto 2.5rem;
}

#infografia-fpe-page .ppt-wrap iframe {
  width: 95%;
  max-width: 1200px;
  height: 80vh;
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}


#infografia-fpe-page .ppt-caption {
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
  color: #005b96;
}


#infografia-fpe-page .btn.btn-primary {
  background: #004987;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

#infografia-fpe-page .btn.btn-primary:hover {
  background: #003a6f;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  #infografia-fpe-page .ppt-wrap iframe {
    width: 100%;
    height: 60vh;
  }
}

/* ========== 27) Bloc 8 — Recursos addicionals ========== */
#bloc8{
  max-width: 1200px;
  margin: 6rem auto 4rem;
  padding: 0 1.25rem;
}
#bloc8 > h1{
  color:#004987;
  font-weight:800;
  font-size:1.9rem;
  margin-bottom: .75rem;
}
#bloc8 .lead{
  color:#1f2937;
  font-size:1.05rem;
  margin-bottom: 1.75rem;
}
#bloc8 h2{
  color:#004987;
  font-weight:800;
  font-size:1.4rem;
  margin-top: 2.25rem;
}
#bloc8 .sublead{
  color:#4b5563;
  margin:.25rem 0 1rem;
}


#bloc8 .resource-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:1rem;
  margin:1rem 0 2rem;
}
@media (max-width: 1100px){
  #bloc8 .resource-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 820px){
  #bloc8 .resource-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  #bloc8 .resource-grid{ grid-template-columns: 1fr; }
}


#bloc8 .resource-card{
  display:grid;
  grid-template-columns: 48px 1fr auto;
  align-items:center;
  gap:.85rem;

  background:#004987;
  color:#fff;
  text-decoration:none;
  border-radius:14px;
  padding: .95rem 1rem;
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 22px rgba(0,0,0,.10);

  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
#bloc8 .resource-card:hover,
#bloc8 .resource-card:focus-visible{
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.16);
  outline: none;
  background:#0b5fa7;
}


#bloc8 .resource-icon{
  width:48px; height:48px;
  display:grid; place-items:center;
  background: rgba(255,255,255,.12);
  border-radius:12px;
}
#bloc8 .resource-icon svg{
  width:24px; height:24px; color:#fff; display:block;
}


#bloc8 .resource-body{ min-width: 0; }
#bloc8 .resource-title{
  margin:0 0 .1rem; font-size:1.02rem; font-weight:800; color:#fff;
}
#bloc8 .resource-desc {
  margin: 0;
  color: #e6eef7;
  font-size: .92rem;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
}


#bloc8 .resource-meta{
  display:flex; align-items:center; gap:.5rem;
}
#bloc8 .badge{
  background:#e9f2fc; color:#003a6f;
  font-weight:700; font-size:.75rem; padding:.2rem .55rem; border-radius:999px;
}
#bloc8 .chev{
  width:22px; height:22px; color:#fff; opacity:.9;
  transition: transform .18s ease, opacity .18s ease;
}
#bloc8 .resource-card:hover .chev{ transform: translateX(3px); opacity:1; }


#bloc8.sect h1, #bloc8.sect h2{
  border-top:1px solid var(--section-separator, #e6edf2);
  padding-top:1rem;
}
#bloc8.sect > h1:first-child{
  border-top:none; padding-top:0;
}


.btn.btn-secondary {
  background-color: #004987;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.15s ease;
}
.btn.btn-secondary:hover {
  background-color: #0b5fa7;
  transform: translateY(-1px);
}
.btn.btn-secondary:active {
  background-color: #003a6d;
  transform: translateY(0);
}


/* ========== 28) Requadre d’agraïments (index) ========== */
.acknowledgement {
  max-width: 1000px;
  margin: 3rem auto 4rem;
  background: #f7fafc;
  border: 1px solid rgba(0, 73, 135, 0.15);
  border-left: 6px solid #004987;
  border-radius: 10px;
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}
.acknowledgement h2 {
  color: #004987;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.acknowledgement p {
  color: #1f2937;
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
}
@media (max-width: 768px) {
  .acknowledgement {
    margin: 2rem 1rem;
    padding: 1.25rem 1.5rem;
  }
  .acknowledgement h2 {
    font-size: 1.2rem;
  }
}

/* ========== 29) Utilitats i ajustos finals ========== */

.is-hidden {
  display: none !important;
}

.error-card > h3 {
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

.video-wrapper{
  max-width: 100%;
  margin: 1rem 0;
}

.video-embed{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}


#b4-2-3 .btn-video {
  display: inline-block;          
  margin-bottom: 2.5rem !important;
}


#b4-2-3 .steps-card {
  margin-top: 1.5rem !important;
}

.btn-video {
  background-color: #e6f2fb !important;  
  color: #004987 !important;            
  border: none !important;
  padding: 0.65rem 1.25rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-block;
  transition: background-color .2s ease, transform .1s ease;
}
button.btn-video,
.btn-video:link,
.btn-video:visited {
  color: #004987 !important;
}


.btn-video:hover {
  background-color: #d8ebf8 !important;   
  transform: translateY(-1px);
}

.btn-video {
  margin-bottom: 2rem !important;
}

.steps-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.steps-footer .btn-infografia {
  background-color: #e6f2ff;
  border: 2px solid #004987;
  padding: .75rem 1.25rem;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.steps-footer .btn-infografia img {
  width: 28px;
  height: 28px;
}

.basic-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 1rem;
}

.basic-table th {
  background: #004987;
  color: #f3f7fbff;
  text-align: left;
  padding: .75rem;
  font-weight: 700;
}

.basic-table td {
  padding: .75rem;
  vertical-align: top;
}

.basic-table tr:nth-child(even) {
  background: #dbecf3; 
}

.table-wrapper {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.grey-box {
  background: #f5f5f5;       
  padding: 2rem;
  border-radius: 12px;
  margin: 2.5rem 0;
  border: 1px solid #e3e3e3;  
}

.grey-box h4 {
  margin-top: 0;
  font-size: 1.35rem;
  color: #003f72;
  font-weight: 800;
}

.highlight-banner {
  background: #004987;
  color: #fff;
  padding: .75rem 1rem;
  margin: 2rem 0 1rem;
  font-weight: 700;
  border-radius: 6px;
  text-align: left;
}


button.btn.btn-outline.btn-video,
button.btn.btn-outline.btn-video span,
button.btn.btn-outline.btn-video strong {
  color: #004987 !important;
}


.btn-infografia {
  background-color: #e6f2fb !important;  
  color: #004987 !important;             
  border: 2px solid #004987 !important; 
  padding: 0.65rem 1.25rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  transition: background-color .2s ease, transform .1s ease;
}


.btn-infografia .btn-icon {
  width: 24px;
  height: auto;
}


.btn-infografia:hover {
  background-color: #d8ebf8 !important;
  transform: translateY(-1px);
}


/* ===== 30) Menú mòbil bàsic ===== */


.mobile-menu-toggle,
.mobile-menu {
  display: none;
}


@media (max-width: 900px) {
  .topnav {
    display: none;
  }
  .search {
    display: none !important;
  }


  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
    align-items: center;
    gap: .35rem;
    background: #004987;
    color: #fff;
    border: none;
    border-radius: 9999px;
    padding: .45rem .9rem;
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,.18);
  }
  .mobile-menu-toggle:hover {
    background: #0b5fa7;
  }


  .mobile-menu {
    display: flex;                 
    position: fixed;
    inset: var(--header-h) 0 0 0; 
    background: rgba(0,0,0,.45);
    z-index: 2500;
    justify-content: flex-end;
  }
  .mobile-menu[hidden] {
    display: none;
  }

  .mobile-menu__panel {
    background: #fff;
    width: 80%;
    max-width: 320px;
    padding: 1rem 1.25rem 2rem;
    box-shadow: -4px 0 20px rgba(0,0,0,.35);
    overflow-y: auto;
  }

  .mobile-menu__title {
    margin: 0 0 .75rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #004987;
  }

  .mobile-menu__section-label {
    margin: 1rem 0 .25rem;
    font-weight: 700;
    font-size: .95rem;
    color: #004987;
    text-transform: uppercase;
  }

  .mobile-menu ul {
    list-style: none;
    margin: 0 0 .5rem;
    padding: 0;
  }
  .mobile-menu li + li {
    margin-top: .25rem;
  }
  .mobile-menu a {
    display: block;
    padding: .35rem 0;
    color: #1f2937;
    text-decoration: none;
    font-size: .95rem;
  }
  .mobile-menu a:hover {
    color: #004987;
    text-decoration: underline;
  }

  .mobile-menu__close {
    position: absolute;
    top: .6rem;
    right: .8rem;
    background: #004987;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
  }
  .mobile-menu__close:hover {
    background: #0b5fa7;
  }


  body.mobile-menu-open {
    overflow: hidden;
  }
}

.next-section-nav {
  margin-top: 4rem;
  padding: 2rem 1rem;
  text-align: center;
}

.next-btn {
  display: inline-block;
  background: #004987;
  color: white;
  padding: 1rem 1.8rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  transition: 0.3s;
}

.next-btn:hover {
  background: #0b5fa7;
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
}

.next-section-nav {
  margin: 0;              
  padding: 0;
}

.next-section-nav .next-btn {
  display: inline-block;
}
@media (max-width: 640px){
  .pager {
    flex-direction: column;
    gap: 1rem;
  }

  .pager a,
  .pager .next-btn {
    width: 100%;
    text-align: center;
  }
}

.next-section-nav .next-btn {
  background: #004987;
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 999px !important; 
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  line-height: 1.3;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border: 2px solid #003b75;
  max-width: 600px;       
}

.next-section-nav .next-btn:hover {
  background: #003b75;
  border-color: #002f5c;
}



.infocard img.img-petita {
  width: 100%;
  max-width: 550px;
  height: auto;
}
