/* ==========================================================================
   NOUAMBIT IMMOBLES — DISSENY INMERSIIU, DINÀMIC I ELEGANT
   Serietat institucional + modernitat visual (Sense caixes tancades)
   ========================================================================== */

:root {
  /* Paleta Corporativa Principal: Blau Marí Mediterrani + Ambre Càlid */
  --color-bg: #faf8f5;               /* Fons de suport càlid */
  --color-bg-alt: #f1ede5;           /* Alternança suau */
  --color-surface: #ffffff;
  
  --color-primary-rgb: 11, 30, 51;
  --color-primary: #0b1e33;          /* Blau marí profund */
  --color-primary-light: #163252;
  --color-primary-subtle: rgba(var(--color-primary-rgb), 0.05);

  --color-accent: #c87a2a;           /* Ambre càlid mediterrani */
  --color-accent-soft: #e5994e;      /* Ambre daurat suau */
  --color-accent-dim: rgba(200, 122, 42, 0.12);
  --color-accent-glow: rgba(200, 122, 42, 0.28);

  --color-text: #141d26;             /* Carbó per a alta llegibilitat */
  --color-text-muted: #576676;       /* Gris neutre per a paràgrafs */
  --color-text-light: #8896a4;

  --color-line: rgba(var(--color-primary-rgb), 0.1);
  --color-line-dark: rgba(255, 255, 255, 0.15);

  /* Tipografia */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --fs-hero: clamp(2.4rem, 5vw, 4.2rem);
  --fs-h2: clamp(1.8rem, 3.2vw, 2.6rem);
  --fs-h3: clamp(1.2rem, 1.8vw, 1.5rem);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Reset bàsic */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

section {
  padding-block: clamp(64px, 8.5vw, 115px);
  position: relative;
  scroll-margin-top: 72px;
}

/* Revelat suau en fer scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Encapçalaments editorials a tot l'ample */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background-color: var(--color-accent);
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-head {
  width: 100%;
  max-width: 100%;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 960px;
}

/* ==========================================================================
   BOTONS DINÀMICS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease);
}
.btn:hover {
  background: var(--color-accent);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--color-accent-glow);
}

.btn-solid {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px var(--color-accent-glow);
}
.btn-solid:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px var(--color-accent-glow);
}

.btn-white-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
  backdrop-filter: blur(4px);
}
.btn-white-outline:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   CAPÇALERA (MARCA TEXTUAL)
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 500;
  padding-block: 22px;
  transition: background 0.35s var(--ease), padding 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled,
.site-header.header-solid {
  background: rgba(var(--color-primary-rgb), 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-block: 14px;
  border-color: var(--color-line-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-text-only {
  display: flex;
  flex-direction: column;
}
.brand-text-only .brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
}
.brand-text-only .brand-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  margin-top: 2px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}
.nav-desktop a {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  padding-block: 4px;
  transition: color 0.25s var(--ease);
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  transition: right 0.3s var(--ease);
}
.nav-desktop a:hover, .nav-desktop a.is-active {
  color: #ffffff;
}
.nav-desktop a:hover::after, .nav-desktop a.is-active::after {
  right: 0;
}
.nav-desktop a.is-active {
  color: var(--color-accent-soft);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-phone-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-phone-link:hover {
  color: var(--color-accent-soft);
}

.lang-switch {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  border: none;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.25s var(--ease);
}
.lang-switch button.is-active {
  background: var(--color-accent);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 32px;
  height: 22px;
  position: relative;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle::before, .nav-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.nav-toggle::before { top: 0; }
.nav-toggle::after { bottom: 0; }

.nav-toggle[aria-expanded="true"] span { opacity: 0; }
.nav-toggle[aria-expanded="true"]::before { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"]::after { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ==========================================================================
   HERO A TOTA PANTALLA (PERFECTAMENT ALINEAT AMB EL CONTAINER)
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  padding-top: 6rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.45) 0%, rgba(var(--color-primary-rgb), 0.75) 60%, rgba(var(--color-primary-rgb), 0.98) 100%),
    linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.9) 0%, rgba(var(--color-primary-rgb), 0.25) 75%);
}

/* El contingut hereta l'alineació exacta de .container */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 980px;
  text-align: left;
}

