/* ============================================
   NOVdental — full de disseny
   Identitat: Manual de Contingut Visual NOVdental
   Paleta: #FFFFFF #A1A1A1 #A8A8A8 #D2D2D2 #858585
   Tipografia: Montserrat (Bold / SemiBold / Regular)
   ============================================ */

:root {
  --white: #ffffff;
  --gray-light: #d2d2d2;
  --gray: #a8a8a8;
  --gray-mid: #a1a1a1;
  --gray-dark: #858585;
  --ink: #333333;
  --ink-soft: #555555;
  --bg-soft: #fafafa;
  --line: #ececec;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
  --max-width: 1180px;
  --max-width-narrow: 760px;

  /* Accent premium (editorial/fotogràfic) — complementa la paleta de grisos de marca */
  --gold: #ad8a58;
  --gold-light: #d8c19c;
  --dark: #1b1916;
  --dark-soft: #262320;
  --cream: #f6f2ea;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: 16px; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 700; }

p { color: var(--ink-soft); }

.center { text-align: center; margin-left: auto; margin-right: auto; }

.eyebrow, .section-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.lede {
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 8px;
}

.section { padding: 88px 0; position: relative; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--gray-light); }
.section-alt p { color: #4a4a4a; }
.section-alt .value-num,
.section-alt .stat-label { color: #6f6f6f; }
.section-divider { border-top: 1px solid var(--line); }

/* ============ BOTONS ============ */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.3px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: #96773f; transform: translateY(-2px); }
.btn-outline { border-color: var(--gray-light); color: var(--ink); }
.btn-outline:hover { border-color: var(--gray-mid); transform: translateY(-2px); }
.btn-ghost { color: var(--gold); font-weight: 700; font-size: 0.92rem; }
.btn-ghost::after { content: ' →'; }
.btn-small { padding: 10px 20px; font-size: 0.86rem; }
button.btn-ghost { background: none; border: none; padding: 0; font-family: inherit; cursor: pointer; }

/* ============ MODAL (p.ex. nota de filosofia) ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 22, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.is-open { opacity: 1; visibility: visible; }

.modal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 46px 42px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
  transform: translateY(26px) scale(0.96);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
}
.modal-overlay.is-open .modal-card { transform: translateY(0) scale(1); opacity: 1; }

.modal-card h2 { font-size: 1.5rem; margin-bottom: 18px; padding-right: 30px; }
.modal-card p { margin-bottom: 14px; }
.modal-card p:last-of-type { margin-bottom: 0; }
.modal-card strong { color: var(--ink); font-weight: 700; }
.modal-actions { margin-top: 28px; }

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  .modal-card { padding: 36px 26px; }
}

/* ============ HEADER (injectat per partials.js) ============ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s ease;
}
.site-header.header-hidden { transform: translateY(-100%); }

/* La capçalera és fixed i queda fora del flux: reservem el seu espai amb padding-top al body */
body { padding-top: 78px; }
body[data-header="transparent"] { padding-top: 0; }

/* Capçalera transparent sobre la foto de portada (pàgines amb .hero o .page-cover) */
body[data-header="transparent"] .site-header {
  transition: transform 0.35s ease, background 0.3s ease, border-color 0.3s ease;
}
body[data-header="transparent"] .site-header:not(.header-solid) {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body[data-header="transparent"] .site-header:not(.header-solid) .logo img { filter: brightness(0) invert(1); }
body[data-header="transparent"] .site-header:not(.header-solid) .main-nav a { color: rgba(255,255,255,0.9); }
body[data-header="transparent"] .site-header:not(.header-solid) .main-nav a:hover { color: var(--white); }
body[data-header="transparent"] .site-header:not(.header-solid) .main-nav a.active { color: var(--white); border-color: var(--gold-light); }
body[data-header="transparent"] .site-header:not(.header-solid) .phone-link { color: var(--white); }
body[data-header="transparent"] .site-header:not(.header-solid) .nav-toggle span { background: var(--white); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo img { height: 48px; width: auto; }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a.active { color: var(--ink); border-color: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.phone-link { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.header-actions .btn { padding: 10px 22px; font-size: 0.86rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { height: 2px; width: 100%; background: var(--ink); border-radius: 2px; }

/* ============ HERO — pàgina d'inici (foto de portada a pantalla completa) ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,0.35) 0%, rgba(15,14,12,0.42) 45%, rgba(15,14,12,0.78) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 140px 0 120px; max-width: 620px; }
.hero .eyebrow { color: var(--gold-light); }
.hero h1 { color: var(--white); margin-bottom: 22px; font-size: clamp(1.75rem, 4.4vw, 2.6rem); max-width: 560px; }
.hero-text { color: #f1f1f1; font-size: 1.05rem; max-width: 520px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-outline { border-color: rgba(255,255,255,0.55); color: var(--white); }
.hero .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }

/* ============ PAGE COVER — portada a pantalla completa de les pàgines interiors ============ */
.page-cover {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.page-cover-media { position: absolute; inset: 0; overflow: hidden; }
.page-cover-media img { width: 100%; height: 100%; object-fit: cover; }
.page-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,0.28) 0%, rgba(15,14,12,0.32) 40%, rgba(15,14,12,0.82) 100%);
}
.page-cover-content { position: relative; z-index: 2; padding: 120px 0 56px; max-width: 680px; }
.page-cover .breadcrumb { color: #e6e2da; }
.page-cover .breadcrumb a { color: #e6e2da; }
.page-cover .breadcrumb a:hover { color: var(--white); }
.page-cover h1 { color: var(--white); margin-bottom: 14px; }
.page-cover .lede { color: #f1efe9; }

.breadcrumb {
  font-size: 0.82rem;
  color: var(--gray-dark);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--gray-dark); }
.breadcrumb a:hover { color: var(--ink); }

/* ============ PAGE HERO SENZILL — pàgines de text (legals), sense fotografia ============ */
.page-hero {
  padding: 56px 0 64px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { max-width: 560px; }

/* ============ SECCIONS AMB VARIANT DE COLOR ============ */
.section-cream { background: var(--cream); }
.section-cream p { color: #5c5648; }

.section-dark { background: var(--dark); color: #f1efe9; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #cfcabf; }
.section-dark .section-tag { color: var(--gold-light); }
.section-dark .btn-outline { border-color: rgba(255,255,255,0.55); color: var(--white); }
.section-dark .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* ============ GALERIA EN FRANJA (fons fosc, fotografia real) ============ */
.gallery-strip { background: var(--dark); padding: 88px 0; }
.gallery-strip .section-tag,
.gallery-strip h2 { text-align: center; }
.gallery-strip h2 { color: var(--white); }
.gallery-strip .section-tag { color: var(--gold-light); display: block; }
.gallery-strip-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}
.gallery-strip-row .hover-zoom { aspect-ratio: 3 / 4; border-radius: var(--radius-sm); }
.gallery-strip-row img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .gallery-strip-row { grid-template-columns: repeat(2, 1fr); }
}

/* ============ BANDA DE TANCAMENT (CTA final a pantalla completa) ============ */
.closing-cta {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
}
.closing-cta-media { position: absolute; inset: 0; overflow: hidden; }
.closing-cta-media img { width: 100%; height: 100%; object-fit: cover; }
.closing-cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,14,12,0.68) 0%, rgba(15,14,12,0.55) 50%, rgba(15,14,12,0.72) 100%);
}
.closing-cta-content { position: relative; z-index: 2; max-width: 560px; padding: 64px 24px; }
.closing-cta h2 { color: var(--white); }
.closing-cta p { color: #efece5; }
.closing-cta .section-tag { color: var(--gold-light); }
.closing-cta .btn-outline { border-color: rgba(255,255,255,0.55); color: var(--white); }
.closing-cta .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

/* ============ FORMES ORGÀNIQUES DECORATIVES (identitat de marca) ============ */
.deco-blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--gray-light), transparent 70%);
  opacity: 0.5;
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}
.section .deco-blob.behind-title { width: 320px; height: 320px; top: -60px; left: 50%; transform: translateX(-50%); opacity: 0.4; }

/* ============ FRANJA DE CONFIANÇA (dades reals) ============ */
.trust-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: -64px;
  padding: 10px 0;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
}
.trust-item:last-child { border-right: none; }
.trust-item .trust-num { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.trust-item .trust-label { font-size: 0.78rem; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ============ TARGETA FLOTANT (equip / valoracions) ============ */
.floating-card {
  position: absolute;
  bottom: -28px;
  left: -28px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-sm);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
  max-width: 250px;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .floating-card {
    background: rgba(255, 255, 255, 0.62);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
  }
}
.floating-card img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.floating-card .fc-name { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.floating-card .fc-role { font-size: 0.74rem; color: #4a4a4a; }
.floating-card .fc-stars { color: #6b6b6b; font-size: 0.78rem; letter-spacing: 1px; margin-top: 2px; }

/* ============ FILA D'ICONES D'ESPECIALITATS ============ */
.icon-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 34px;
  margin-top: 56px;
  padding-top: 46px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.icon-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100px;
  text-align: center;
}
.icon-badge .badge-circle {
  width: 58px; height: 58px; border-radius: 50%;
  border: 1.5px solid var(--gray);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-dark);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.icon-badge .badge-circle svg,
.icon-badge .badge-circle img { width: 26px; height: 26px; object-fit: contain; }
.icon-badge span { font-size: 0.76rem; font-weight: 600; color: var(--ink-soft); }
.icon-badge:hover .badge-circle { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.12); }

/* ============ MINI GALERIA (franges de fotos) ============ */
.mini-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mini-gallery img {
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease;
}
.mini-gallery img:hover { transform: scale(1.03); }

/* ============ EDITORIAL SPLIT ============ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media { position: relative; }
.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-text blockquote {
  border-left: 3px solid var(--gray-mid);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
}

.stat-row { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--gray-dark); }
.stat-label { font-size: 0.82rem; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 1px; }

/* ============ VALORS ============ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.value-card { padding: 8px; }
.value-num { font-size: 0.8rem; font-weight: 800; color: var(--gray-mid); margin-bottom: 10px; }
.value-card h3 { margin-bottom: 8px; }
.value-card p { font-size: 0.92rem; }

/* ============ GALERIA (instal·lacions) ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 18px;
  margin-top: 20px;
}
.gallery-grid .frame { width: 100%; height: 100%; border-radius: var(--radius-sm); overflow: hidden; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-grid .frame:hover img { transform: scale(1.08); }
.gallery-grid .span-2 { grid-column: span 2; }

/* ============ TRACTAMENTS ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.service-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card.is-linked { cursor: pointer; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--gray-mid), var(--ink) 140%);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); margin-bottom: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 10px 22px rgba(0,0,0,0.16);
}
.service-card:hover .service-icon { transform: scale(1.1) rotate(-4deg); box-shadow: 0 14px 28px rgba(0,0,0,0.22); }
.service-icon svg { width: 28px; height: 28px; stroke-width: 1.6; }
.service-icon img { width: 30px; height: 30px; object-fit: contain; }
.service-card p { font-size: 0.92rem; margin-bottom: 14px; }
.service-card .btn-ghost { font-size: 0.85rem; }
.service-note { font-size: 0.82rem; color: var(--gray-dark); }

/* Variant amb fotografia real (targeta destacada) */
.service-card.photo-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.service-card.photo-card .photo-wrap { aspect-ratio: 16 / 11; overflow: hidden; }
.service-card.photo-card .photo-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-card.photo-card:hover .photo-wrap img { transform: scale(1.06); }
.service-card.photo-card .photo-card-body { padding: 24px 26px 28px; }
.service-card.photo-card .badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--white); background: var(--gray-dark);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}

/* ============ EQUIP ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 44px;
}
.team-card { text-align: center; }
.team-card .frame {
  border-radius: var(--radius);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.team-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.team-card:hover img { transform: scale(1.08); }
.team-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.team-card .role { font-size: 0.85rem; color: var(--gray-dark); font-weight: 600; }
.team-card .specialty { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }

/* ============ OPINIONS ============ */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.stars { color: var(--gray-mid); letter-spacing: 3px; margin-bottom: 14px; }
.review-card p { font-size: 0.92rem; flex-grow: 1; }
.review-source {
  display: block; margin-top: 16px; font-size: 0.78rem; font-weight: 700;
  color: var(--gray-dark); text-transform: uppercase; letter-spacing: 1px;
}

/* ============ CONTACTE ============ */
.contact-list { margin: 26px 0 30px; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; gap: 3px; }
.contact-list strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-dark); }
.contact-list span, .contact-list a { font-size: 1rem; color: var(--ink); }
.contact-list a:hover { color: var(--gray-dark); }
.map-wrap { min-height: 340px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.82rem; font-weight: 700; color: var(--gray-dark); text-transform: uppercase; letter-spacing: 0.5px; }
.form-field input, .form-field select, .form-field textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--white);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--gray-mid);
}
.form-note { font-size: 0.8rem; color: var(--gray-dark); }
.form-confirm {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--ink);
}

