/* =========================================================
   Univets · estils
   Colors del logo: blau marí + taronja
   ========================================================= */

:root {
  --navy: #0a3380;
  --navy-900: #071d4d;
  --navy-100: #e6edf9;
  /* Taronja una mica més suau que el del logo (#ff7a00) perquè cridi menys */
  --orange: #fb8c2f;
  --orange-hover: #fd9a4a;
  --orange-600: #d9731e;   /* text gran / destacats */
  --orange-700: #a8520d;   /* text petit (millor contrast) */
  --orange-100: #fff1e3;
  --orange-glow: rgba(251, 140, 47, .24);
  --cream: #fbf7f1;
  --white: #ffffff;
  --ink: #1b2540;
  --muted: #5b6785;
  --line: #e8e2d8;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(10, 51, 128, .10);
  --shadow-lg: 0 24px 60px rgba(10, 51, 128, .18);

  --header-h: 64px;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }

.ico { width: 1.25em; height: 1.25em; flex: none; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tipografia ---------- */
h1, h2, h3 { font-family: var(--font-head); color: var(--navy-900); line-height: 1.15; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.3rem; }
em { font-style: italic; color: var(--orange-600); font-weight: 500; }

.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange-700);
  background: var(--orange-100);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- Botons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--navy { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(10, 51, 128, .28); }
