@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;1,400;1,600&display=swap');
@import "accessibility-widget.css";
@import "search-widget.css";

/* ==============================================================================
   INSTITUT DE FISIOLOGIA I MEDICINA DE L'ART (INSTITUT ART)
   Full d'estils principal - Web Mèdic Modernitzat
   Identitat pròpia:
   - Blau mèdic vibrant: #146D99 / #1a8eca
   - Accent mèdic granat: #9a2323
   - Fons lluminosos i nets: #ffffff, #f8fafc, #f7f5f2
   - Hero Slider fotogràfic a pantalla ampla (Slider inici)
   - Mosaico d'Artistes reals (8 testimonis amb retrat complet)
   - Unitat clínica de Distonia Focal amb il·lustració original (sketch)
   - Peu clar i institucional amb referència a la Fundació Ciència i Art (FCART)
   ============================================================================== */

:root {
  --primary: #146d99;
  --primary-color: #146d99;
  --primary-hover: #0f567a;
  --primary-dark: #093e58;
  --primary-vibrant: #1a8eca;
  --primary-light: #e8f4f9;
  --primary-subtle: #f0f7fa;

  --accent: #9a2323;
  --accent-hover: #7f1d1d;
  --accent-light: #fdf2f2;

  --gold: #b8975c;
  --gold-light: #fbf7ee;

  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-warm: #f7f5f2;

  --text-main: #1e293b;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --border-light: #edf2f7;

  --shadow-xs: 0 1px 2px rgba(0, 32, 60, 0.04);
  --shadow-sm: 0 2px 6px rgba(0, 32, 60, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 6px 16px -2px rgba(0, 43, 73, 0.07), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 14px 32px -4px rgba(0, 43, 73, 0.10), 0 6px 14px -3px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 38px -6px rgba(0, 43, 73, 0.14), 0 8px 16px -4px rgba(0, 0, 0, 0.04);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1220px;
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'Roboto', 'Lato', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin-bottom: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ==============================================================================
   BARRA SUPERIOR (TOPBAR - CLARA, MÈDICA I LLUMINOSA)
   ============================================================================== */
.topbar {
  background-color: #ffffff;
  color: #64748b;
  font-size: 0.825rem;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  position: relative;
  z-index: 1001;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.topbar-contact a {
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 0.835rem;
}

.topbar-contact a svg {
  color: var(--primary);
}

.topbar-contact a:hover {
  color: var(--primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-social a {
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--bg-muted);
  transition: var(--transition);
}

.topbar-social a:hover {
  color: #ffffff;
  background-color: var(--primary);
  transform: translateY(-1px);
}

.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  border-left: 1px solid var(--border-color);
  padding-left: 14px;
}

.lang-selector a {
  color: #64748b;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}

.lang-selector a.active,
.lang-selector a:hover {
  color: #ffffff;
  background-color: var(--primary);
}

/* ==============================================================================
   CAPÇALERA I NAVEGACIÓ (VIDRE FLOTANT AMB DROPDOWNS VIBRANTS)
   ============================================================================== */
.header {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0, 32, 60, 0.04);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px -2px rgba(0, 43, 73, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  border-bottom-color: rgba(226, 232, 240, 0.95);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.header-scrolled .header-content {
  padding: 7px 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 52px;
  width: auto;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.header-scrolled .logo-img {
  height: 44px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.nav-link:hover,
.nav-item:hover>.nav-link,
.nav-link.active {
  color: var(--primary-vibrant);
  background-color: var(--primary-light);
}

/* Menú desplegable d'estil Institut Art (#1a8eca) */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background-color: var(--primary-vibrant);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px -5px rgba(26, 142, 202, 0.35);
  padding: 10px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.nav-item:hover>.dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 9px 20px;
  font-size: 0.88rem;
  color: #ffffff;
  font-weight: 500;
  transition: var(--transition);
}

.dropdown-menu li a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.2);
  padding-left: 24px;
}

/* Botó destacat de Pagament (Accent vermell/granat mèdic #9a2323 amb degradat profund) */
.btn-nav-pay {
  background: linear-gradient(135deg, #a82727 0%, #861b1b 100%);
  color: #ffffff !important;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(154, 35, 35, 0.28);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
  margin-left: 6px;
}

.btn-nav-pay:hover {
  background: linear-gradient(135deg, #bb2d2d 0%, #9a2323 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(154, 35, 35, 0.40);
}

/* Botó mòbil */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-dark);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 6px;
}

/* ==============================================================================
   ACCESSIBILITAT (WCAG 2.1/2.2 AA) & NAVEGACIÓ AMB TECLAT
   ============================================================================== */
.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  background-color: var(--primary-dark);
  color: #ffffff !important;
  padding: 12px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  z-index: 999999;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: top 0.2s ease;
  border: 2px solid #ffffff;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Classe d'accessibilitat per a elements audibles només per lectors de pantalla */
.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;
}

/* Anell d'enfocament visible i accessible per a usuaris de teclat */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary-vibrant) !important;
  outline-offset: 3px !important;
  border-radius: var(--radius-xs);
}

/* Suport per a usuaris amb sensibilitat al moviment (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-slide {
    transition: none !important;
  }
}

/* ==============================================================================
   MENÚ MÒBIL DESPLEGABLE AMB IDIOMES I SUBMENÚS ACORDIÓ
   ============================================================================== */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1999;
}

.nav-mobile-panel {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  max-width: 88vw;
  height: 100%;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  overflow-y: auto;
  transition: right 0.3s ease;
  padding: 20px 18px 30px;
  display: flex;
  flex-direction: column;
}

.nav-mobile-panel.open {
  right: 0;
}

