/* taemsa.com · web de l'empresa.
   Sòbria i corporativa: blanc, blau marí i el blau de marca. L'única signatura de color és la ratlla del logotip
   (blau → lila → taronja), que aquí fa d'índex dels quatre sectors. */
:root {
  --navy: #0f2742;        /* text principal i bandes fosques */
  --blue: #1963ab;        /* blau de marca: botons i enllaços */
  --blue-dark: #134f8a;
  --purple: #4e4f8f;
  --orange: #d78164;
  --text: #2c3440;
  --muted: #5b6573;
  --line: #d9dee5;
  --paper: #f3f5f8;
  --head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --stripe: linear-gradient(90deg, var(--blue) 0 25%, #345a9d 25% 50%, var(--purple) 50% 75%, var(--orange) 75%);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font: 17px/1.65 "Barlow", system-ui, sans-serif; color: var(--text); background: #fff; overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); line-height: 1.12; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
.ic { width: 18px; height: 18px; flex: none; }

/* Botons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 6px;
  font: 600 1rem/1.2 "Barlow", system-ui, sans-serif; text-decoration: none; border: 1.5px solid transparent; text-align: center; transition: background-color .15s, border-color .15s, color .15s; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.outline { border-color: var(--line); color: var(--navy); background: #fff; }
.btn.outline:hover { border-color: var(--navy); }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { background: #e6ecf4; }
.btn.ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.btn.ghost:hover { border-color: #fff; }
.btn.block { width: 100%; }

/* Capçalera */
header.site { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; gap: 32px; height: 76px; }
header.site nav { display: flex; gap: 6px; flex: 1; justify-content: flex-end; align-self: stretch; align-items: center; }
header.site nav a { font-weight: 500; font-size: 1rem; color: var(--text); text-decoration: none; padding: 10px 12px; white-space: nowrap; }
header.site nav a:hover { color: var(--blue); }
.logo { display: inline-flex; align-items: center; min-height: 44px; margin-right: auto; }
.logo img { height: 30px; width: auto; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 1.25rem; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--navy); }

/* Portada: l'amfiteatre de Tarragona difuminat sota el blau marí (més fosc a la banda del text) i els sectors en blocs de color */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background-color: var(--navy); }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { z-index: -2; background: url(/img/tarragona.webp) 62% 55% / cover; }
.hero::after { background: linear-gradient(0deg, rgba(10,28,49,.85) 0, rgba(10,28,49,0) 38%),
    linear-gradient(90deg, rgba(15,39,66,.9) 0%, rgba(15,39,66,.7) 45%, rgba(15,39,66,.3) 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 72px; padding-top: 104px; padding-bottom: 40px; }
.hero-text { max-width: 700px; }
.hero h1 { color: #fff; font-size: clamp(2.5rem, 5.2vw, 4.2rem); line-height: 1.03; letter-spacing: -.012em; }
.hero .lead { font-size: 1.22rem; color: #c9d4e3; max-width: 32em; margin: 26px 0 0; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn.accent { background: var(--orange); color: var(--navy); }
.btn.accent:hover { background: #e3967b; }
/* Resum de TAEMSA: franja a la part de baix del banner, sense caixa, sobre la foto */
.hero-facts { grid-column: 1 / -1; list-style: none; margin: 0; padding: 26px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.28); }
.hero-facts li { display: flex; gap: 14px; align-items: flex-start; padding-right: 20px; }
.hero-facts li + li { padding-left: 22px; border-left: 1px solid rgba(255,255,255,.2); }
.hero-facts .ic { width: 24px; height: 24px; color: #f0a98f; margin-top: 2px; }
.hero-facts b { display: block; font-family: var(--head); font-size: 1.2rem; line-height: 1.2; color: #fff; }
.hero-facts span { color: #d3dceb; font-size: .93rem; line-height: 1.45; }

/* Barra per als clients */
.client-bar { border-bottom: 1px solid var(--line); background: #fff; }
.client-bar .wrap { display: flex; align-items: center; gap: 32px; padding-top: 26px; padding-bottom: 26px; }
.cb-text { flex: 1; }
.cb-text h2 { font-size: 1.35rem; }
.cb-text p { color: var(--muted); }
.cb-tel { display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; font-family: var(--head); font-weight: 700; font-size: 1.9rem; line-height: 1.1; color: var(--navy); text-decoration: none; }
.cb-tel .ic { width: 24px; height: 24px; color: var(--blue); grid-row: 1 / 3; }
.cb-dl { display: grid; justify-items: center; gap: 6px; }
.mac-link { margin: 10px 0 0 !important; font-size: .9rem; color: var(--muted); text-align: center; }
.cb-dl .mac-link { margin: 0 !important; }
.mac-link a { color: var(--blue); font-weight: 600; }
.utility .u-help .ic { width: 22px; height: 22px; }   /* més gran que les altres: és el ninotet de l'ajuda online */
.cb-tel small { font-family: "Barlow", sans-serif; font-weight: 400; font-size: .85rem; color: var(--muted); }

/* Capçalera de cada secció */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 12px 48px; flex-wrap: wrap; margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); }
.sec-head p { color: var(--muted); max-width: 30em; }
/* Colors de cada sector (els de la ratlla del logotip) */
.r-farm { --c: var(--blue); } .r-pime { --c: #345a9d; } .r-edu { --c: var(--purple); } .r-com { --c: var(--orange); }

/* Sectors (portada): una targeta per sector amb la seva foto i el seu color; tots quatre amb el mateix pes */
.sec-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sec-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  color: var(--text); text-decoration: none; transition: box-shadow .2s, transform .2s, border-color .2s; }
.sc-img { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 5px solid var(--c); background: var(--navy); }
.sc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.sc-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,28,49,.82) 0%, rgba(10,28,49,.15) 55%, rgba(10,28,49,0) 100%); }
.sc-img h3 { position: absolute; left: 20px; bottom: 14px; z-index: 1; color: #fff; font-size: 1.65rem; }
.sc-body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 18px 20px 20px; }
/* Les solucions de cada sector: accés directe a la seva pàgina o al seu requadre de la pàgina del sector */
.sc-links { list-style: none; margin: 0; padding: 0; flex: 1; }
.sc-links li + li { border-top: 1px solid var(--line); }
.sc-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; color: var(--text); text-decoration: none; font-weight: 500; }
.sc-links a::after { content: "›"; color: var(--c); font-size: 1.3rem; line-height: 1; transition: transform .15s; }
.sc-links a:hover { color: var(--blue); }
.sc-links a:hover::after { transform: translateX(3px); }
.sc-more { font-weight: 600; color: var(--blue); text-decoration: none; display: inline-block; padding: 10px 0 0; }
.sc-more::after { content: " →"; }
.sc-more:hover { text-decoration: underline; }
.sec-card:hover { border-color: var(--c); box-shadow: 0 12px 28px rgba(15,39,66,.12); }
.sec-card:hover .sc-img img { transform: scale(1.05); }
/* En arribar des de la portada a una solució concreta, el seu requadre es remarca */
.card:target { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25,99,171,.25), 0 10px 26px rgba(15,39,66,.12); }