.hero-content h1 {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-top: 14px;
}
.hero-content h1 em {
  font-style: normal;
  color: var(--color-accent-soft);
}

.hero-content .lede {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.4vw, 1.28rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
  max-width: 720px;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero-scroll .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(var(--color-accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.6); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.hero-video-toggle {
  position: absolute;
  bottom: 28px;
  right: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(11, 30, 51, 0.6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.hero-video-toggle:hover {
  border-color: var(--color-accent);
  transform: scale(1.08);
}
.hero-video-toggle svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.hero-video-toggle .play-icon { display: none; }
.hero-video-toggle[aria-pressed="false"] .pause-icon { display: none; }
.hero-video-toggle[aria-pressed="false"] .play-icon { display: block; }

/* ==========================================================================
   SECCIÓ 2: EL DESPATX
   ========================================================================== */
.about {
  background-color: var(--color-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.about-media {
  position: relative;
}
.about-media img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
  box-shadow: 0 16px 40px rgba(11, 30, 51, 0.08);
  transition: transform 0.5s var(--ease);
}
.about-media:hover img {
  transform: scale(1.02);
}
.about-media .frame-accent {
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-top: 18px;
}
.about-text p.lead-quote {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.5;
  border-left: 3px solid var(--color-accent);
  padding-left: 20px;
  margin-top: 22px;
}

/* ==========================================================================
   FRANJES VISUALS DE PAUSA (PARALLAX ESTRET AMB IMATGE)
   ========================================================================== */
.visual-pause-parallax {
  height: 190px;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 6px 16px rgba(0, 0, 0, 0.2), inset 0 -6px 16px rgba(0, 0, 0, 0.2);
}
.visual-pause-parallax::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 30, 51, 0.4);
}
.visual-pause-parallax.pause-1 {
  background-image: url('../img/parallax/pause-1.jpg');
}
.visual-pause-parallax.pause-2 {
  background-image: url('../img/parallax/pause-2.jpg');
}

/* ==========================================================================
   SECCIÓ 3: ELS SERVEIS (SENSE SCROLL VERTICAL I A TOT L'AMPLE)
   ========================================================================== */
.services-section {
  background-color: #ffffff;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.services-tabs-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  border-bottom: 2px solid var(--color-bg-alt);
  padding-bottom: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.services-tabs-bar::-webkit-scrollbar {
  display: none;
}

.service-tab-btn {
  background: transparent;
  border: none;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text-muted);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all 0.3s var(--ease);
}
.service-tab-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.service-tab-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  background: transparent;
  transition: all 0.3s var(--ease);
}
.service-tab-btn:hover {
  color: var(--color-primary);
  background-color: var(--color-bg);
}
.service-tab-btn.is-active {
  color: var(--color-primary);
  background-color: var(--color-bg);
}
.service-tab-btn.is-active::after {
  background: var(--color-accent);
}

.tab-label-desktop {
  display: inline;
}
.tab-label-mobile {
  display: none;
}

.service-tab-panel {
  display: none;
  animation: fadeIn 0.4s var(--ease);
}
.service-tab-panel.is-active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  width: 100%;
}

.service-feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: all 0.35s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.service-feature-card:hover {
  background: #ffffff;
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(11, 30, 51, 0.08);
}

.service-feature-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.service-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s var(--ease);
}
.service-feature-card:hover .service-icon-box {
  background: var(--color-accent);
  color: #ffffff;
  transform: rotate(-6deg) scale(1.08);
}
.service-icon-box svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.service-feature-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.25;
}

.service-feature-desc {
  font-size: 0.94rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.service-feature-bullets {
  list-style: none;
  border-top: 1px solid var(--color-line);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-feature-bullets li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}
.service-feature-bullets li svg {
  width: 14px;
  height: 14px;
  fill: var(--color-accent);
  flex-shrink: 0;
}

/* ==========================================================================
   SECCIÓ 4: L'EQUIP (TEXT FIX EN HOVER, NOMÉS ZOOM A LA FOTO)
   ========================================================================== */
.team-section {
  background-color: var(--color-bg);
}

.team-open-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 36px);
  width: 100%;
}