.nav-mobile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.nav-mobile-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-mobile-close:hover {
  color: var(--accent);
}

/* Selector d'idiomes mòbil */
.nav-mobile-lang-box {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 16px;
}

.nav-mobile-lang-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.nav-mobile-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nav-mobile-lang-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  min-height: 38px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
}

.nav-mobile-lang-grid a:hover,
.nav-mobile-lang-grid a.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Llista de navegació mòbil i submenús */
.nav-mobile-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}

.nav-mobile-list a {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: var(--transition);
}

.nav-mobile-list a:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-mobile-item-has-submenu {
  display: flex;
  flex-direction: column;
}

.nav-mobile-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mobile-item-row a {
  flex-grow: 1;
}

.nav-mobile-submenu-toggle {
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: transform 0.25s ease, background 0.2s ease;
}

.nav-mobile-submenu-toggle:hover {
  background-color: var(--primary-light);
}

.nav-mobile-submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.nav-mobile-submenu {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 3px;
  padding-left: 14px;
  margin: 4px 0 8px 6px;
  border-left: 2px solid var(--primary-light);
}

.nav-mobile-submenu.open {
  display: flex;
}

.nav-mobile-submenu a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 8px 12px;
}

.nav-mobile-pay-btn {
  background-color: var(--accent) !important;
  color: #ffffff !important;
  text-align: center;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 8px;
  box-shadow: 0 4px 10px rgba(154, 35, 35, 0.25);
}

.nav-mobile-pay-btn:hover {
  background-color: var(--accent-hover) !important;
}

/* Accions ràpides de contacte al menú mòbil */
.nav-mobile-footer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.nav-mobile-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.nav-mobile-action-btn.phone {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

.nav-mobile-action-btn.whatsapp {
  background-color: #25d366;
  color: #ffffff;
}

.nav-mobile-action-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* ==============================================================================
   SECCIÓ HERO (CARRUSEL FOTOGRÀFIC A PANTALLA COMPLETA - SLIDER INICI)
   ============================================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  min-height: 520px;
  max-height: 680px;
  height: 72vh;
  overflow: hidden;
  background-color: #0f172a;
}

.hero-slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Overlay amb degradat lateral per a llegibilitat òptima */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(9, 36, 56, 0.88) 0%, rgba(9, 36, 56, 0.65) 50%, rgba(9, 36, 56, 0.2) 100%);
  display: flex;
  align-items: center;
  z-index: 2;
}