/* Seccions */
section { padding: 68px 0; }
.client-bar + section { padding-top: 48px; }   /* la barra «Necessites ajuda?» ja separa: menys aire a sobre de Sectors */
section.paper { background: var(--paper); }

/* Serveis: graella de dues columnes amb icona */
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.svc-grid li { display: flex; gap: 18px; align-items: flex-start; padding: 24px 0; border-top: 1px solid var(--line); }
.svc-grid li:nth-child(-n+2) { border-top-color: var(--navy); }
.svc-ic { flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--blue); border: 1px solid var(--line); }
.svc-ic svg { width: 24px; height: 24px; }
.svc-grid h3 { font-size: 1.3rem; margin-bottom: 4px; }
.svc-grid p { color: var(--muted); }

/* Qui som: banda fosca amb «Com treballem» */
section.dark { background: var(--navy); color: #d3dceb; }
section.dark h2, section.dark h3 { color: #fff; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.about-text h2 { font-size: clamp(2rem, 3.4vw, 2.6rem); margin-bottom: 20px; }
.about-text p + p { margin-top: 16px; }
.about-lead { font-size: 1.3rem; line-height: 1.5; color: #fff; }
section.dark .how h3 { font-size: 1.15rem; color: #f0a98f; margin-bottom: 8px; font-family: "Barlow", sans-serif; font-weight: 600; }
.how ol { list-style: none; margin: 0; padding: 0; counter-reset: pas; }
.how li { counter-increment: pas; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); }
.how li::before { content: counter(pas); grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--head); font-weight: 700; color: var(--navy); background: #f0a98f; }
.how b { font-family: var(--head); font-size: 1.25rem; color: #fff; }
.how span { color: #c4cfdd; font-size: .97rem; }

/* Programari: fitxes amb la línia de color de la marca */
.brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.brand { border: 1px solid var(--line); border-top: 4px solid var(--c, var(--blue)); border-radius: 6px; padding: 18px 20px; background: #fff; }
.brand:nth-child(4n+2) { --c: #345a9d; } .brand:nth-child(4n+3) { --c: var(--purple); } .brand:nth-child(4n+4) { --c: var(--orange); }
.brand b { display: block; font-family: var(--head); font-size: 1.4rem; color: var(--navy); }
.brand span { color: var(--muted); font-size: .95rem; }

/* Contacte: la foto de Tarragona de fons, com el banner */
.contact-band { color: #fff; background-color: var(--navy);
  background-image: linear-gradient(rgba(15,39,66,.9), rgba(15,39,66,.82)), url(/img/tarragona.webp); background-size: cover; background-position: center 60%; }
.contact-band .sec-head h2 { color: #fff; }
.contact-band .sec-head p { color: #d3dceb; }
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.contact > div { background: #fff; color: var(--text); border-radius: 8px; padding: 22px 24px; }
.contact h3 { font-size: 1rem; color: var(--muted); font-family: "Barlow", sans-serif; font-weight: 500; margin-bottom: 4px; }
.contact .big { font-family: var(--head); font-weight: 700; font-size: 1.45rem; color: var(--navy); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.contact .big:hover { color: var(--blue); }
.contact p { color: var(--muted); }
.contact .addr-big { color: var(--navy); font-weight: 600; margin: 8px 0 4px; }
.contact .more { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; }

/* Peu */
footer { background: #0a1c31; color: #aab6c6; padding: 0 0 28px; font-size: .95rem; }
footer::before { content: ""; display: block; height: 6px; background: var(--stripe); }
footer .cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; padding-top: 56px; }
footer .foot-h { font-family: var(--head); font-weight: 700; line-height: 1.12; color: #fff; font-size: 1.05rem; margin: 0 0 8px; }
footer a { color: #aab6c6; text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
footer a:hover { color: #fff; }
footer .addr { margin-top: 12px; line-height: 1.55; }
footer .legal { border-top: 1px solid #1d3550; margin-top: 44px; padding-top: 14px; font-size: .85rem; color: #8494a8; display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; }
footer .legal a { color: #8494a8; }
.footer-logo { height: 28px; width: auto; filter: brightness(0) invert(1); margin-bottom: 8px; }

/* Pàgines legals */
.page { padding: 64px 0 88px; }
.page .wrap { max-width: 800px; }
.page h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); margin-bottom: 8px; }
.page .updated { color: var(--muted); margin: 0 0 32px; }
.page h2 { font-size: 1.4rem; margin: 36px 0 10px; }
.page p + p { margin-top: 12px; }
.page dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; border-top: 1px solid var(--line); padding-top: 14px; }
.page dt { font-weight: 600; color: var(--navy); }
.page dd { margin: 0; }

/* Barra superior (com la del portal): telèfon, correu, pestanya del portal de farmàcies i idiomes */
.utility { position: relative; z-index: 11; background: #e9f0f8; border-bottom: 1px solid #d8e3f0; font-size: .9rem; }
.utility .wrap { display: flex; align-items: center; gap: 22px; height: 40px; }
.utility a { color: var(--navy); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.utility a:hover { color: var(--blue); }
.utility .ic { width: 16px; height: 16px; }
.u-tel .ic, .u-mail .ic, .u-help .ic { color: var(--blue); }
.u-help { font-weight: 600; }
.utility .spacer { flex: 1; }
.langs { display: inline-flex; align-items: center; gap: 2px; }
.langs a, .langs .on { min-width: 34px; min-height: 34px; justify-content: center; display: inline-flex; align-items: center; color: var(--muted); }
.langs .on { color: var(--blue); font-weight: 700; }
/* Accés al portal de farmàcies: un enllaç més de la barra (és un altre lloc, amb codi), separat dels idiomes */
.u-portal { padding-right: 18px; border-right: 1px solid #c9d7e8; }
.u-portal .ic { color: var(--muted); }
.u-portal .u-out { width: 12px; height: 12px; }

/* Fitxes de programari que enllacen al seu sector */
a.brand { text-decoration: none; color: inherit; }
a.brand:hover { border-color: var(--blue); border-top-color: var(--c, var(--blue)); }

/* Pàgines de sector i producte: capçalera fosca (amb la foto d'una farmàcia a les de farmàcia) */
.page-hero { color: #fff; background-color: var(--navy);
  background-image: radial-gradient(ellipse at 85% 0%, rgba(78,79,143,.55), transparent 60%), radial-gradient(ellipse at 100% 100%, rgba(215,129,100,.25), transparent 55%); }
/* Cada sector, el seu color (el mateix de la seva ratlla a la portada) i la seva foto, com la portada:
   difuminada sota el blau marí, més fosc a la banda del text */
.page-hero { border-bottom: 6px solid var(--c, var(--blue)); }
.page-hero[data-foto] { background-image: linear-gradient(90deg, rgba(15,39,66,.93) 0%, rgba(15,39,66,.8) 45%, rgba(15,39,66,.45) 100%), var(--foto);
  background-size: cover; background-position: center 45%; }
.page-hero[data-foto="farmacies"] { --foto: url(/img/sectors/farmacies.webp); }
.page-hero[data-foto="pimes"] { --foto: url(/img/sectors/pimes.webp); background-position: center 40%; }
.page-hero[data-foto="educacio"] { --foto: url(/img/sectors/educacio.webp); }
.page-hero[data-foto="comercos"] { --foto: url(/img/sectors/comercos.webp); background-position: center 60%; }
.page-hero[data-foto="calaixos"] { --foto: url(/img/sectors/calaixos.webp); background-position: center 40%; }
.page-hero.s-farm { --c: var(--blue); } .page-hero.s-pime { --c: #345a9d; } .page-hero.s-edu { --c: var(--purple); } .page-hero.s-com { --c: var(--orange); }
.page-hero .wrap { padding-top: 40px; padding-bottom: 72px; }
.page-hero h1 { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.05; max-width: 16em; margin-top: 40px; }
.page-hero .lead { font-size: 1.18rem; color: #d3dceb; max-width: 36em; margin: 20px 0 32px; }
.page-hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .92rem; color: #aab6c6; }
.crumbs a { color: #d3dceb; text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { display: inline-flex; min-height: 32px; align-items: center; }

.intro-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 18px; }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--navy); }
.checks { list-style: none; margin: 0; padding: 8px 26px; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 6px; background: #fff; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; }
.checks li + li { border-top: 1px solid var(--line); }
.checks .ic { width: 22px; height: 22px; color: var(--blue); margin-top: 2px; }
.checks b { display: block; color: var(--navy); font-family: var(--head); font-size: 1.15rem; line-height: 1.25; }
.checks span { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; color: var(--text); text-decoration: none; }
.card h3 { font-size: 1.4rem; }
.card p { color: var(--muted); flex: 1; }
a.card { border-top: 4px solid var(--blue); }
a.card:hover { border-color: var(--blue); box-shadow: 0 8px 24px rgba(15,39,66,.08); }
.card .more { font-weight: 600; color: var(--blue); }
.card .more::after { content: " →"; }

.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.note-box { background: var(--paper); border-radius: 8px; padding: 26px; }
.note-box h3 { font-size: 1.35rem; margin-bottom: 8px; }
.note-box p { color: var(--muted); margin-bottom: 18px; }

.products { display: grid; gap: 20px; }
.product { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 36px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px 32px 24px 24px; }
.product img { width: 100%; height: auto; }
.product h3 { font-size: 1.8rem; }
.product .maker { color: var(--muted); margin-bottom: 12px; }
.product p + p { margin-top: 10px; }

.modules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.modules li { padding: 22px 0; border-top: 1px solid var(--line); }
.modules li:nth-child(-n+4) { border-top-color: var(--navy); }
.mod-ic { display: block; width: 48px; height: 48px; margin-bottom: 12px; }
.brand-logo { width: 260px; height: auto; margin-bottom: 26px; }
.modules h3 { font-size: 1.25rem; margin-bottom: 4px; }
.modules p { color: var(--muted); }

.wrap.narrow { max-width: 860px; }
.faq-title { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 20px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; padding: 12px 0;
  font-family: var(--head); font-weight: 700; font-size: 1.2rem; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: var(--blue); font-size: 1.3rem; }
section.paper .faq summary::after { background: #fff; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding: 0 48px 18px 0; }

.cta-band { background: var(--navy); color: #d3dceb; padding: 56px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 6px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 404 */
.notfound .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.notfound { text-align: left; padding: 120px 0; }
.notfound h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); margin-bottom: 14px; }
.notfound .eyebrow { color: var(--muted); margin-bottom: 10px; }
.notfound p { color: var(--muted); margin-bottom: 28px; }

@media (max-width: 1100px) {
  header.site nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 32px 16px; }
  header.site nav.open { display: flex; }
  header.site nav a { padding: 12px 0; min-height: 44px; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .hero-facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .client-bar .wrap { flex-wrap: wrap; gap: 18px 32px; }
  .cb-text { flex-basis: 100%; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: 1fr 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .intro-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .sec-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modules li:nth-child(3), .modules li:nth-child(4) { border-top-color: var(--line); }
  .product { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  header.site nav { padding: 8px 16px 16px; }
  header.site .wrap { height: 64px; gap: 12px; }
  .logo img { height: 24px; }
  .hero { background-image: linear-gradient(rgba(15,39,66,.82), rgba(15,39,66,.7)), url(/img/tarragona.webp); }
  .hero .wrap { padding-top: 52px; padding-bottom: 52px; }
  .hero-facts { grid-template-columns: 1fr; padding-top: 6px; }
  .hero-facts li, .hero-facts li + li { padding: 14px 0; border-left: 0; }
  .hero-facts li + li { border-top: 1px solid rgba(255,255,255,.16); }
  .client-bar .btn, .cb-dl { width: 100%; }
  .hero .lead { font-size: 1.1rem; margin: 20px 0 28px; }
  .hero .ctas .btn { width: 100%; }
  section { padding: 48px 0; }
  .client-bar + section { padding-top: 36px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-grid li:nth-child(2) { border-top-color: var(--line); }
  .contact, .brands { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr; gap: 24px; }
  .page dl { grid-template-columns: 1fr; gap: 2px; }
  .page dd { margin-bottom: 10px; }
  .utility .wrap { height: 44px; gap: 10px; }
  .u-mail, .u-help, .u-out { display: none !important; }   /* l'ajuda remota és per a l'ordinador (al mòbil no serveix) */
  .utility .wrap { gap: 8px; }
  .u-portal { padding-right: 0; border-right: 0; }
  .u-tel, .u-portal { min-height: 44px; }
  .langs a, .langs .on { min-width: 36px; min-height: 44px; }
  .page-hero .wrap { padding-top: 20px; padding-bottom: 52px; }
  .page-hero[data-foto] { background-image: linear-gradient(rgba(15,39,66,.86), rgba(15,39,66,.78)), var(--foto); }
  .page-hero h1 { margin-top: 24px; }
  .page-hero .lead { font-size: 1.08rem; }
  .page-hero .ctas .btn, .cta-actions, .cta-actions .btn { width: 100%; }
  .cards, .modules, .sec-cards { grid-template-columns: 1fr; }
  .sc-img { aspect-ratio: 16 / 8; }
  .modules li:nth-child(2) { border-top-color: var(--line); }
  .checks { padding: 4px 18px; }
  .product { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .faq summary { font-size: 1.1rem; }
  .faq details p { padding-right: 0; }
  .cta-band { padding: 44px 0; }
}
@media (max-width: 359px) {   /* mòbils molt estrets: la barra superior ha de cabre */
  .utility { font-size: .82rem; }
  .u-portal .ic { display: none; }
  .langs a, .langs .on { min-width: 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Subpàgines dels sectors: passos numerats i enllaços a les altres solucions del sector */
.steps { list-style: none; counter-reset: pas; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }
.steps li { counter-increment: pas; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; color: var(--muted); }
.steps li::before { content: counter(pas); display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 12px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; }
.steps b { display: block; color: var(--navy); font-family: var(--head); font-size: 1.2rem; margin-bottom: 4px; }
section.related-sec { padding: 44px 0; border-top: 1px solid var(--line); }
.related-sec h2 { font-size: 1.5rem; margin-bottom: 16px; }
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a { padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 600; text-decoration: none; }
.related a:hover, .related a:focus-visible { border-color: var(--blue); color: var(--blue); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } section.related-sec { padding: 32px 0; } }

/* Logotips de marques: programari, partners i franja de les subpàgines */
.brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; text-decoration: none; }
.brand .marca { height: 44px; width: auto; max-width: 190px; object-fit: contain; }
.partners { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.partners li { flex: 0 1 200px; display: grid; place-items: center; height: 116px; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: 8px; transition: transform .15s, box-shadow .15s; }
.partners li:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 39, 66, .08); }
.partners .marca { max-width: 100%; object-fit: contain; }
.brand-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.brand-strip span { font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.brand-strip .marca { max-width: 100%; object-fit: contain; }

/* Qui som: mapa de l'oficina */
.place { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 44px; align-items: center; margin-top: 60px; }
.place-map { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .35); }
.place-map img { display: block; width: 100%; height: auto; transition: transform .3s; }
.place-map:hover img { transform: scale(1.02); }
.place-info h3 { font-size: 1.6rem; }
.place-addr { margin: 10px 0 8px; font-family: var(--head); font-size: 1.5rem; line-height: 1.3; color: #fff; }
.place-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
@media (max-width: 860px) { .place { grid-template-columns: 1fr; gap: 24px; margin-top: 44px; } }
@media (max-width: 560px) { .partners { gap: 10px; } .partners li { flex-basis: calc(50% - 5px); height: 96px; padding: 12px; } .brand-strip { gap: 14px 24px; } }
/* Pàgina Qui som */
.page-hero[data-foto="tarragona"] { --foto: url(/img/tarragona.webp); background-position: center 60%; }
.prose .prose-gap { margin-top: 40px; }
.about-more { margin-top: 28px; }

/* Menú de dalt: desplegable «Sectors» amb els 4 sectors i les subseccions */
.nav-drop { align-self: stretch; display: flex; align-items: center; }
.drop-btn { display: inline-flex; align-items: center; gap: 4px; padding: 10px 12px; border: 0; background: none; font: inherit; font-weight: 500; font-size: 1rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.drop-btn:hover, .nav-drop.open .drop-btn { color: var(--blue); }
.chev { width: 16px; height: 16px; transition: transform .2s; }
.nav-drop.open .chev { transform: rotate(180deg); }
.mega { display: none; position: absolute; top: 100%; left: 0; right: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 32px;
  padding: 28px max(32px, calc((100% - 1076px) / 2)) 22px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 18px 36px rgba(15, 39, 66, .12); }
.nav-drop.open .mega { display: grid; }
.mega-col.s-farm { --c: var(--blue); } .mega-col.s-pime { --c: #345a9d; } .mega-col.s-edu { --c: var(--purple); } .mega-col.s-com { --c: var(--orange); }
header.site nav .mega-h { display: block; padding: 0 0 8px; margin-bottom: 6px; border-bottom: 3px solid var(--c); font-family: var(--head); font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.mega ul { list-style: none; margin: 0; padding: 0; }
header.site nav .mega li a { display: block; padding: 6px 0; font-size: .95rem; white-space: normal; }
header.site nav .mega-all { grid-column: 1 / -1; justify-self: end; padding: 8px 0 0; font-weight: 600; color: var(--blue); }
header.site nav .mega-all::after { content: " →"; }
@media (min-width: 1101px) and (hover: hover) { .nav-drop:hover .mega { display: grid; } .nav-drop:hover .chev { transform: rotate(180deg); } }
@media (max-width: 1100px) {
  header.site nav { max-height: calc(100vh - 76px); overflow-y: auto; align-items: stretch; }
  .nav-drop { display: block; }
  .drop-btn { width: 100%; justify-content: space-between; min-height: 44px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .mega { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: 14px 0 6px; border: 0; box-shadow: none; }
  header.site nav .mega a { min-height: 0; border-bottom: 0; }
  header.site nav .mega-h { padding-bottom: 6px; }
  header.site nav .mega-all { justify-self: start; }
}
@media (max-width: 640px) { header.site nav { max-height: calc(100vh - 64px); } .mega { grid-template-columns: 1fr; } }

/* Animació del desplegable: el panell baixa i les columnes entren una darrere l'altra */
@keyframes mega-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes mega-col-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nav-drop.open .mega { animation: mega-in .22s ease-out both; }
.nav-drop.open .mega-col, .nav-drop.open .mega-all { animation: mega-col-in .32s ease-out both; }
.nav-drop.open .mega-col:nth-child(2) { animation-delay: .04s; }
.nav-drop.open .mega-col:nth-child(3) { animation-delay: .08s; }
.nav-drop.open .mega-col:nth-child(4) { animation-delay: .12s; }
.nav-drop.open .mega-all { animation-delay: .16s; }
header.site nav .mega li a { transition: color .15s, transform .15s; }
header.site nav .mega li a:hover { transform: translateX(3px); }
@media (min-width: 1101px) and (hover: hover) {
  .nav-drop:hover .mega { animation: mega-in .22s ease-out both; }
  .nav-drop:hover .mega-col, .nav-drop:hover .mega-all { animation: mega-col-in .32s ease-out both; }
  .nav-drop:hover .mega-col:nth-child(2) { animation-delay: .04s; }
  .nav-drop:hover .mega-col:nth-child(3) { animation-delay: .08s; }
  .nav-drop:hover .mega-col:nth-child(4) { animation-delay: .12s; }
  .nav-drop:hover .mega-all { animation-delay: .16s; }
}
@media (prefers-reduced-motion: reduce) { .mega, .mega-col, .mega-all { animation: none !important; } }

/* Icona a les targetes (tipus d'equip) */
.card-ic { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 12px; background: #e8f0f9; color: var(--blue); }
.card-ic svg { width: 32px; height: 32px; }

/* Franja destacada de partner (HP a les pàgines d'equips) */
.partner-band { display: flex; align-items: center; gap: 40px; padding: 32px 40px; background: #fff; border: 1px solid var(--line); border-left: 6px solid #0096d6; border-radius: 10px; box-shadow: 0 10px 28px rgba(15, 39, 66, .07); }
.partner-band .marca { flex: none; width: 120px; height: auto; }
.partner-band h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 8px; }
.partner-band p { color: var(--muted); max-width: 46em; }
.partner-band .pb-eyebrow { margin-bottom: 4px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0096d6; }
@media (max-width: 640px) { .partner-band { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px 20px; } .partner-band .marca { width: 84px; } }
@media (min-width: 1021px) { .cards:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 5 targetes: 3 + 2 centrades, sense cap targeta òrfena */
@media (min-width: 1021px) { .cards:has(> :nth-child(5):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); } .cards:has(> :nth-child(5):last-child) > * { grid-column: span 2; } .cards:has(> :nth-child(5):last-child) > :nth-child(4) { grid-column: 2 / span 2; } }

/* Impressió: marques (Brother, Konica Minolta, Epson) i «Quina impressora comprar?» */
.print-brands .pb-eyebrow { margin-bottom: 4px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.print-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.print-cards li { display: grid; grid-template-rows: 84px auto; justify-items: center; align-items: center; gap: 14px; padding: 32px 26px 26px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; transition: transform .15s, box-shadow .15s; }
.print-cards li:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 39, 66, .09); }
.print-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; }
.print-cards .marca { flex: none; max-width: 100%; object-fit: contain; }
.print-cards p { align-self: start; color: var(--muted); }
.which-printer { max-width: 760px; margin: 0 auto; padding: 36px 40px; text-align: center; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: 10px; }
.which-printer h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 10px; }
.which-printer .wp-lead { font-family: var(--head); font-weight: 700; font-size: 1.3rem; color: var(--navy); margin-bottom: 12px; }
.which-printer p { color: var(--muted); }
.which-printer strong { color: var(--navy); }
@media (max-width: 860px) { .print-cards, .print-cards.two { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .which-printer { padding: 26px 20px; } }

/* ERP: una franja per programa, sense requadres; logotip i text alternen costat */
.erp-list { display: grid; }
.erp { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: center; padding: 44px 0; border-top: 1px solid var(--line); }
.erp:first-child { border-top: 0; padding-top: 8px; }
.erp:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.erp:nth-child(even) .erp-logo { order: 2; }
.erp-logo { --c: var(--blue); position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 18px;
  background: radial-gradient(120% 120% at 0% 0%, #fff 0%, #fff 45%, color-mix(in srgb, var(--c) 14%, #fff) 100%);
  box-shadow: 0 18px 40px rgba(15, 39, 66, .10), inset 0 0 0 1px var(--line); }
.erp:nth-child(2) .erp-logo { --c: var(--purple); } .erp:nth-child(3) .erp-logo { --c: var(--orange); }
.erp-logo::after { content: ""; position: absolute; left: 28px; right: 28px; bottom: -6px; height: 6px; border-radius: 0 0 6px 6px; background: var(--c); }
.erp-logo .marca { display: block; max-width: none; object-fit: contain; }
.erp-tag { display: inline-block; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: #e8f0f9; }
.erp h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); margin-bottom: 12px; }
.erp p + p { margin-top: 10px; }
.erp > div > p:not(.erp-tag) { color: var(--muted); }
.erp-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; color: var(--blue); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.erp-more::after { content: "→"; }
@media (min-width: 1021px) { .brands:has(> :nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 760px) { .erp, .erp:nth-child(even) { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; } .erp:nth-child(even) .erp-logo { order: 0; } .erp-logo { aspect-ratio: 2 / 1; } }

/* Pàgina de contacte: formulari i dades */
.contact-page { padding: 64px 0 80px; background: var(--paper); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; padding: 34px 36px 36px; }
.form-card h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 6px; }
.form-lead { color: var(--muted); margin: 0 0 22px; }
.req { color: #b4452a; }
.cform { display: grid; gap: 18px; }
.cform[hidden] { display: none; }
.cform fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cform legend, .field > span { display: block; font-weight: 600; color: var(--navy); margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { width: 100%; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips label > span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 500; transition: border-color .15s, background .15s, color .15s; }
.chips .ic { width: 20px; height: 20px; color: var(--blue); flex: none; }
.chips label:hover > span { border-color: var(--blue); }
.chips input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chips input:checked + span .ic { color: #fff; }
.chips input:focus-visible + span { outline: 3px solid rgba(25, 99, 171, .35); outline-offset: 2px; }
.field { display: block; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; color: var(--text); background: #fff; border: 1px solid #c3cad4; border-radius: 6px; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(25, 99, 171, .18); }
.cform.tried :invalid { border-color: #b4452a; }
.cform.tried .chips:invalid label > span, .cform.tried .chips.missing label > span { border-color: #b4452a; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; color: var(--text); font-size: .95rem; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--blue); }
.form-legal { margin: -6px 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.form-legal b { color: var(--navy); font-weight: 600; }
.cform .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.cform .btn[disabled] { opacity: .65; cursor: wait; }
.form-msg { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 8px; margin-bottom: 20px; }
.form-msg[hidden] { display: none; }
.form-msg b { display: block; color: var(--navy); }
.form-msg span { display: block; color: var(--text); }
.form-msg span[hidden] { display: none; }
.form-msg.ok { background: #e7f4ec; border: 1px solid #a9d6b9; }
.form-msg.ok .ic { flex: none; width: 26px; height: 26px; color: #23774a; }
.form-msg.err { display: block; background: #fbeceb; border: 1px solid #ebb9b2; }
.form-msg.err[hidden] { display: none; }
.contact-aside { display: grid; gap: 16px; }
.ca-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; }
.ca-card p { margin: 0; color: var(--muted); }
.ca-label { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue) !important; margin-bottom: 6px !important; }
.ca-label .ic { width: 18px; height: 18px; }
.ca-big { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--head); font-weight: 700; font-size: 1.5rem; color: var(--navy); text-decoration: none; }
.ca-big:hover { color: var(--blue); }
.ca-addr { color: var(--navy) !important; font-weight: 600; margin-bottom: 12px !important; }
.ca-map { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 10px; }
.ca-map img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.ca-map:hover img { transform: scale(1.03); }
.ca-client { background: var(--navy); border-color: var(--navy); }
.ca-client p { color: #d3dceb; }
.ca-client .ca-label { color: #9cc3ec !important; }
.ca-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px !important; }
.ca-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #fff; font-weight: 600; }
.ca-links .ic { width: 18px; height: 18px; }
.contact-more { margin: 24px 0 0; text-align: center; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .contact-page { padding: 40px 0 56px; }
  .form-card { padding: 24px 18px 26px; }
  .field-row { grid-template-columns: 1fr; }
  .cform .btn { justify-self: stretch; }
}
.ca-card .more { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; }

/* Pàgina «Serveis»: grups de targetes amb icona i enllaços per sector */
.svc-nav { position: sticky; top: 76px; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
.svc-nav .wrap { display: flex; gap: 6px 26px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.svc-nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--navy); font-weight: 600; text-decoration: none; }
.svc-nav a:hover { color: var(--blue); }
.svc-nav .ic { color: var(--blue); }
.svc-group { padding: 64px 0; }
.svc-group:nth-of-type(even) { background: var(--paper); }
.svc-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.svc-card { flex: 0 1 calc((100% - 32px) / 3); min-width: 0; display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.svc-card h3 { font-size: 1.4rem; }
.svc-card > p { color: var(--muted); margin: 0; }
.svc-card > p:nth-of-type(1) { flex: 1; }
.svc-card .svc-for { flex: none; margin-top: 6px; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.svc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--blue); font-weight: 600; font-size: .95rem; text-decoration: none; transition: border-color .15s, background .15s; }
.svc-links a:hover { border-color: var(--blue); background: #eef4fb; }
.svc-links .ic { width: 16px; height: 16px; }
.svc-links a.svc-more { padding: 0; border: 0; min-height: 44px; }
.svc-links a.svc-more:hover { background: none; }
.svc-links a.svc-more::after { content: " →"; }
.sec-more { margin: 28px 0 0; text-align: center; }

/* Pàgina «Programari»: una targeta per programa amb el logotip */
.prog-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.prog-card { grid-column: span 2; display: flex; flex-direction: column; gap: 8px; padding: 28px 26px 24px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.prog-card:nth-child(4) { grid-column: 2 / span 2; }
.prog-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15, 39, 66, .09); }
.prog-logo { display: flex; align-items: center; justify-content: center; height: 96px; margin-bottom: 8px; }
.prog-logo .marca { max-width: 100%; object-fit: contain; }
.prog-tag { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.prog-card h3 { font-size: 1.4rem; }
.prog-card p { color: var(--muted); flex: 1; margin: 0; }
.prog-card .more { font-weight: 600; color: var(--blue); }
.prog-card .more::after { content: " →"; }
@media (max-width: 1020px) {
  .svc-card { flex-basis: calc((100% - 16px) / 2); }
  .prog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prog-card, .prog-card:nth-child(4) { grid-column: auto; }
}
@media (max-width: 640px) {
  .prog-cards { grid-template-columns: 1fr; }
  .svc-card { flex-basis: 100%; }
  .svc-group { padding: 44px 0; }
  .svc-nav { position: static; }
}

/* Desplegable «Programari»: una fitxa per programa amb el logotip */
.mega-prog .mega-col { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
header.site nav .mega li a.mega-prog-item { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 16px 12px 14px; text-align: center; border: 1px solid var(--line); border-radius: 8px; transition: border-color .15s, box-shadow .15s, transform .15s; }
header.site nav .mega li a.mega-prog-item:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(15, 39, 66, .08); transform: translateY(-2px); }
.mp-logo { display: flex; align-items: center; justify-content: center; height: 48px; margin-bottom: 6px; }
.mp-logo .marca { max-width: 100%; object-fit: contain; }
.mega-prog-item b { font-family: var(--head); font-size: 1.05rem; color: var(--navy); }
.mega-prog-item .mp-who { font-size: .85rem; color: var(--muted); }
@media (max-width: 1100px) {
  .mega-prog .mega-col { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  header.site nav .mega li a.mega-prog-item { padding: 12px 8px; }
  .mp-logo { height: 36px; }
}

/* Desplegable «Serveis»: tres grups, cada servei amb la seva icona */
.mega-svc-drop { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega-svc-drop .mega-col { --c: var(--blue); }
.mega-svc-drop .mega-col:nth-child(2) { --c: var(--purple); }
.mega-svc-drop .mega-col:nth-child(3) { --c: var(--orange); }
header.site nav .mega .mega-svc a { display: flex; align-items: center; gap: 10px; }
.mega-svc .ic { width: 20px; height: 20px; color: var(--blue); }
@media (max-width: 1100px) { .mega-svc-drop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mega-svc-drop { grid-template-columns: 1fr; } }
.svc-card { scroll-margin-top: 150px; }
@media (max-width: 640px) { .svc-nav { top: 64px; } }

/* Prova de disseny: una sola entrada a la portada. La foto s'apropa lentament fins al seu lloc,
   el títol i el text pugen i els quatre punts del resum hi arriben un darrere l'altre. */
.hero::before { animation: hero-photo 2.2s cubic-bezier(.2, .6, .2, 1) both; }
.hero-text > * { animation: hero-rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > :nth-child(2) { animation-delay: .12s; }
.hero-facts li { animation: hero-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-facts li:nth-child(1) { animation-delay: .35s; }
.hero-facts li:nth-child(2) { animation-delay: .45s; }
.hero-facts li:nth-child(3) { animation-delay: .55s; }
.hero-facts li:nth-child(4) { animation-delay: .65s; }
@keyframes hero-photo { from { transform: scale(1.08); } to { transform: none; } }
@keyframes hero-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) { .hero::before, .hero-text > *, .hero-facts li { animation: none !important; } }