.team-person {
  display: flex;
  flex-direction: column;
  /* El contenidor i el text queden 100% fixos */
}

.team-person-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--color-bg-alt);
  position: relative;
  box-shadow: 0 10px 25px rgba(11, 30, 51, 0.06);
  border: 1px solid var(--color-line);
}
.team-person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
/* Només fa zoom la foto interior */
.team-person:hover .team-person-photo img {
  transform: scale(1.08);
}

.team-person-info {
  margin-top: 16px;
}
.team-person-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-primary);
}
.team-person-role {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.team-person-desc {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   SECCIÓ 5: CONTACTE I UBICACIÓ (MAPA NET I FORMULARI OBERT)
   ========================================================================== */
.contact-section {
  background-color: var(--color-primary);
  color: #ffffff;
  position: relative;
}

.contact-section .section-title {
  color: #ffffff;
}
.contact-section .section-head p {
  color: rgba(255, 255, 255, 0.85);
}
.contact-section .eyebrow {
  color: var(--color-accent-soft);
}
.contact-section .eyebrow::before {
  background-color: var(--color-accent-soft);
}

.contact-open-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: stretch;
}

.contact-details-col {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.big-phone-callout {
  margin-bottom: 24px;
}
.big-phone-callout span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  display: block;
}

/* Telèfons equilibrats i harmonitzats */
.phones-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}
.phones-group .phone-link {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.1;
  transition: color 0.25s var(--ease);
}
.phones-group .phone-link:hover {
  color: var(--color-accent-soft);
}
.phones-group .phone-sep {
  font-size: 1.4rem;
  color: var(--color-accent-soft);
  opacity: 0.7;
}

.contact-list-open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  font-size: 0.92rem;
  margin-bottom: 24px;
}
.contact-item-open {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.contact-item-open svg {
  width: 20px;
  height: 20px;
  fill: var(--color-accent-soft);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-item-open strong {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}
.contact-item-open a:hover {
  color: var(--color-accent-soft);
}

/* Mapa Net a Tota Alçada amb Solució Doble Clic (RGPD Consent) */
.contact-map-card {
  flex: 1;
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-line-dark);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  display: flex;
}
.contact-map-card iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.map-placeholder-content {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.map-placeholder-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(var(--color-primary-rgb), 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}
.map-placeholder-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}
.map-placeholder-content p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}
.map-privacy-note {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
}
.map-iframe-container {
  width: 100%;
  height: 100%;
  min-height: 340px;
}

/* Formulari Desencajonat */
.contact-form-col {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.contact-form-col h3 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}
.contact-form-col p {
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 24px;
  line-height: 1.55;
}

.form-group-open {
  margin-bottom: 18px;
}
.form-group-open label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
}

.form-input-open, .form-select-open, .form-textarea-open {
  width: 100%;
  padding: 13px 16px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.94rem;
  transition: all 0.25s var(--ease);
}
.form-input-open:focus, .form-select-open:focus, .form-textarea-open:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.14);
  border-color: var(--color-accent-soft);
  box-shadow: 0 0 0 3px rgba(229, 153, 78, 0.2);
}
.form-select-open option {
  background-color: var(--color-primary);
  color: #ffffff;
}