.hero-content {
  max-width: 660px;
  color: #ffffff;
  padding: 20px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.hero-title {
  color: #ffffff;
  font-size: clamp(2.3rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: #93c5fd;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.4;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-accent {
  background: linear-gradient(135deg, #a82727 0%, #861b1b 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(154, 35, 35, 0.32);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.btn-accent:hover {
  background: linear-gradient(135deg, #bb2d2d 0%, #9a2323 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(154, 35, 35, 0.42);
}

.btn-accent:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(154, 35, 35, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #146d99 0%, #0d5477 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(20, 109, 153, 0.28), var(--shadow-xs);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #187fb4 0%, #115e85 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(20, 109, 153, 0.36), var(--shadow-sm);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(20, 109, 153, 0.25);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--primary-dark) !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Microinteraccions d'icones a botons i enllaços d'acció */
.btn svg,
.btn-primary svg,
.btn-accent svg,
.btn-secondary svg,
.btn-secondary-outline svg,
.btn-all-testimonials svg,
.btn-dystonia svg,
.service-link svg {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover svg,
.btn-primary:hover svg,
.btn-accent:hover svg,
.btn-secondary:hover svg,
.btn-secondary-outline:hover svg,
.btn-all-testimonials:hover svg,
.btn-dystonia:hover svg,
.service-link:hover svg {
  transform: translateX(3px);
}

.btn-outline-white {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
  background-color: #ffffff;
  color: var(--primary-dark) !important;
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* Controls del carrusel (fletxes) */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
}

.hero-nav:hover {
  background-color: rgba(255, 255, 255, 0.85);
  color: var(--primary-dark);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

/* Punts indicadors */
.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background-color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.hero-dot.active,
.hero-dot:hover {
  background-color: #ffffff;
  transform: scale(1.25);
}

/* ==============================================================================
   PRESENTACIÓ CLÍNICA I PILARS MÈDICS
   ============================================================================== */
.welcome-section {
  padding: 70px 0;
  background: linear-gradient(135deg, #146D99 0%, #0d5173 100%);
  color: #ffffff;
  border-bottom: 3px solid #1a8eca;
}

.welcome-header {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.welcome-title {
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.welcome-lead {
  font-size: 1.16rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.8;
  margin: 0 auto;
}

.welcome-lead a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 700;
  transition: opacity 0.2s;
}

.welcome-lead a:hover {
  opacity: 0.85;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.pillar-card {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 30px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-vibrant);
  background-color: #ffffff;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary);
  opacity: 0;
  transition: var(--transition);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 22px;
}

.pillar-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.pillar-card p {
  font-size: 0.965rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ==============================================================================
   SERVEIS CLÍNICS
   ============================================================================== */
.services-section {
  padding: 85px 0;
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 50px;
}

.section-title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin-bottom: 14px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Secció de serveis mèdics a la portada */
.home-services-section {
  padding: 85px 0 80px;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
}

.home-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 42px;
}

.home-services-cta {
  text-align: center;
}

@media (max-width: 1024px) {
  .home-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .home-services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon {
  width: 50px;
  height: 50px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
  line-height: 1.6;
}

.service-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.service-link:hover {
  gap: 10px;
  color: var(--primary-hover);
}

/* ==============================================================================
   SECCIÓ TESTIMONIS D'ARTISTES (8 ARTISTES REALS AMB RETRAT)
   ============================================================================== */
.testimonials-section {
  padding: 85px 0 75px;
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.artists-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 45px;
}

.artist-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  cursor: pointer;
}

.artist-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-vibrant);
}

.artist-media {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.artist-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.artist-card:hover .artist-media img {
  transform: scale(1.035);
}

.artist-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
}

.artist-name {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.artist-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.35;
}

.btn-artist-read {
  margin-top: auto;
  display: inline-block;
  padding: 8px 18px;
  background-color: var(--bg-muted);
  color: var(--primary-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition);
}

.btn-artist-read:hover {
  background-color: var(--primary-vibrant);
  color: #ffffff;
  border-color: var(--primary-vibrant);
}

.testimonials-cta {
  text-align: center;
}

.btn-all-testimonials {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  background-color: #ffffff;
  color: var(--primary-dark);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-all-testimonials:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==============================================================================
   UNITAT DE DISTONIA FOCAL (AMB SKETCH IL·LUSTRACIÓ)
   ============================================================================== */
.dystonia-section {
  padding: 80px 0;
  background-color: var(--primary);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.dystonia-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.dystonia-content {
  position: relative;
  z-index: 2;
}

.dystonia-badge {
  display: inline-block;
  background-color: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(4px);
}

.dystonia-title {
  color: #ffffff;
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
}

.dystonia-subtitle {
  color: #bae6fd;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.dystonia-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: 30px;
  max-width: 580px;
}

.btn-dystonia {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  color: var(--primary-dark) !important;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: var(--transition);
}

.btn-dystonia:hover {
  background-color: #f1f5f9;
  color: var(--primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.dystonia-graphic {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.dystonia-graphic img {
  max-height: 440px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.35));
}

/* ==============================================================================
   PEU DE PÀGINA (FOOTER CLÍNIC CLAR I INSTITUCIONAL)
   ============================================================================== */
.footer {
  background-color: var(--bg-light);
  color: #475569;
  border-top: 1px solid var(--border-color);
  padding: 70px 0 30px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 0.9fr 1fr;
  gap: 36px;
  margin-bottom: 45px;
}

.footer-logo {
  height: 50px;
  width: auto;
  margin-bottom: 16px;
}

.footer-about-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 20px;
}

/* Targeta germana de la Fundació Ciència i Art (enllaç clicable a tot el mòdul) */
.footer-foundation-card {
  display: block;
  text-decoration: none;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  max-width: 320px;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.footer-foundation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-light, #93c5fd);
  text-decoration: none;
}

.footer-foundation-title,
.footer-foundation-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 8px;
}

.footer-fca-logo {
  display: block;
  height: 40px;
  width: auto;
  margin-bottom: 8px;
  transition: transform 0.22s ease;
}

.footer-foundation-card:hover .footer-fca-logo {
  transform: scale(1.04);
}

.footer-fca-text {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0;
}

.footer-heading {
  color: var(--primary-dark);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  display: inline-block;
}

.footer-address {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #475569;
  margin-bottom: 8px;
}

/* Botó amb icona de Google Maps al costat de l'adreça */
.footer-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 5px 13px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  line-height: 1;
}

.footer-map-btn:hover {
  background-color: #f8fafc;
  border-color: #1a73e8;
  color: #1a73e8;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 115, 232, 0.18);
}

.footer-map-btn-icon {
  flex-shrink: 0;
  display: inline-block;
}

/* ==============================================================================
   MODAL FLOTANT DEL MAPA INTERACTIU (GOOGLE MAPS & OPENSTREETMAP)
   ============================================================================== */
.site-map-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.site-map-modal-backdrop.open {
  display: flex !important;
  opacity: 1;
}

.site-map-modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg, 12px);
  width: 100%;
  max-width: 820px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-map-modal-backdrop.open .site-map-modal-card {
  transform: scale(1);
}

.site-map-modal-header {
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  background-color: #f8fafc;
}

.site-map-modal-heading-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-map-pin-icon {
  flex-shrink: 0;
}

.site-map-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark, #0f172a);
  margin: 0 0 3px 0;
  line-height: 1.3;
}

.site-map-modal-address {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.site-map-modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.site-map-modal-close:hover {
  color: #0f172a;
  background-color: #e2e8f0;
}

.site-map-modal-body {
  width: 100%;
  background-color: #e2e8f0;
  position: relative;
  min-height: 360px;
}

.site-map-modal-body iframe {
  width: 100%;
  height: 400px;
  display: block;
  border: none;
}

.site-map-modal-footer {
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.site-map-btn-gmaps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #1a73e8;
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

.site-map-btn-gmaps:hover {
  background-color: #1557b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
  color: #ffffff !important;
  text-decoration: none;
}

.site-map-btn-osm {
  color: var(--primary, #0284c7);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-map-btn-osm:hover {
  text-decoration: underline;
  color: var(--primary-dark, #0369a1);
}

@media (max-width: 640px) {
  .site-map-modal-card {
    max-height: 94vh;
  }
  .site-map-modal-body iframe {
    height: 290px;
  }
  .site-map-modal-header {
    padding: 12px 14px;
  }
  .site-map-modal-footer {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .site-map-btn-gmaps {
    justify-content: center;
  }
}

.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-contact-list li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-contact-list a {
  color: #334155;
  font-weight: 500;
}

.footer-contact-list a:hover {
  color: var(--primary);
}

.btn-secondary-outline {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background-color: #ffffff;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: var(--transition);
}

.btn-secondary-outline:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  color: #64748b;
  transition: var(--transition);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-social-wrapper {
  margin-top: 22px;
}

.footer-social-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer-social-icons {
  display: flex;
  gap: 8px;
}

.footer-social-icons a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.footer-social-icons a:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Banner del Kit Digital dins del footer */
.footer-kit-wrapper {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 35px;
  text-align: center;
}

.kit-digital-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.kit-digital-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.kit-digital-img {
  max-width: 780px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.825rem;
  color: #64748b;
}

.footer-bottom-links {
  display: flex;
  gap: 18px;
}

.footer-bottom-links a {
  color: #64748b;
}

.footer-bottom-links a:hover {
  color: var(--primary);
}

/* ==============================================================================
   PÀGINA DE PAGAMENT PAYPAL (PAGAMENT.HTML)
   ============================================================================== */
.payment-section {
  padding: 60px 0 80px;
  background-color: var(--bg-light);
}

.payment-card {
  background-color: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  padding: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.payment-header {
  text-align: center;
  margin-bottom: 35px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
}

.payment-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.payment-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

.payment-methods-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}

.badge-method {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-table-container {
  overflow-x: auto;
  margin-bottom: 35px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.price-table th {
  background-color: var(--primary);
  color: #ffffff;
  padding: 14px 16px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.price-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.price-table tr:nth-child(even) {
  background-color: var(--bg-light);
}

.price-table tr:hover {
  background-color: var(--primary-light);
}

.price-table .col-total {
  font-weight: 700;
  color: var(--primary);
}

@media (max-width: 550px) {

  .price-table th,
  .price-table td {
    padding: 10px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .price-table-container::before {
    content: "↔ Llisca la taula per veure tot el desglossament";
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
    text-align: right;
  }
}

.payment-form-box {
  background: linear-gradient(135deg, var(--primary-subtle) 0%, #ffffff 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  margin-top: 30px;
}

.payment-form-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.payment-form-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.service-select-group {
  max-width: 450px;
  margin: 0 auto 20px;
  text-align: left;
}

.service-select-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.service-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.service-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 109, 153, 0.2);
}

.btn-paypal-submit {
  background-color: #ffc439;
  color: #003087;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.btn-paypal-submit:hover {
  background-color: #f4b628;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.payment-security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-top: 18px;
}

/* ==============================================================================
   AVÍS I MODAL DE GALETES (COOKIES - IDÈNTIC AL DE FCART & INSTITUT ART)
   ============================================================================== */
.fcart-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-color);
  z-index: 99999;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  animation: slideUpCookie 0.35s ease-out forwards;
}

@keyframes slideUpCookie {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.fcart-cookie-banner.hidden {
  display: none !important;
}

.fcart-cookie-content {
  flex: 1 1 500px;
}

.fcart-cookie-text {
  font-size: 0.95rem;
  color: #0a0a0a;
  line-height: 1.5;
  margin: 0;
}

.fcart-cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fcart-cookie-btn {
  border: none;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.fcart-cookie-btn-accept {
  background-color: rgba(15, 178, 139, 1);
  color: #ffffff;
}

.fcart-cookie-btn-accept:hover {
  background-color: rgba(10, 138, 110, 1);
}

.fcart-cookie-btn-reject {
  background-color: rgba(119, 31, 31, 1);
  color: #ffffff;
}

.fcart-cookie-btn-reject:hover {
  background-color: rgba(175, 38, 20, 1);
}

.fcart-cookie-btn-config {
  background-color: rgba(27, 101, 143, 1);
  color: #ffffff;
}

.fcart-cookie-btn-config:hover {
  background-color: rgba(19, 72, 105, 1);
}

.fcart-cookie-btn-info {
  background-color: rgba(27, 101, 143, 1);
  color: #ffffff;
}

.fcart-cookie-btn-info:hover {
  background-color: rgba(19, 72, 105, 1);
}

/* Modal de configuració de galetes */
.fcart-cookie-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fcart-cookie-modal-backdrop.open {
  display: flex !important;
}

.fcart-cookie-modal {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 28px;
  max-height: 90vh;
  overflow-y: auto;
}

.fcart-cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.fcart-cookie-modal-header h3 {
  font-size: 1.25rem;
}

.fcart-cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
}

.fcart-cookie-option {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.fcart-cookie-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.fcart-cookie-option-title {
  font-weight: 700;
  color: var(--primary-dark);
}

.fcart-cookie-badge-required {
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.fcart-cookie-option-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.fcart-cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* ==============================================================================
   BOTÓ FLOTANT DE GESTIÓ DE GALETES (COOKIES REVISIT BADGE)
   Icona a l'angle inferior esquerra, poc intrusiva, semi-transparent i flotant
   ============================================================================== */
.cookie-floating-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 46px;
  height: 46px;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #94a3b8;
  /* Gris neutre pissarra com a la imatge */
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  /* Poc intrusiva i semi-transparent */
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.cookie-floating-btn svg {
  width: 38px;
  height: 38px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.cookie-floating-btn:hover {
  opacity: 1;
  color: #64748b;
  transform: scale(1.12);
}

.cookie-floating-btn:focus-visible {
  opacity: 1;
  color: #0284c7;
  outline: 2px solid #0284c7;
  outline-offset: 4px;
}

.cookie-floating-btn.banner-active,
body.a11y-panel-open .cookie-floating-btn {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

@media (max-width: 640px) {
  .cookie-floating-btn {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
  }

  .cookie-floating-btn svg {
    width: 32px;
    height: 32px;
  }
}

/* ==============================================================================
   RESPONSIVITAT (MEDIA QUERIES)
   ============================================================================== */
@media (max-width: 1100px) {
  .artists-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .dystonia-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .dystonia-desc {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar {
    display: none;
  }

  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-slider {
    height: 60vh;
    min-height: 440px;
  }

  .hero-nav {
    display: none;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.15rem;
  }

  .hero-desc {
    display: none;
  }

  .artists-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .artist-media {
    height: 170px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .payment-card {
    padding: 24px 18px;
  }

  .fcart-cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .fcart-cookie-actions {
    justify-content: stretch;
  }

  .fcart-cookie-btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .artists-grid {
    grid-template-columns: 1fr;
  }

  .artist-media {
    height: 220px;
  }
}

/* ==============================================================================
   PÀGINES INTERNES: HERO, CAPÇALERA I MIGUES DE PA (BREADCRUMBS)
   ============================================================================== */
.page-hero {
  background: linear-gradient(135deg, #146D99 0%, #0d5173 100%);
  color: #ffffff;
  padding: 55px 0 45px;
  border-bottom: 3px solid var(--primary-vibrant);
  position: relative;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  color: #bae6fd;
}

.page-hero .breadcrumb a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.page-hero .breadcrumb a:hover {
  opacity: 0.8;
}

.page-hero .page-title {
  font-size: clamp(2rem, 3.8vw, 2.9rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.page-hero .page-subtitle {
  font-size: 1.15rem;
  color: #bae6fd;
  max-width: 800px;
  line-height: 1.6;
  margin: 0;
}

/* Subnavegació en pestanyes/píndoles (per a seccions com L'Institut o Serveis) */
.subnav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 35px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.subnav-pill {
  padding: 10px 22px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.subnav-pill:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.subnav-pill.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(20, 109, 153, 0.3);
}

/* ==============================================================================
   CONTINGUT GENERAL DE PÀGINES
   ============================================================================== */
.page-content-wrapper,
.section {
  padding: 24px 0 70px;
  background-color: var(--bg-white);
}

.content-block {
  margin-bottom: 50px;
}

.content-block h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  color: var(--primary-dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.content-block h3 {
  font-size: 1.35rem;
  color: var(--primary);
  margin: 25px 0 12px;
}

.content-block p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 18px;
}

.content-lead-box {
  background-color: #f0f9ff;
  border-left: 4px solid var(--primary-vibrant);
  padding: 24px 28px;
  border-radius: var(--radius-sm);
  margin-bottom: 35px;
}

.content-lead-box p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #0c4a6e;
  font-weight: 500;
  margin: 0;
}

.quote-box {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 30px;
  margin: 35px 0;
  position: relative;
}

.quote-box blockquote {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 500;
  color: var(--primary-dark);
  line-height: 1.65;
  margin: 0 0 12px;
}

.quote-box cite {
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 700;
  color: var(--primary);
}

/* ==============================================================================
   EQUIP MÈDIC I PERFILS PROFESSIONALS
   ============================================================================== */
.doctor-hero-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  margin-bottom: 45px;
  align-items: start;
}

.doctor-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: #e2e8f0;
}

.doctor-media img {
  width: 100%;
  height: auto;
  display: block;
}

.doctor-info h2 {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
  border: none;
  padding: 0;
}

.doctor-role {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  display: block;
}

.doctor-bio {
  font-size: 1rem;
  line-height: 1.75;
  color: #334155;
}

.team-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.team-member-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.team-member-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-vibrant);
}

.team-member-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.team-member-role {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.specialties-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.specialty-badge {
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

/* Seccions complementàries d'Equip */
.team-layout-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  margin-top: 55px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .team-layout-columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.team-section-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 34px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.team-section-header {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f1f5f9;
}

.team-section-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.team-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.team-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: var(--transition);
}

.team-list-item:hover {
  background-color: #ffffff;
  border-color: var(--primary-vibrant);
  box-shadow: var(--shadow-xs);
  transform: translateX(4px);
}

.team-list-item-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: #e0f2fe;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-list-item-content {
  flex: 1;
}

.team-list-item-content strong {
  display: block;
  font-size: 1.08rem;
  color: var(--primary-dark);
  margin-bottom: 2px;
}

.team-list-item-content span {
  font-size: 0.92rem;
  color: #475569;
}

.advisors-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 550px) {
  .advisors-grid {
    grid-template-columns: 1fr;
  }
}

.advisor-pill {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}

.advisor-pill:hover {
  background-color: #ffffff;
  border-color: var(--primary-vibrant);
  box-shadow: var(--shadow-xs);
}

.advisor-pill-name {
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.advisor-pill-name::before {
  content: '';
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background-color: var(--primary);
}

.advisor-subitems {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
  padding-left: 14px;
  margin-top: 4px;
}

/* ==============================================================================
   ACORDIONS DE PREGUNTES FREQÜENTS (FAQ)
   ============================================================================== */
.faq-container {
  max-width: 960px;
  margin: 0 auto;
}

.faq-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.faq-card:hover {
  border-color: var(--primary-vibrant);
  box-shadow: var(--shadow-sm);
}

.faq-header {
  padding: 20px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  background-color: #ffffff;
  transition: background-color 0.2s;
  user-select: none;
}

.faq-header:hover {
  background-color: #f8fafc;
}

.faq-question {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  line-height: 1.4;
}

.faq-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.3s ease, background-color 0.2s;
}

.faq-card.open .faq-icon {
  transform: rotate(45deg);
  background-color: var(--primary);
  color: #ffffff;
}

.faq-card.open .faq-header {
  border-bottom: 1px solid var(--border-color);
}

.faq-body {
  padding: 24px 26px;
  background-color: #fafbfc;
  display: none;
}

.faq-card.open .faq-body {
  display: block;
}

.faq-body p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 12px;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

/* ==============================================================================
   TESTIMONIS COMPLETS AMB FILTRES
   ============================================================================== */
.testimonials-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.testi-full-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.testi-full-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-vibrant);
}

.testi-full-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.testi-avatar {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-vibrant);
  background-color: #e2e8f0;
}

.testi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testi-full-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.testi-full-role {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.testi-full-body {
  padding: 22px 20px;
  font-size: 0.965rem;
  line-height: 1.7;
  color: #334155;
  flex-grow: 1;
}

/* ==============================================================================
   MEDIA & BLOG
   ============================================================================== */
.media-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.media-item-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.media-item-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-vibrant);
}

.media-item-thumb {
  width: 100%;
  height: 200px;
  background-color: #0f172a;
  overflow: hidden;
  position: relative;
}

.media-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.media-item-card:hover .media-item-thumb img {
  transform: scale(1.04);
}

.media-item-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.media-item-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.35;
  margin-bottom: 12px;
}

.media-item-desc {
  font-size: 0.925rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.media-card-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid #f1f5f9;
}

.btn-media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border: 1.5px solid transparent;
}

.btn-media-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.btn-media-icon:hover {
  transform: translateY(-2px);
}

.btn-media-icon:hover svg {
  transform: scale(1.12);
}

.btn-media-icon.btn-media-primary {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-media-icon.btn-media-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(20, 109, 153, 0.28);
}

.btn-media-icon.btn-media-pdf {
  background-color: #ffffff;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-media-icon.btn-media-pdf:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(20, 109, 153, 0.28);
}

.btn-media-icon.btn-media-scan {
  background-color: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.btn-media-icon.btn-media-scan:hover {
  background-color: #e2e8f0;
  color: var(--primary-dark);
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ==============================================================================
   DIVULGACIÓ (ARTICLES, MATERIALS I LLIBRES)
   ============================================================================== */
.divulga-categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 0;
  margin-bottom: 35px;
}

.divulga-category-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 145px;
}

.divulga-category-card:hover,
.divulga-category-card.active {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(20, 109, 153, 0.12);
  border-color: var(--primary);
  background-color: #f0f9ff;
}

.divulga-category-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  transition: all 0.25s ease;
}

.divulga-category-card:hover .divulga-category-icon-wrapper,
.divulga-category-card.active .divulga-category-icon-wrapper {
  background-color: var(--primary);
  color: #ffffff;
  transform: scale(1.05);
}

.divulga-category-icon {
  width: 26px;
  height: 26px;
}

.divulga-category-title,
.divulga-cat-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0;
  line-height: 1.35;
  text-align: center;
}

/* Download PDF Icon Button */
.btn-download-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 0;
}

.btn-download-pdf:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 109, 153, 0.25);
}

.btn-download-pdf svg {
  display: block;
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.btn-download-pdf:hover svg {
  transform: scale(1.12);
}

.pub-items-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pub-item-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: var(--transition);
}

.pub-item-card:hover {
  border-color: var(--primary-vibrant);
  box-shadow: var(--shadow-sm);
  background-color: #fafbfc;
}

.pub-item-info h3 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
  padding: 0;
  border: none;
}

.pub-item-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 8px;
}

.pub-item-desc {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.55;
  margin: 0;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.book-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.book-cover {
  width: 100%;
  height: 320px;
  background-color: #e2e8f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.book-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.book-author {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.book-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

/* ==============================================================================
   CONTACTE (INFORMACIÓ, FORMULARI I MAPA)
   ============================================================================== */
.contact-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 45px;
}

.contact-card-box {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 25px 0 35px;
}

.contact-info-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info-text strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

.contact-info-text span,
.contact-info-text a {
  font-size: 1.05rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.contact-form-group {
  margin-bottom: 20px;
}

.contact-form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.contact-form-group input,
.contact-form-group textarea,
.contact-form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.975rem;
  background-color: #fafbfc;
  transition: var(--transition);
}

.contact-form-group input:focus,
.contact-form-group textarea:focus,
.contact-form-group select:focus {
  outline: none;
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(20, 109, 153, 0.15);
}

.contact-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.45;
  cursor: pointer;
}

.contact-checkbox-label input {
  margin-top: 3px;
}

.map-embed-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  height: 420px;
  background-color: #e2e8f0;
}

.map-embed-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==============================================================================
   MEDIA QUERIES ADDICIONALS PER A PÀGINES INTERNES
   ============================================================================== */
@media (max-width: 992px) {
  .doctor-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .doctor-media {
    max-width: 260px;
    margin: 0 auto;
  }

  .contact-layout-grid {
    grid-template-columns: 1fr;
  }

  .divulga-categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .divulga-categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pub-item-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==============================================================================
   MEDIA FILTER & BADGES
   ============================================================================== */
.media-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 0;
  margin-bottom: 35px;
}

.media-filter-btn {
  padding: 10px 22px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.media-filter-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.media-filter-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(20, 109, 153, 0.35);
}

.material-filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.material-filter-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.material-filter-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(20, 109, 153, 0.3);
}