.btn--navy:hover { background: var(--navy-900); }
.btn--orange { background: var(--orange); color: var(--navy-900); box-shadow: 0 8px 20px var(--orange-glow); }
.btn--orange:hover { background: var(--orange-hover); }
.btn--ghost { background: transparent; color: var(--navy); border-color: rgba(10, 51, 128, .25); }
.btn--ghost:hover { border-color: var(--navy); background: #fff; }

/* ---------- Capçalera ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease;
}
.header.is-scrolled {
  background: rgba(251, 247, 241, .92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(10, 51, 128, .06);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__logo { height: 36px; width: auto; }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; color: var(--navy-900); letter-spacing: -.01em; }
.brand--light .brand__name { color: #fff; }

.nav { display: flex; align-items: center; gap: 20px; }
.nav__list { display: flex; gap: 2px; }
.nav__link {
  position: relative; display: block; padding: 7px 13px; border-radius: 999px;
  text-decoration: none; font-weight: 500; font-size: .94rem; color: var(--ink);
  transition: background .2s ease, color .2s ease;
}
.nav__link:hover { background: rgba(10, 51, 128, .07); }
.nav__link.is-active { background: var(--navy); color: #fff; }
.nav__cta { padding: 9px 18px; font-size: .92rem; gap: 8px; }
.nav__cta .ico { width: 1.15em; height: 1.15em; }

.burger { display: none; width: 40px; height: 40px; border: 0; border-radius: 12px; background: #fff; box-shadow: var(--shadow); cursor: pointer; padding: 0; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2.5px; border-radius: 2px; background: var(--navy); transition: transform .3s ease, opacity .2s ease, top .3s ease; }
.burger span:nth-child(1) { top: 12px; }
.burger span:nth-child(2) { top: 19px; }
.burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: calc(var(--header-h) + 56px) 0 80px; overflow: hidden; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: 0; pointer-events: none; }
.hero__blob--a { width: 460px; height: 460px; background: #ffd6a8; top: -120px; right: -100px; }
.hero__blob--b { width: 380px; height: 380px; background: #c9d9f5; bottom: 30%; left: -140px; }

.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; padding: 8px 16px; border-radius: 999px; font-size: .92rem; font-weight: 500; color: var(--navy); box-shadow: var(--shadow); }
.badge .ico { color: var(--orange); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }

.hero__visual { position: relative; }
.hero__photo { border-radius: 40px 40px 40px 120px; overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; background: var(--navy-100); }
.hero__photo img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 55% 40%; }
.float-card {
  position: absolute; left: -22px; bottom: 28px;
  display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 12px 20px 12px 12px; border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: float 5s ease-in-out infinite;
}
.float-card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--orange); color: var(--navy-900); }
.float-card strong { display: block; color: var(--navy-900); line-height: 1.2; }
.float-card small { color: var(--muted); font-size: .85rem; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Dades ràpides */
.quick { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.quick__card { display: flex; align-items: center; gap: 16px; background: #fff; padding: 22px 24px; border-radius: var(--radius-md); box-shadow: var(--shadow); }
.quick__card > .ico { width: 46px; height: 46px; padding: 11px; border-radius: 14px; background: var(--navy-100); color: var(--navy); }
.quick__card h3 { font-size: 1.1rem; margin-bottom: 2px; }
.quick__card p { color: var(--muted); font-size: .98rem; line-height: 1.45; }

/* Galeria */
.gallery { position: relative; z-index: 1; margin-top: 72px; }
.gallery__title { margin-bottom: 24px; }
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery__item { margin: 0; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4 / 3; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item--ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: repeating-linear-gradient(135deg, #fff, #fff 14px, var(--cream) 14px, var(--cream) 28px);
  border: 2px dashed #cfc7b8; color: var(--muted);
}
.gallery__item--ph .ico { width: 38px; height: 38px; color: var(--navy); opacity: .6; }
.gallery__item--ph small { color: var(--orange-700); font-weight: 700; }

/* ---------- Seccions ---------- */
.section { padding: 100px 0; }
.section--white { background: #fff; }
.section__head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section__head h2 { margin-bottom: 16px; }
.section__head p { color: var(--muted); font-size: 1.12rem; }

/* Nosaltres */
.team-photo { margin: 0 auto 48px; max-width: 880px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.team-photo img { width: 100%; height: auto; }
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 880px; margin: 0 auto; }
.person { background: var(--cream); border-radius: var(--radius-lg); padding: 24px; text-align: center; transition: transform .3s ease, box-shadow .3s ease; }
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.person__photo { width: 190px; height: 190px; margin: 0 auto 20px; border-radius: 50%; overflow: hidden; border: 5px solid #fff; box-shadow: 0 0 0 4px var(--orange); }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { font-size: 1.7rem; }
.person__role { color: var(--orange-700); font-weight: 700; margin: 2px 0 12px; }
.person p:last-child { color: var(--muted); font-size: 1rem; }
/* Enquadrament de les fotos provisionals (ajustar si es canvien) */
.person:nth-child(1) .person__photo img { object-position: 30% 22%; }
.person:nth-child(2) .person__photo img { object-position: 42% 22%; }

/* Serveis */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service { background: #fff; border-radius: var(--radius-lg); padding: 30px 26px; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease; }
.service:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--navy-100); color: var(--navy); margin-bottom: 20px; transition: background .3s ease, color .3s ease, transform .3s ease; }
.service__icon svg { width: 34px; height: 34px; }
.service:hover .service__icon { background: var(--orange); color: var(--navy-900); transform: rotate(-6deg) scale(1.05); }
.service h3 { margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.service--cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--navy); }
.service--cta h3 { color: #fff; }
.service--cta p { color: #c9d6f1; margin-bottom: 8px; }
.service--cta .btn { margin-top: auto; }

/* On som */
.map-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; background: var(--navy-100); }
.map { position: relative; display: block; width: 100%; height: 480px; border: 0; }
.map__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px 24px 120px; text-align: center;
  background:
    radial-gradient(circle at 20% 30%, #dfe8f8 0, transparent 45%),
    radial-gradient(circle at 80% 70%, #ffe9d2 0, transparent 45%),
    var(--navy-100);
}
.map__placeholder[hidden] { display: none; }
.map__placeholder > .ico { width: 44px; height: 44px; padding: 10px; border-radius: 16px; background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.map__placeholder p { max-width: 30em; color: var(--muted); }
.map__placeholder-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.map-card { position: absolute; left: 24px; bottom: 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: #fff; padding: 22px 24px; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); max-width: 290px; }
.map-card p { color: var(--muted); margin-bottom: 10px; }

/* Contacte */
.contact__grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 22px; }
.contact__card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: #fff; padding: 32px 28px; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.contact__card--main { background: var(--navy); color: #c9d6f1; }
.contact__card--main h3 { color: #fff; font-size: 1.6rem; }
.contact__card--main .btn { margin-top: auto; }
.contact__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--orange); color: var(--navy-900); }
.contact__icon .ico { width: 28px; height: 28px; }
.contact__icon--navy { background: var(--navy-100); color: var(--navy); }
.contact__notice { color: var(--muted); font-size: 1rem; line-height: 1.55; }
.contact__notice strong { color: var(--navy-900); }
.contact__phone { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; color: var(--navy); text-decoration: none; }
a.contact__phone[href^="tel"]:hover { color: var(--orange-600); }
.contact__phone:not([href^="tel"]) { color: var(--muted); font-size: 1.1rem; font-family: var(--font-body); font-weight: 500; pointer-events: none; }
.contact__small { color: var(--muted); font-size: .92rem; margin-top: auto; padding-top: 6px; }
.hours { width: 100%; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.hours li:last-child { border-bottom: 0; }
.hours strong { color: var(--navy-900); }

/* ---------- Peu ---------- */
.footer { background: var(--navy-900); color: #b9c6e4; padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.footer__copy { font-size: .92rem; opacity: .8; }

/* ---------- Botó flotant WhatsApp ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 999px; font-size: .95rem;
  background: var(--orange); color: var(--navy-900); font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 26px var(--orange-glow);
  transition: transform .2s ease, opacity .3s ease;
  opacity: 0; transform: translateY(20px); pointer-events: none;
}
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab.is-visible:hover { transform: translateY(-3px); }
.fab .ico { width: 22px; height: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr 1fr; }
  .contact__card--main { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .burger { display: block; }

  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px 20px 24px;
    background: rgba(251, 247, 241, .98); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 40px rgba(10, 51, 128, .15);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: transform .3s ease, opacity .3s ease, visibility .3s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav__list { flex-direction: column; }
  .nav__link { padding: 14px 18px; font-size: 1.1rem; }
  .nav__cta { justify-content: center; }
  .header { background: rgba(251, 247, 241, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

  .hero { padding-top: calc(var(--header-h) + 32px); padding-bottom: 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .float-card { left: 12px; bottom: -18px; }
  .quick { grid-template-columns: 1fr; margin-top: 48px; }
  .gallery__grid { grid-template-columns: 1fr; }
  .gallery { margin-top: 56px; }

  .section { padding: 72px 0; }
  .section__head { margin-bottom: 40px; }
  .team { grid-template-columns: 1fr; }
  .map { height: 380px; }
  .map-card { position: static; max-width: none; border-radius: 0; box-shadow: none; padding: 20px 22px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .container { width: calc(100% - 32px); }
  .services { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .hero__photo { border-radius: 28px 28px 28px 72px; }
  .brand__name { font-size: 1.3rem; }
  .fab { right: 14px; bottom: 14px; padding: 13px; }
  .fab span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   Peu legal, bàner de cookies i pàgines legals
   ========================================================= */
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .95rem; }
.footer__links a, .linklike { color: #dbe5fa; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(219, 229, 250, .4); }
.footer__links a:hover, .linklike:hover { color: #fff; text-decoration-color: var(--orange); }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 80;
  max-width: 560px; margin-left: auto; margin-right: auto;
  background: #fff; border-radius: var(--radius-md); padding: 22px 24px;
  box-shadow: 0 24px 60px rgba(7, 29, 77, .28); border: 1px solid var(--line);
  opacity: 0; transform: translateY(20px); transition: opacity .35s ease, transform .35s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner h2 { font-size: 1.2rem; margin-bottom: 6px; }
.cookie-banner p { color: var(--muted); font-size: .95rem; line-height: 1.5; }
.cookie-banner a { color: var(--navy); font-weight: 700; }
.cookie-banner__actions { display: flex; gap: 12px; margin-top: 16px; }
.cookie-banner__actions .btn { flex: 1; padding: 12px 18px; }

.legal { padding: calc(var(--header-h) + 48px) 0 80px; }
.legal__wrap { max-width: 800px; background: #fff; border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow); }
.legal h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-bottom: 6px; }
.legal__date { color: var(--muted); font-size: .95rem; margin-bottom: 28px; }
.legal h2 { font-size: 1.35rem; margin: 34px 0 10px; }
.legal h3 { font-size: 1.1rem; margin: 22px 0 8px; font-family: var(--font-body); font-weight: 700; }
.legal p, .legal li { color: #3a4560; }
.legal p { margin-bottom: 12px; }
.legal ul { list-style: disc; padding-left: 22px; margin: 0 0 14px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--navy); font-weight: 500; }
.legal code { background: var(--navy-100); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.legal__note { margin-top: 30px; padding-top: 20px; border-top: 1px dashed var(--line); font-size: .95rem; }
.legal__btn { margin-top: 10px; }
.legal-back { padding: 9px 18px; font-size: .92rem; }
.pendent { background: #fff3b8; color: #5c4400; padding: 1px 6px; border-radius: 6px; font-weight: 500; }

.table-wrap { overflow-x: auto; margin: 16px 0 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.legal table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 620px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal th { background: var(--navy-100); color: var(--navy-900); font-weight: 700; }
.legal tr:last-child td { border-bottom: 0; }

@media (max-width: 560px) {
  .legal__wrap { padding: 28px 20px; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
}
@media (max-width: 860px) {
  .map { height: 420px; }
  .map__placeholder { padding-bottom: 24px; }
}