.form-status {
  display: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.form-status.is-success {
  display: block;
  background: #14532d;
  color: #86efac;
}
.form-status.is-error {
  display: block;
  background: #7f1d1d;
  color: #fca5a5;
}

/* Spinner i estat de càrrega del formulari de contacte */
.btn-spinner {
  display: none;
  margin-right: 8px;
  vertical-align: middle;
}
.btn.is-loading {
  opacity: 0.88;
  cursor: not-allowed;
  pointer-events: none;
}
.btn.is-loading .btn-spinner {
  display: inline-block;
  animation: spinBtn 0.75s linear infinite;
}
@keyframes spinBtn {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.form-input-open:disabled,
.form-select-open:disabled,
.form-textarea-open:disabled,
#contact-form input[type="checkbox"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   PEU DE PÀGINA ENRIQUIT I INSTITUCIONAL (SEO LOCAL & E-E-A-T)
   ========================================================================== */
.site-footer {
  background-color: #05101c;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.88rem;
}

.footer-main {
  padding-block: clamp(48px, 6vw, 72px) clamp(36px, 4vw, 54px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr 1.2fr;
  gap: clamp(24px, 4vw, 48px);
}

.footer-col-brand .brand-text-only {
  margin-bottom: 16px;
  display: inline-flex;
}

.footer-desc {
  font-size: 0.86rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.85);
}

.footer-col-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
}

.footer-col-title::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 6px;
  border-radius: 2px;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-list li a {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.86rem;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
  display: inline-block;
}

.footer-nav-list li a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.footer-contact-info {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--color-accent);
}

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s var(--ease);
}

.footer-contact-item a:hover {
  color: var(--color-accent-soft);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 22px;
  background: #030b14;
  font-size: 0.82rem;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.55);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease);
}

.footer-links a:hover,
.footer-links button:hover {
  color: #ffffff;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .footer-links {
    justify-content: center;
  }
}

/* ==========================================================================
   BANNER DE COOKIES & MODAL RGPD
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: min(420px, calc(100vw - 32px));
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  z-index: 1400;
  display: none;
  font-size: 0.85rem;
}
.cookie-banner.is-visible {
  display: block;
  animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.cookie-banner h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 4px;
}
.cookie-banner p {
  color: var(--color-text-muted);
  line-height: 1.45;
}
.cookie-banner-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Botons de galetes amb simetria i paritat visual estricta (AEPD / RGPD) */
.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: center;
  line-height: 1.25;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

/* Aceptar i Rebutjar tenen exactament el mateix pes visual, color i contrast */
.cookie-btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
.cookie-btn-primary:hover {
  background-color: #16365c;
  border-color: #16365c;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.cookie-btn-secondary {
  background-color: var(--color-bg);
  color: var(--color-primary);
  border-color: var(--color-line);
}
.cookie-btn-secondary:hover {
  background-color: #ffffff;
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.cookies-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 30, 51, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookies-modal.is-open {
  display: flex;
}
.cookies-modal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 24px 28px;
  max-height: 90vh;
  overflow-y: auto;
}

.cookies-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 12px;
}
.cookies-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
  letter-spacing: -0.01em;
}
.cookies-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.cookies-modal-close:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}
.cookies-modal-close svg {
  display: block;
  width: 16px;
  height: 16px;
}