/* ==============================================================================
   DIVULGACIÓ: CERCA EN VIU, FILTRES TEMÀTICS I CHIPS
   ============================================================================== */
.divulga-search-wrapper {
  margin: 0 auto 36px;
  max-width: 860px;
}

.divulga-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 6px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.divulga-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(20, 109, 153, 0.15);
}

.divulga-search-icon {
  font-size: 1.15rem;
  color: var(--primary);
  margin-right: 12px;
  user-select: none;
}

.divulga-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--text-dark);
  background: transparent;
  padding: 8px 0;
}

.divulga-search-clear {
  background: #e2e8f0;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #475569;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: 8px;
}

.divulga-search-clear:hover {
  background: var(--accent);
  color: #ffffff;
}

.divulga-search-status {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
}

.divulga-theme-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.divulga-theme-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.divulga-theme-pill:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.divulga-theme-pill.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border-color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(20, 109, 153, 0.3);
}

.divulga-theme-group {
  margin-bottom: 44px;
}

.divulga-theme-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.divulga-keyword-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.divulga-keyword-chip {
  font-size: 0.75rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 9px;
  border-radius: 9999px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  transition: var(--transition);
}

.divulga-keyword-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.media-tag-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 9999px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.media-tag-badge.tag-internet {
  background: #e0f2fe;
  color: #0369a1;
}