/* ============ PROSE (pàgines legals) ============ */
.prose { max-width: var(--max-width-narrow); }
.prose h2 { margin-top: 36px; }
.prose p, .prose li { margin-bottom: 14px; }
.prose ul { padding-left: 20px; }
.prose ul li { list-style: disc; }
.legal-pending {
  background: var(--bg-soft);
  border: 1px dashed var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 30px;
}

/* ============ ACCORDIÓ (pàgines legals) ============ */
.accordion { border-top: 1px solid var(--line); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px;
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--ink);
}
.accordion-item summary::-webkit-details-marker,
.accordion-item summary::marker { display: none; content: ""; }
.accordion-item summary:hover { color: var(--gold); }
.accordion-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: transform 0.3s ease, background 0.2s ease, border-color 0.2s ease;
}
.accordion-icon svg { width: 13px; height: 13px; }
.accordion-item[open] .accordion-icon { transform: rotate(45deg); background: var(--cream); border-color: var(--gold); }
.accordion-body { padding: 0 2px 24px; }
.accordion-body p { margin-bottom: 14px; }
.accordion-body p:last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) {
  .accordion-icon { transition: none; }
}

/* ============ FOOTER (injectat per partials.js) ============ */
.site-footer { background: var(--ink); color: #ddd; padding: 64px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-col h4 { color: #f2f2f2; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; }
.footer-col a, .footer-col address {
  display: block;
  color: #bbb;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--white); }
.footer-logo { height: 24px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-tagline { color: #ddd; font-weight: 600; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { color: #888; font-size: 0.78rem; }

/* ============ WHATSAPP FLOAT ============ */
.whatsapp-fab {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  z-index: 60;
  transition: transform 0.2s ease;
}
.whatsapp-fab:hover { transform: scale(1.06); }
.whatsapp-fab svg { width: 26px; height: 26px; position: relative; z-index: 1; }
.whatsapp-fab::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.55;
  animation: waPulse 2.6s ease-out infinite;
}
@keyframes waPulse {
  0% { transform: scale(0.85); opacity: 0.55; }
  100% { transform: scale(1.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab::after { animation: none; display: none; }
}

/* ============================================
   EFECTES D'IMATGE PREMIUM
   ============================================ */

/* ---- Scroll-driven image animation (paral·laxi + zoom subtil en fer scroll) ---- */
[data-scroll-fx] {
  will-change: transform;
  transform: translateY(0) scale(1.001);
}
@media (prefers-reduced-motion: reduce) {
  [data-scroll-fx] { transform: none !important; }
}

/* ---- Image crossfade (dues imatges apilades que es fonen l'una en l'altra) ---- */
.crossfade { position: relative; width: 100%; height: 100%; }
.crossfade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.crossfade img.cf-a { animation: crossfadeA 16s ease-in-out infinite; }
.crossfade img.cf-b { animation: crossfadeB 16s ease-in-out infinite; }
@keyframes crossfadeA { 0%, 42% { opacity: 1; } 55%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes crossfadeB { 0%, 42% { opacity: 0; } 55%, 92% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .crossfade img.cf-a, .crossfade img.cf-b { animation: none; }
  .crossfade img.cf-b { opacity: 0; }
}

/* ---- Image hover zoom (targeta amb marc que retalla el zoom en passar el ratolí) ---- */
.hover-zoom { display: block; overflow: hidden; border-radius: var(--radius); }
.hover-zoom img { transition: transform 0.6s cubic-bezier(0.16, 0.84, 0.24, 1); }
.hover-zoom:hover img { transform: scale(1.07); }

/* ---- Mask reveal (la imatge es desvela amb un "escombrat" en entrar en pantalla) ---- */
.mask-reveal { position: relative; overflow: hidden; }
.mask-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  clip-path: inset(0 100% 0 0);
  transform: scale(1.12);
  transition: clip-path 1.3s cubic-bezier(0.16, 0.84, 0.24, 1), transform 1.6s cubic-bezier(0.16, 0.84, 0.24, 1);
}
.mask-reveal.is-visible img { clip-path: inset(0 0 0 0); transform: scale(1); }
.mask-reveal--card { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16 / 11; }
@media (prefers-reduced-motion: reduce) {
  .mask-reveal img { clip-path: inset(0); transform: none; transition: none; }
}

/* ---- Banda panoràmica de pantalla completa amb mask-reveal + paral·laxi ---- */
.panorama {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.panorama .mask-reveal { position: absolute; inset: 0; }
.panorama .mask-reveal img { height: 108%; top: -4%; position: relative; }
.panorama-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,30,30,0.38) 0%, rgba(20,20,20,0.62) 100%);
}
.panorama-content { position: relative; z-index: 2; text-align: center; max-width: 620px; margin: 0 auto; }
.panorama-content .section-tag { color: #f2f2f2; }
.panorama-content h2 { color: var(--white); }
.panorama-content p { color: #ececec; }
.panorama-content .btn-outline { border-color: rgba(255,255,255,0.55); color: var(--white); }
.panorama-content .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

@media (max-width: 760px) {
  .panorama { min-height: 46vh; }
}

/* ============ REVEAL (microinteracció discreta) ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Imatge que apareix difuminada i s'enfoca en revelar-se */
.img-blur-in {
  filter: blur(22px);
  transform: scale(1.04);
  transition: filter 1.3s ease, transform 1.3s ease;
}
.img-blur-in.is-visible { filter: blur(0); transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .img-blur-in { filter: none; transform: none; transition: none; }
}

/* ============================================
   RESPONSIVE
   4 nivells: mòbil vertical (≤480), mòbil horitzontal (≤767),
   tauleta (≤1024), escriptori (>1024, estils base de dalt)
   ============================================ */

/* ---- TAULETA I PER DAVALL (≤1024px) ---- */
@media (max-width: 1024px) {
  .container { padding: 0 20px; }

  /* La capçalera completa (logo + nav + telèfon + botó) no cap en amplades
     de tauleta: usem el mateix menú hamburguesa que en mòbil des d'ací. */
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }

  /* Panell desplegable en flux normal (sense posicions fixes ni desplaçaments
     codificats): logo i botó de menú es queden a la fila de dalt, i el nau
     i les accions s'apilen davall en una sola columna. */
  .site-header.nav-open { background: var(--white) !important; border-bottom: 1px solid var(--line); }
  .site-header.nav-open .logo img { filter: none !important; }
  .site-header.nav-open .nav-toggle span { background: var(--ink) !important; }
  .site-header.nav-open .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding-bottom: 22px;
  }
  .site-header.nav-open .logo { order: 1; }
  .site-header.nav-open .nav-toggle { order: 2; }
  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    order: 3;
    flex-basis: 100%;
    width: 100%;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .site-header.nav-open .main-nav a {
    color: var(--ink-soft) !important;
    padding: 12px 2px;
    border-bottom: 1px solid var(--line);
  }
  .site-header.nav-open .main-nav a:hover,
  .site-header.nav-open .main-nav a.active { color: var(--ink) !important; }
  .site-header.nav-open .header-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    order: 4;
    flex-basis: 100%;
    width: 100%;
    gap: 14px;
    margin-top: 16px;
  }
  .site-header.nav-open .header-actions .phone-link { color: var(--ink) !important; text-align: center; }
  .site-header.nav-open .header-actions .btn { width: 100%; text-align: center; }

  /* Graelles: reduïm columnes perquè el text no vaja massa comprimit */
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
  .trust-item { border-bottom: 1px solid var(--line); }
  .trust-item:nth-child(2n) { border-right: none; }
  .floating-card { display: none; }
  .mini-gallery { grid-template-columns: repeat(3, 1fr); }

  /* Seccions en dues columnes a escriptori: apilades en tauleta i mòbil */
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-media { order: -1 !important; }

  /* Portades a pantalla completa: reduïm una mica el paddings */
  .hero-content { padding: 120px 0 90px; }
  .page-cover-content { padding-top: 100px; }
}

/* ---- MÒBIL, VERTICAL I HORITZONTAL (≤767px) ---- */
@media (max-width: 767px) {
  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0; }
  .hero { min-height: 92vh; }
  .hero-content { padding: 110px 0 64px; }
  .page-cover { min-height: 56vh; }
  .page-cover-content { padding-top: 96px; padding-bottom: 40px; }
  .panorama { min-height: 42vh; }
  .closing-cta { min-height: 44vh; }
  .closing-cta-content { padding: 48px 20px; }
  .page-hero { padding: 40px 0 44px; }

  h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  h2 { font-size: clamp(1.4rem, 5.5vw, 1.7rem); }

  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery-grid .span-2 { grid-column: span 1; }
  .trust-strip { grid-template-columns: 1fr; margin-top: 24px; }
  .trust-item { border-right: none; }
  .mini-gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-strip-row { grid-template-columns: repeat(2, 1fr); }
  .icon-badge-row { gap: 22px; row-gap: 26px; }

  /* Botons en columna i a tot l'ample: més fàcils de tocar i sense
     que es queden massa junts en amples xicotets */
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; text-align: center; }
}

/* ---- MÒBIL HORITZONTAL AMB POCA ALÇADA (evita portades desproporcionades) ---- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: 100vh; }
  .hero-content { padding: 100px 0 32px; }
  .page-cover { min-height: 100vh; align-items: center; }
  .page-cover-content { padding: 96px 0 32px; }
  .panorama, .closing-cta { min-height: 100vh; }
}

/* ---- MÒBIL VERTICAL (320–480px) ---- */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .logo img { height: 34px; }
  .header-inner { height: 66px; }
  body { padding-top: 66px; }
  body[data-header="transparent"] { padding-top: 0; }

  .section { padding: 44px 0; }
  .hero-content {
    padding: 96px 0 48px;
    max-width: 86%;
    margin-left: auto;
    margin-right: auto;
  }
  .hero h1 br { display: none; }
  .page-cover-content { padding-top: 84px; }

  .services-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .mini-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-strip-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .icon-badge-row { gap: 18px; row-gap: 22px; }
  .icon-badge { width: 84px; }

  .modal-card { padding: 32px 22px; }
  .section .deco-blob.behind-title { width: 220px; height: 220px; }
}