.cookies-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block: 16px;
}
.cookie-category-item {
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cookie-category-header h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 3px;
}
.cookie-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text-muted);
}
.cookie-badge-required {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
}
.cookie-category-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Switch accessible per a cookies */
.cookie-switch-label {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.cookie-switch-label input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cookie-slider {
  position: absolute;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 24px;
  transition: 0.25s var(--ease);
}
.cookie-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s var(--ease);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.cookie-switch-label input:checked + .cookie-slider {
  background-color: var(--color-accent);
}
.cookie-switch-label input:checked + .cookie-slider::before {
  transform: translateX(20px);
}
.cookie-switch-label input:focus-visible + .cookie-slider {
  outline: 2px solid var(--color-primary);
}

/* Switch bloquejat i actiu permanentment (Cookies essencials) */
.cookie-switch-label.is-locked {
  cursor: not-allowed;
  opacity: 0.92;
}
.cookie-switch-label.is-locked input:checked + .cookie-slider {
  background-color: var(--color-primary);
}
.cookie-switch-label.is-locked .cookie-slider {
  cursor: not-allowed;
}

input.cookie-toggle:disabled {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  cursor: not-allowed;
}

.cookies-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--color-line);
}
.cookies-modal-actions-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-media .frame-accent {
    inset: 12px -12px -12px 12px;
  }
  .service-cards-grid {
    grid-template-columns: 1fr;
  }
  .team-open-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .contact-open-grid {
    grid-template-columns: 1fr;
  }
  .contact-list-open {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .site-header.nav-open .nav-desktop {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: var(--color-primary);
    border: 1px solid var(--color-line-dark);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
    gap: 16px;
  }
  .header-phone-link span {
    display: none;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    padding: 16px 18px;
  }

  /* Pestañas de Serveis en Mòbil (Grid 3 columnes adaptatiu, zero scroll lateral) */
  .tab-label-desktop {
    display: none;
  }
  .tab-label-mobile {
    display: inline;
  }

  .services-tabs-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-bottom: 28px;
    background: var(--color-bg-alt);
    padding: 5px;
    border-radius: var(--radius);
    border-bottom: none;
    overflow-x: visible;
  }

  .service-tab-btn {
    width: 100%;
    min-width: 0;
    padding: 10px 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border-radius: var(--radius-sm);
    white-space: normal;
    color: var(--color-text-muted);
    background: transparent;
    transition: all 0.2s var(--ease);
  }

  .service-tab-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  .service-tab-btn::after {
    display: none;
  }

  .service-tab-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: var(--color-primary);
  }

  .service-tab-btn.is-active {
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(11, 30, 51, 0.08);
  }

  .service-tab-btn.is-active svg {
    color: var(--color-accent);
  }

  .service-feature-card {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   PÀGINES LEGALS (AVÍS LEGAL, PRIVACITAT, COOKIES)
   ========================================================================== */
.legal-page {
  padding-top: clamp(100px, 14vw, 150px);
  padding-bottom: 80px;
  background-color: var(--color-bg);
  min-height: 85vh;
}
.legal-content {
  max-width: 880px;
  margin-inline: auto;
  background: #ffffff;
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  box-shadow: 0 4px 20px rgba(11, 30, 51, 0.04);
}
.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-accent);
}
.legal-back-link:hover {
  color: var(--color-primary);
}
.legal-content h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.legal-updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 16px;
}
.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-top: 36px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.legal-content p, .legal-content ul, .legal-content ol {
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 16px;
}
.legal-content ul, .legal-content ol {
  padding-left: 24px;
}
.legal-content li {
  margin-bottom: 8px;
}
.legal-content strong {
  color: var(--color-primary);
}
.legal-content a {
  color: var(--color-accent);
  text-decoration: underline;
}
.legal-content a:hover {
  color: var(--color-primary);
}
.legal-table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.legal-table th, .legal-table td {
  padding: 12px 16px;
  border: 1px solid var(--color-line);
  text-align: left;
}
.legal-table th {
  background-color: var(--color-bg-alt);
  font-weight: 700;
  color: var(--color-primary);
}
.legal-table td {
  background-color: #ffffff;
}

/* ==========================================================================
   MODAL IN-PAGE PER A DOCUMENTS LEGALS (AVÍS LEGAL, PRIVACITAT, COOKIES)
   ========================================================================== */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 28px);
  background: rgba(11, 30, 51, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}

.legal-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.legal-modal-card {
  width: min(980px, 100%);
  max-height: min(88vh, 850px);
  height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.3s var(--ease);
}

.legal-modal.is-open .legal-modal-card {
  transform: scale(1) translateY(0);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--color-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.legal-modal-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.legal-modal-tabs::-webkit-scrollbar {
  display: none;
}

.legal-tab-btn {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease);
  position: relative;
}

.legal-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.legal-tab-btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 -2px 0 var(--color-accent);
  font-weight: 700;
}

.legal-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  flex-shrink: 0;
}

.legal-modal-close:hover {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}
.legal-modal-close svg {
  display: block;
  width: 16px;
  height: 16px;
}

.legal-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 40px);
  background: var(--color-surface);
}

.legal-modal-body .legal-panel {
  display: none;
}

.legal-modal-body .legal-panel.is-active {
  display: block;
}

.legal-modal-body .legal-content {
  max-width: 100%;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
  flex-shrink: 0;
}

.footer-legal-btn, .form-legal-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease);
}

.footer-legal-btn:hover {
  color: var(--color-accent);
}

.form-legal-link {
  color: #ffffff;
  text-decoration: underline;
}

.form-legal-link:hover {
  color: var(--color-accent-soft);
}