.media-tag-badge.tag-premsa {
  background: #fef3c7;
  color: #92400e;
}

.media-tag-badge.tag-televisio {
  background: #fce7f3;
  color: #9d174d;
}

.media-tag-badge.tag-radio {
  background: #dcfce7;
  color: #166534;
}

/* ==============================================================================
   LEGAL PAGES
   ============================================================================== */
.legal-container {
  max-width: 920px;
  margin: 0 auto;
  background: #ffffff;
  padding: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  line-height: 1.8;
}

.legal-container h2 {
  font-size: 1.45rem;
  color: var(--primary-color);
  margin-top: 36px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.legal-container h3 {
  font-size: 1.15rem;
  color: #1e293b;
  margin-top: 24px;
  margin-bottom: 10px;
}

.legal-container p {
  margin-bottom: 16px;
  color: #475569;
  font-size: 0.98rem;
}

.legal-container ul,
.legal-container ol {
  margin-left: 24px;
  margin-bottom: 20px;
  color: #475569;
}

.legal-container li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .legal-container {
    padding: 24px;
  }
}

/* ==============================================================================
   MEDIA LIGHTBOX MODAL
   ============================================================================== */
.media-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.media-modal-overlay.open {
  display: flex;
}

.media-modal-dialog {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.media-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
}

.media-modal-close:hover {
  color: #0f172a;
}

.media-modal-img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-top: 18px;
  margin-bottom: 20px;
}

.media-modal-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-right: 36px;
  margin-bottom: 6px;
}

.media-modal-meta {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1rem;
}

/* ==============================================================================
   VIDEO LIGHTBOX MODAL
   ============================================================================== */
.video-modal-dialog {
  background-color: #0f172a;
  border-radius: var(--radius-lg);
  max-width: 900px;
  width: 100%;
  padding: 28px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.25s ease-out;
  color: #ffffff;
}

.video-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
  z-index: 2;
}

.video-modal-close:hover {
  color: #ffffff;
}

.video-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-right: 36px;
  margin-bottom: 4px;
}

.video-responsive-container {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-top: 16px;
  margin-bottom: 18px;
  background-color: #000000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.video-responsive-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}





/* ==============================================================================
   TESTIMONIS: SISTEMA DE SELECCIÓ PER CATEGORIES I FITXA DE DOS NIVELLS
   ============================================================================== */

.testi-container {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  align-items: start;
  margin-top: 10px;
}

@media (max-width: 991px) {
  .testi-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Sidebar Especialitats */
.testi-sidebar {
  position: sticky;
  top: 90px;
  z-index: 10;
}

.testi-sidebar-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
}

.testi-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #e2e8f0;
}

.testi-sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
}

.testi-sidebar-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.testi-cat-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testi-cat-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.testi-cat-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.testi-cat-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(20, 109, 153, 0.25);
}

.testi-cat-btn.active .testi-cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.testi-cat-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: var(--text-muted);
}

.testi-cat-group {
  margin-top: 4px;
}

.testi-cat-group-header {
  margin-bottom: 2px;
}

.testi-cat-group-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: #f8fafc;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.testi-cat-group-btn:hover {
  background: #f1f5f9;
}

.testi-cat-arrow {
  display: inline-block;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
  color: var(--text-muted);
  line-height: 1;
}

.testi-cat-group.expanded .testi-cat-arrow {
  transform: rotate(90deg);
}

.testi-cat-subnav {
  list-style: none;
  padding: 0 0 0 10px;
  margin: 4px 0 6px 0;
  display: none;
  flex-direction: column;
  gap: 2px;
  border-left: 2px solid #e2e8f0;
}

.testi-cat-group.expanded .testi-cat-subnav {
  display: flex;
}

.testi-cat-subnav .testi-cat-btn {
  font-size: 0.85rem;
  padding: 6px 10px;
}

/* Controls (Cerca & Estat) */
.testi-controls {
  margin-bottom: 28px;
}

.testi-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 4px 14px;
  transition: var(--transition);
  margin-bottom: 14px;
}

.testi-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 109, 153, 0.15);
}

.testi-search-icon {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-right: 10px;
}

.testi-search-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 0.95rem;
  padding: 10px 0;
  background: transparent;
  color: var(--text-color);
}

.testi-search-clear {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.testi-filter-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #f8fafc;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.testi-active-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-color);
}

.testi-reset-btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.testi-reset-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Graella de Fitxes Inicials (Nivell 1) */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

@media (max-width: 640px) {
  .testi-grid {
    grid-template-columns: 1fr;
  }
}

.testi-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  cursor: pointer;
  position: relative;
}

.testi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(26, 142, 202, 0.4);
}

.testi-card-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.testi-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--primary-light);
  background: #f1f5f9;
}

.testi-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testi-card-header-info {
  flex-grow: 1;
  min-width: 0;
}

.testi-card-header-info .badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  margin-bottom: 4px;
  display: inline-block;
}

.testi-card-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 2px 0;
  line-height: 1.3;
}

.testi-card-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testi-card-quote {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-style: italic;
  color: #1e293b;
  line-height: 1.62;
  margin-bottom: 16px;
  flex-grow: 1;
  border-left: 3px solid var(--primary);
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  letter-spacing: 0.01em;
}

.testi-card-quote p {
  font-family: inherit;
  font-style: inherit;
  margin: 0;
}

.testi-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  gap: 8px;
}

.testi-card-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testi-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  position: relative;
  border-radius: 50%;
  background-color: #f1f5f9;
  color: var(--primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  text-decoration: none;
}

/* Àrea tàctil invisible mínima de 44x44px per a mòbils (WCAG 2.5.8) */
.testi-social-link::after,
.testi-card-footer .btn-open-testi::after,
.btn-open-testi::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
}

.testi-social-link:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.testi-social-link.ig:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-color: transparent;
  color: #ffffff;
}

.testi-social-link.fb:hover {
  background-color: #1877f2;
  border-color: #1877f2;
  color: #ffffff;
}

/* Links a la fitxa modal */
.testi-modal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px 0;
  padding: 12px 16px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.testi-modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  background-color: #ffffff;
  color: var(--primary-dark);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.testi-modal-link-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.testi-modal-link-btn.ig:hover {
  border-color: #d6249f;
  color: #d6249f;
}

.testi-modal-link-btn.fb:hover {
  border-color: #1877f2;
  color: #1877f2;
}

.testi-card-footer .btn-open-testi,
.btn-open-testi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  position: relative;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(20, 109, 153, 0.2);
  text-decoration: none;
}

.testi-card-footer .btn-open-testi:hover,
.btn-open-testi:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(20, 109, 153, 0.35);
}

.testi-card-footer .btn-open-testi svg,
.btn-open-testi svg {
  display: block;
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.testi-card-footer .btn-open-testi:hover svg,
.btn-open-testi:hover svg {
  transform: scale(1.12);
}

/* Modal Fitxa Completa (Nivell 2) */
.testi-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.testi-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
}

.testi-modal-container {
  position: relative;
  z-index: 10001;
  width: 100%;
  max-width: 1050px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.testi-modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 90vh;
}

.testi-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
}

.testi-modal-close {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: var(--transition);
}

.testi-modal-close:hover {
  color: #e11d48;
}

.testi-modal-body {
  padding: 28px;
  overflow-y: auto;
}

.testi-modal-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 860px) {
  .testi-modal-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .testi-modal-img-col {
    order: -1;
    margin-bottom: 8px;
  }

  .testi-modal-img-frame img {
    max-height: 280px;
  }
}

.testi-modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 6px 0;
}

.testi-modal-role {
  font-size: 0.95rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.testi-modal-highlight-box {
  background: #f0fdf4;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 18px 22px;
  margin-bottom: 22px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.65;
  color: #0f172a;
}

.testi-modal-highlight-box p {
  font-family: inherit;
  font-style: inherit;
  margin: 0;
}

.testi-modal-full-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #334155;
}

.testi-modal-full-text p {
  margin-bottom: 16px;
}

.testi-modal-full-text q {
  display: block;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--primary-dark);
  padding: 12px 18px;
  margin: 16px 0;
  background: #f8fafc;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.testi-modal-img-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background: #f8fafc;
  position: sticky;
  top: 0;
}

.testi-modal-img-frame img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.testi-modal-back-btn-wrapper,
.testi-modal-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.testi-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.testi-modal-counter {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.testi-empty-state {
  text-align: center;
  padding: 48px 20px;
  background: #f8fafc;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
}


/* ==========================================================================
   GALERIES CLÍNIQUES I IMATGES DE SERVEIS
   ========================================================================== */
.service-card-media {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f1f5f9;
  position: relative;
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-card-media img {
  transform: scale(1.035);
}

.service-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.service-card-body .service-title {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.service-card-body .service-desc {
  margin-bottom: 24px;
  line-height: 1.6;
}

.service-card-body .service-link {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 22px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary);
  background-color: #ffffff;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.service-card-body .service-link:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 114, 187, 0.25);
}

.clinic-hero-spotlight {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 35px;
}

@media (max-width: 860px) {
  .clinic-hero-spotlight {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

.clinic-hero-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: #f1f5f9;
  height: 260px;
}

.clinic-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.clinic-gallery-section {
  margin: 45px 0 25px;
}

.clinic-gallery-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.clinic-gallery-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

/* Galeria clínica neta d'imatges */
.clinic-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.clinic-gallery-card {
  position: relative;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.clinic-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.clinic-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.clinic-gallery-card:hover img {
  transform: scale(1.035);
}

.clinic-gallery-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M10.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0z'/%3E%3Cpath d='M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8zm8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7z'/%3E%3C/svg%3E") no-repeat center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.clinic-gallery-card:hover::after {
  opacity: 1;
}

.clinic-hero-media {
  cursor: pointer;
  position: relative;
}

.clinic-hero-media:hover img {
  transform: scale(1.03);
}

/* ==========================================================================
   LIGHTBOX CAROUSEL MODAL (VISUALITZADOR EN GRAN I CARRUSSEL)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.92);
  backdrop-filter: blur(8px);
}

.lightbox-content {
  position: relative;
  z-index: 100001;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 82vh;
  user-select: none;
}

.lightbox-img-wrapper img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  animation: lightboxZoomIn 0.25s ease-out;
}

@keyframes lightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.lightbox-nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 100002;
  user-select: none;
}

.lightbox-nav-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

@media (max-width: 640px) {
  .lightbox-nav-btn {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }
}

.lightbox-counter {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 18px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}