/* ==========================================================================
   SPE RIBAGORÇANA — PORTADA MODERNA OFICIAL
   Disseny Ultra-Modern per al Noguera Ribagorçana (Alfarràs, Lleida)
   ========================================================================== */

:root {
  --sperib-navy-dark: #081628;
  --sperib-navy: #0c2340;
  --sperib-navy-light: #16365c;
  --sperib-river-blue: #0284c7;
  --sperib-river-cyan: #06b6d4;
  --sperib-river-emerald: #10b981;
  --sperib-gold: #f59e0b;
  --sperib-gold-light: #fef3c7;
  --sperib-danger: #ef4444;
  --sperib-bg-gray: #f8fafc;
  --sperib-border: #e2e8f0;
  --sperib-text-main: #0f172a;
  --sperib-text-muted: #64748b;
  --sperib-text-light: #94a3b8;
  --sperib-font-title: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sperib-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sperib-radius-sm: 8px;
  --sperib-radius-md: 14px;
  --sperib-radius-lg: 22px;
  --sperib-radius-xl: 32px;
  --sperib-shadow-sm: 0 2px 4px rgba(12, 35, 64, 0.04);
  --sperib-shadow-md: 0 10px 25px -5px rgba(12, 35, 64, 0.08);
  --sperib-shadow-lg: 0 20px 40px -15px rgba(12, 35, 64, 0.16);
  --sperib-shadow-glow: 0 0 25px rgba(2, 132, 199, 0.35);
}

/* Ocultar taxativament qualsevol capçalera o peu antic d'Elementor o tema */
.elementor-location-header,
header#site-header,
header#masthead,
div[data-elementor-type="header"],
.elementor-location-footer,
footer#site-footer,
footer#colophon,
div[data-elementor-type="footer"],
.argpd-footer,
#menu-textos-legales-adapta-rgpd {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Reset bàsic del portal */
html {
  scroll-behavior: smooth;
}

body.sperib-portada-body {
  margin: 0 !important;
  padding: 0 !important;
  background-color: var(--sperib-bg-gray) !important;
  font-family: var(--sperib-font-body);
  color: var(--sperib-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

#sperib-portal {
  position: relative;
  overflow-x: clip;
  width: 100%;
}

.sperib-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Tipografia i títols */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--sperib-font-title);
  color: var(--sperib-navy);
  margin-top: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sperib-section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sperib-river-blue);
  background: rgba(2, 132, 199, 0.08);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.sperib-section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 50px auto;
}

.sperib-section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.sperib-section-sub {
  font-size: 1.1rem;
  color: var(--sperib-text-muted);
  line-height: 1.7;
}

.sperib-text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


/* ==========================================================================
   1. CAPÇALERA FLOTANT (HEADER) — ÀMPLIA, ELEGANTE I AIRADA
   ========================================================================== */
.sperib-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px 0;
  background: linear-gradient(180deg, rgba(8, 22, 40, 0.88) 0%, rgba(8, 22, 40, 0.5) 80%, transparent 100%);
}

.sperib-header.scrolled {
  background: rgba(8, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sperib-header .sperib-wrap {
  max-width: 1440px;
  padding: 0 36px;
  margin: 0 auto;
}

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

.sperib-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.sperib-brand-logo {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.sperib-brand:hover .sperib-brand-logo {
  transform: scale(1.05);
}

.sperib-brand-info {
  display: flex;
  flex-direction: column;
}

.sperib-brand-title {
  font-family: var(--sperib-font-title);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.sperib-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.sperib-nav {
  margin: 0 auto;
}

.sperib-nav-list {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sperib-nav-link {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.sperib-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.sperib-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.sperib-btn-wa-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 50px;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.sperib-btn-wa-header:hover {
  background: #10b981;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.sperib-btn-cta-header {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.sperib-btn-cta-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.6);
  color: #ffffff;
}

.sperib-burger {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.sperib-burger:hover {
  background: rgba(2, 132, 199, 0.4);
  border-color: #38bdf8;
}

.sperib-burger svg {
  display: block;
}

/* Selector d'idioma de capçalera */
.sperib-lang-box {
  position: relative;
}

.sperib-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.sperib-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.sperib-flag-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.sperib-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0c2340;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  padding: 6px;
  min-width: 175px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  backdrop-filter: blur(14px);
}

.sperib-lang-menu.open {
  display: flex;
}

.sperib-lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.sperib-lang-item:hover,
.sperib-lang-item.active {
  background: rgba(2, 132, 199, 0.25);
  color: #38bdf8;
}

.sperib-lang-item small {
  color: #94a3b8;
  font-size: 0.72rem;
  margin-left: auto;
}

/* Selector d'idioma al calaix mòbil */
.sperib-drawer-lang {
  margin: 15px 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sperib-drawer-lang-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sperib-drawer-lang-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sperib-drawer-lang-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}


/* ==========================================================================
   MENÚ DESPLEGABLE MÒBIL (DRAWER)
   ========================================================================== */
.sperib-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.sperib-drawer.open {
  display: block;
}

.sperib-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 35, 64, 0.65);
  backdrop-filter: blur(8px);
}

.sperib-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: #0c2340;
  color: #ffffff;
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.sperib-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sperib-drawer-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

.sperib-drawer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-item {
  color: #f1f5f9;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.04);
}

.drawer-item:hover {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

.drawer-item-highlight {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.3) 100%);
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.sperib-drawer-footer {
  margin-top: auto;
}

.sperib-btn-wa-full {
  display: block;
  text-align: center;
  background: #10b981;
  color: #ffffff;
  text-decoration: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
}


/* ==========================================================================
   2. HERO SECTION AMB VÍDEO CINEMÀTIC
   ========================================================================== */
.sperib-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px 0;
  box-sizing: border-box;
  background: var(--sperib-navy-dark);
  color: #ffffff;
  overflow: hidden;
}

.sperib-hero-video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.sperib-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85);
}

.sperib-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(8, 22, 40, 0.75) 0%, 
    rgba(12, 35, 64, 0.65) 50%, 
    rgba(8, 22, 40, 0.95) 100%);
}

.sperib-hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
}

.sperib-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.sperib-pill-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #f1f5f9;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sperib-pill-accent {
  background: rgba(2, 132, 199, 0.3);
  border-color: rgba(56, 189, 248, 0.5);
  color: #7dd3fc;
}

.sperib-hero-title {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.sperib-hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #cbd5e1;
  line-height: 1.65;
  max-width: 820px;
  margin-bottom: 36px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.sperib-hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 60px;
}

/* Botons generals */
.sperib-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sperib-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(2, 132, 199, 0.6);
  color: #ffffff;
}

.sperib-btn-secondary {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  color: #ffffff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s;
}

.sperib-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  color: #ffffff;
}

.sperib-btn-outline {
  display: inline-flex;
  align-items: center;
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 16px 22px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(8, 22, 40, 0.4);
  transition: all 0.2s;
}

.sperib-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Barra de mètriques */
.sperib-hero-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding: 20px 28px;
  background: rgba(8, 22, 40, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--sperib-radius-md);
  max-width: 860px;
}

.sperib-metric-item {
  display: flex;
  flex-direction: column;
}

.sperib-metric-num {
  font-family: var(--sperib-font-title);
  font-size: 1.25rem;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: -0.01em;
}

.sperib-metric-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
}

.sperib-metric-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.12);
}


/* ==========================================================================
   3. SECCIÓ COTO D'ALFARRÀS (ZPC NR-12)
   ========================================================================== */
.sperib-section {
  padding: 100px 0;
  position: relative;
}

.sperib-coto-section {
  background: #ffffff;
}

.sperib-coto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.sperib-coto-card {
  background: var(--sperib-bg-gray);
  border: 1px solid var(--sperib-border);
  border-radius: var(--sperib-radius-md);
  padding: 32px 26px;
  transition: all 0.3s;
}

.sperib-coto-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sperib-shadow-md);
  border-color: #bae6fd;
}

.sperib-coto-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.sperib-coto-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.sperib-coto-card p {
  color: var(--sperib-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Banner d'accions del Coto */
.sperib-coto-banner {
  background: linear-gradient(135deg, #0c2340 0%, #16365c 100%);
  border-radius: var(--sperib-radius-lg);
  padding: 40px;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  box-shadow: var(--sperib-shadow-lg);
}

.sperib-coto-banner-text h3 {
  color: #ffffff;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.sperib-coto-banner-text p {
  color: #cbd5e1;
  margin: 0;
  font-size: 1rem;
}

.sperib-coto-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sperib-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ef4444;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
  transition: all 0.2s;
}

.sperib-btn-download:hover {
  background: #dc2626;
  transform: translateY(-2px);
  color: #ffffff;
}

.sperib-btn-white {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  color: var(--sperib-navy);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: var(--sperib-shadow-sm);
  transition: all 0.2s;
}

.sperib-btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
}

.sperib-btn-outline-white {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 18px;
  border-radius: 50px;
  transition: all 0.2s;
}

.sperib-btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
}


/* ==========================================================================
   4. FES-TE SOCI: BENEFICIS I QUOTES DINÀMIQUES GESFEDECAT
   ========================================================================== */
.sperib-socis-section {
  background: var(--sperib-bg-gray);
}

.sperib-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.sperib-benefit-card {
  background: #ffffff;
  border: 1px solid var(--sperib-border);
  border-radius: var(--sperib-radius-md);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all 0.25s;
}

.sperib-benefit-card:hover {
  border-color: #38bdf8;
  box-shadow: var(--sperib-shadow-md);
  transform: translateY(-3px);
}

.sperib-benefit-icon {
  font-size: 1.8rem;
  line-height: 1;
  background: #e0f2fe;
  padding: 10px;
  border-radius: 12px;
}

.sperib-benefit-card h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--sperib-navy);
}

.sperib-benefit-card p {
  font-size: 0.9rem;
  color: var(--sperib-text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Quotes Header */
.sperib-cuotas-wrapper {
  background: #ffffff;
  border: 1px solid var(--sperib-border);
  border-radius: var(--sperib-radius-lg);
  padding: 40px;
  margin-bottom: 60px;
  box-shadow: var(--sperib-shadow-md);
}

.sperib-cuotas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 35px;
  border-bottom: 1px solid var(--sperib-border);
  padding-bottom: 20px;
}

.sperib-cuotas-title {
  font-size: 1.8rem;
  margin: 0 0 6px 0;
}

.sperib-cuotas-sync-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--sperib-text-muted);
  margin: 0;
}

.sperib-sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.sperib-badge-year {
  background: var(--sperib-gold-light);
  color: #b45309;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid #fde68a;
}

/* Pricing Grid */
.sperib-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.sperib-price-card {
  background: var(--sperib-bg-gray);
  border: 2px solid var(--sperib-border);
  border-radius: var(--sperib-radius-md);
  padding: 30px 20px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.sperib-price-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sperib-shadow-lg);
  border-color: #0284c7;
}

.sperib-price-featured {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.15);
}

.sperib-price-badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #0284c7;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}

.sperib-price-cat {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--sperib-navy);
  margin-bottom: 4px;
}

.sperib-price-age {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sperib-text-muted);
  margin-bottom: 18px;
}

.sperib-price-amount {
  margin-bottom: 16px;
}

.sperib-price-val {
  font-family: var(--sperib-font-title);
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--sperib-navy);
  line-height: 1;
}

.sperib-price-cur {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sperib-text-muted);
  margin-top: 4px;
}

.sperib-price-desc {
  font-size: 0.84rem;
  color: var(--sperib-text-muted);
  margin-bottom: 24px;
  flex-grow: 1;
}

.sperib-btn-price {
  background: var(--sperib-navy);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 50px;
  transition: all 0.2s;
}

.sperib-price-featured .sperib-btn-price {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.sperib-btn-price:hover {
  background: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   BANNER D'ALTA ONLINE (CTA PORTADA)
   ========================================================================== */
.sperib-alta-cta-banner {
  background: linear-gradient(135deg, #0c2340 0%, #0f355c 55%, #064e3b 100%);
  border-radius: 24px;
  padding: 38px 45px;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  box-shadow: 0 20px 50px rgba(12, 35, 64, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sperib-alta-cta-glow {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.sperib-alta-cta-content {
  flex: 1;
  max-width: 680px;
  z-index: 1;
}

.sperib-alta-cta-title {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-family: var(--sperib-font-title);
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.sperib-alta-cta-desc {
  font-size: 0.98rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0 0 18px 0;
}

.sperib-alta-cta-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sperib-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 50px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.sperib-alta-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 1;
}

.sperib-btn-cta-open {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 28px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.sperib-btn-cta-open:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  color: #ffffff;
}

.sperib-cta-note {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Badge edat */
.sperib-edad-badge {
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
}

.sperib-edad-badge.minor {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.sperib-edad-badge.adult {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Targeta Autorització Tutor Legal per a Menors */
.sperib-menor-legal-card {
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 24px;
  margin-top: 22px;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.1);
  animation: fadeIn 0.3s ease;
}

.sperib-menor-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 8px;
}

.sperib-menor-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.sperib-menor-title {
  margin: 0 0 4px 0;
  font-size: 1.12rem;
  color: #78350f;
  font-family: var(--sperib-font-title);
  font-weight: 800;
}

.sperib-menor-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.5;
}

.sperib-tutor-consent-box {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 15px;
}

/* ==========================================================================
   FINESTRA MODAL DEL FORMULARI D'ALTA ONLINE
   ========================================================================== */
.sperib-modal-form-wrap {
  z-index: 3200;
}

.sperib-modal-form-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  max-width: 920px;
  width: 95%;
  max-height: 90vh;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  z-index: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: speribModalPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sperib-modal-form-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #0c2340;
  color: #ffffff;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid #0284c7;
  flex-shrink: 0;
}

.sperib-modal-form-badge {
  display: inline-block;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.sperib-modal-form-title {
  margin: 0;
  font-size: 1.25rem;
  font-family: var(--sperib-font-title);
  color: #ffffff;
}

.sperib-modal-form-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.sperib-modal-form-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sperib-modal-form-close:hover {
  background: #ef4444;
  color: #ffffff;
  transform: rotate(90deg);
}

.sperib-modal-form-body {
  padding: 30px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sperib-modal-form-body .sperib-alta-form {
  margin: 0;
}

/* ==========================================================================
   TRAMITACIÓ D'ALTA DE SOCI I ORDRE SEPA 100% ONLINE AMB SIGNATURA DIGITAL
   ========================================================================== */
.sperib-alta-online-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid var(--sperib-border);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
  padding: 45px;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
}

.sperib-alta-online-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 35px auto;
}

.sperib-online-badge {
  display: inline-block;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.sperib-online-title {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-family: var(--sperib-font-title);
  color: var(--sperib-navy);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.sperib-online-sub {
  font-size: 1.02rem;
  color: var(--sperib-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Indicador de passos */
.sperib-alta-steps-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 35px;
  background: #f8fafc;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.sperib-step-tab {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 10px;
  transition: all 0.25s ease;
  background: transparent;
}

.sperib-step-tab.active {
  background: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid #e2e8f0;
}

.sperib-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.sperib-step-tab.active .sperib-step-circle {
  background: #0284c7;
  color: #ffffff;
}

.sperib-step-tab strong {
  display: block;
  font-size: 0.95rem;
  color: var(--sperib-navy);
}

.sperib-step-tab small {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
}

/* Blocs de formulari */
.sperib-form-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
}

.sperib-block-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e2e8f0;
}

.sperib-block-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.sperib-block-num {
  background: var(--sperib-navy);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
}

.sperib-block-title {
  margin: 0;
  font-size: 1.35rem;
  font-family: var(--sperib-font-title);
  color: var(--sperib-navy);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sperib-req-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #fef3c7;
  color: #b45309;
  padding: 3px 8px;
  border-radius: 50px;
  font-family: var(--sperib-font-body);
}

.sperib-opt-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 6px;
  border-radius: 4px;
}

.sperib-block-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

/* Graella de camps */
.sperib-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.sperib-col-2 {
  grid-column: span 2;
}

.sperib-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sperib-field-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}

.sperib-req {
  color: #ef4444;
}

.sperib-field-group input,
.sperib-field-group select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.sperib-field-group input:focus,
.sperib-field-group select:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3.5px rgba(2, 132, 199, 0.18);
  background: #ffffff;
}

.sperib-field-group input.sperib-invalid {
  border-color: #ef4444 !important;
  background: #fff5f5 !important;
}

/* Quota de soci bloquejada estrictament per edat */
.sperib-locked-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2.5px 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  letter-spacing: 0.02em;
}

.sperib-quota-locked-wrap {
  position: relative;
  width: 100%;
}

.sperib-select-locked {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  user-select: none !important;
  pointer-events: none !important; /* Totalment impossible de desplegar o canviar per l'usuari */
  opacity: 0.95;
}

.sperib-quota-hint {
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 5px;
  display: block;
}

.sperib-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.sperib-radio-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #334155;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.sperib-radio-lbl:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

.sperib-radio-lbl input:checked + span {
  font-weight: 700;
  color: #0284c7;
}

/* Caixa RGPD */
.sperib-rgpd-box {
  margin-top: 20px;
  padding: 14px 18px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.sperib-checkbox-lbl {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  cursor: pointer;
}

.sperib-checkbox-lbl input {
  margin-top: 3px;
  accent-color: #0284c7;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Secció de signatura */
.sperib-signature-section {
  margin-top: 24px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px;
}

.sperib-sig-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 14px;
}

.sperib-sig-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--sperib-navy);
  display: block;
}

.sperib-sig-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin: 3px 0 0 0;
}

.sperib-btn-clear-sig {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.sperib-btn-clear-sig:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.sperib-canvas-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  overflow: hidden;
  touch-action: none;
}

.sperib-canvas-wrap.sperib-sig-error {
  border-color: #ef4444 !important;
  background: #fff5f5;
}

.sperib-sig-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  position: relative;
  z-index: 2;
}

.sperib-canvas-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.sperib-canvas-line {
  position: absolute;
  bottom: 35px;
  left: 25px;
  right: 25px;
  height: 1px;
  border-bottom: 1px dotted #e2e8f0;
  pointer-events: none;
  z-index: 1;
}

/* ================= SEPA BLOC ================= */
.sperib-block-sepa {
  background: #ffffff;
  border: 2px solid #e2e8f0;
}

.sperib-sepa-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
}

.sperib-sepa-toggle-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sperib-sepa-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.sperib-sepa-headline {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-family: var(--sperib-font-title);
  color: var(--sperib-navy);
}

.sperib-sepa-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  max-width: 650px;
}

/* Switch control */
.sperib-switch-control {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  flex-shrink: 0;
}

.sperib-switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
}

.sperib-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 34px;
}

.sperib-switch-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sperib-switch-control input:checked + .sperib-switch-slider {
  background-color: #10b981;
}

.sperib-switch-control input:checked + .sperib-switch-slider:before {
  transform: translateX(24px);
}

/* Desplegable SEPA */
.sperib-sepa-fields-collapse {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 1px solid #e2e8f0;
}

.sperib-sepa-autofill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.sperib-sepa-tag {
  font-size: 0.76rem;
  font-weight: 800;
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.sperib-btn-autofill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sperib-btn-autofill:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.sperib-acreedor-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 15px 18px;
}

.sperib-acreedor-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.sperib-acreedor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  font-size: 0.85rem;
  color: #334155;
}

.sperib-iban-input {
  font-family: monospace !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  color: #0369a1 !important;
}

.sperib-sepa-legal-box {
  margin: 20px 0;
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.sperib-sepa-legal-box p {
  margin: 0;
}

/* ================= BARRA D'ACCIONS FINALS ================= */
.sperib-alta-actions-bar {
  margin-top: 30px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.sperib-alta-actions-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: #64748b;
  margin-bottom: 20px;
}

.sperib-lock-icon {
  font-size: 1.2rem;
}

.sperib-alta-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.sperib-btn-action-pdf {
  flex: 1;
  min-width: 250px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #dc2626;
  border: 2px solid #dc2626;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15);
  transition: all 0.25s ease;
}

.sperib-btn-action-pdf:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
}

.sperib-btn-action-submit {
  flex: 1.4;
  min-width: 280px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4);
  transition: all 0.25s ease;
}

.sperib-btn-action-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(2, 132, 199, 0.6);
  color: #ffffff;
}

.sperib-btn-action-submit:disabled,
.sperib-btn-action-pdf:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.sperib-alta-status-msg {
  margin-top: 18px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
}

.sperib-alta-status-msg.error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.sperib-alta-status-msg.loading {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.sperib-alta-status-msg.success {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

/* ================= MODAL DE CONFIRMACIÓ ================= */
.sperib-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sperib-modal.open,
.sperib-modal.active {
  display: flex !important;
}

.sperib-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 35, 64, 0.75);
  backdrop-filter: blur(8px);
}

.sperib-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  padding: 35px 30px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  text-align: center;
  z-index: 2;
  animation: speribModalPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes speribModalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sperib-modal-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 15px;
}

.sperib-modal-title {
  margin: 0 0 10px 0;
  font-size: 1.55rem;
  color: var(--sperib-navy);
  font-family: var(--sperib-font-title);
}

.sperib-modal-lead {
  font-size: 0.96rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 20px;
}

.sperib-modal-ref-box {
  background: #f0fdf4;
  border: 1px dashed #22c55e;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
}

.sperib-modal-ref-box span {
  display: block;
  font-size: 0.78rem;
  color: #166534;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sperib-modal-ref-box strong {
  font-family: monospace;
  font-size: 1.45rem;
  color: #15803d;
  letter-spacing: 0.08em;
}

.sperib-modal-note {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 25px 0;
}

.sperib-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sperib-btn-modal-pdf {
  background: #ef4444;
  color: #ffffff;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.sperib-btn-modal-pdf:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.sperib-btn-modal-close {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sperib-btn-modal-close:hover {
  background: #e2e8f0;
}

@media (max-width: 768px) {
  .sperib-alta-online-card {
    padding: 24px 18px;
  }
  .sperib-form-grid {
    grid-template-columns: 1fr;
  }
  .sperib-col-2 {
    grid-column: span 1;
  }
  .sperib-sepa-toggle-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .sperib-alta-buttons-group {
    flex-direction: column;
  }
  .sperib-btn-action-pdf,
  .sperib-btn-action-submit {
    width: 100%;
  }
}

/* Procediment Alta Pas a Pas (Fallback) */
.sperib-alta-procedure {
  background: #ffffff;
  border: 1px solid var(--sperib-border);
  border-radius: var(--sperib-radius-lg);
  padding: 40px;
}

.sperib-alta-title {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.sperib-alta-sub {
  color: var(--sperib-text-muted);
  margin-bottom: 30px;
}

.sperib-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.sperib-step-box {
  background: var(--sperib-bg-gray);
  border-radius: var(--sperib-radius-md);
  padding: 24px;
  border: 1px solid var(--sperib-border);
}

.sperib-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sperib-navy);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.sperib-step-box h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.sperib-step-box p {
  font-size: 0.88rem;
  color: var(--sperib-text-muted);
  margin-bottom: 14px;
}

.sperib-step-downloads {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sperib-btn-mini-pdf {
  background: #fee2e2;
  color: #b91c1c;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
}

.sperib-btn-mini-pdf:hover {
  background: #ef4444;
  color: #ffffff;
}

.sperib-btn-mini-doc {
  background: #e0f2fe;
  color: #0369a1;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
}

.sperib-btn-mini-doc:hover {
  background: #0284c7;
  color: #ffffff;
}

.sperib-iban-tag {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #0f172a;
}

.sperib-step-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sperib-mail-pill, .sperib-wa-pill {
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 6px;
}

.sperib-mail-pill {
  background: #f1f5f9;
  color: #334155;
}

.sperib-wa-pill {
  background: #dcfce7;
  color: #15803d;
}


/* ==========================================================================
   5. CALENDARI CONTINENTAL 2026 (GESPESCAT 909)
   ========================================================================== */
.sperib-calendar-section {
  background: #ffffff;
}

.sperib-calendar-top-downloads {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.sperib-btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ef4444;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  transition: all 0.2s;
}

.sperib-btn-pdf:hover {
  background: #dc2626;
  color: #ffffff;
  transform: translateY(-2px);
}

.sperib-btn-excel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #10b981;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  transition: all 0.2s;
}

.sperib-btn-excel:hover {
  background: #059669;
  color: #ffffff;
  transform: translateY(-2px);
}

.sperib-cal-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 35px;
}

.sperib-cal-tab-btn {
  background: var(--sperib-bg-gray);
  border: 1.5px solid var(--sperib-border);
  color: var(--sperib-navy);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.sperib-cal-tab-btn.active {
  background: var(--sperib-navy);
  color: #ffffff;
  border-color: var(--sperib-navy);
  box-shadow: var(--sperib-shadow-md);
}

.sperib-cal-tab-content {
  display: none;
}

.sperib-cal-tab-content.active {
  display: block;
}

/* Concursos Grid */
.sperib-concursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.sperib-concurs-card {
  background: var(--sperib-bg-gray);
  border: 1px solid var(--sperib-border);
  border-radius: var(--sperib-radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.25s;
}

.sperib-concurs-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sperib-shadow-md);
  border-color: #38bdf8;
}

.sperib-concurs-date {
  background: var(--sperib-navy);
  color: #ffffff;
  min-width: 72px;
  padding: 12px 6px;
  border-radius: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.sperib-concurs-date.champ {
  background: #d97706;
}

.sperib-day {
  font-family: var(--sperib-font-title);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
}

.sperib-month {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.sperib-concurs-body {
  flex-grow: 1;
}

.sperib-concurs-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.sperib-concurs-cat.social { background: #e0f2fe; color: #0369a1; }
.sperib-concurs-cat.open { background: #dcfce7; color: #15803d; }
.sperib-concurs-cat.festa { background: #fef3c7; color: #b45309; }
.sperib-concurs-cat.champ { background: #fed7aa; color: #c2410c; }
.sperib-concurs-cat.canceled { background: #fee2e2; color: #b91c1c; }

.sperib-concurs-name {
  font-size: 1.05rem;
  margin: 0 0 6px 0;
  color: var(--sperib-navy);
}

.sperib-concurs-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--sperib-text-muted);
}

.sperib-concurs-status {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.sperib-concurs-status.confirmed { background: #dcfce7; color: #166534; }
.sperib-concurs-status.official { background: #fef3c7; color: #92400e; }
.sperib-concurs-status.canceled { background: #fee2e2; color: #991b1b; }

.sperib-concurs-card.canceled-card {
  opacity: 0.65;
  background: #fff5f5;
  border-color: #fecaca;
}

/* Iframe Embed de Butxaca */
.sperib-iframe-container {
  max-width: 820px;
  margin: 0 auto;
  border-radius: var(--sperib-radius-lg);
  overflow: hidden;
  box-shadow: var(--sperib-shadow-lg);
  border: 1px solid var(--sperib-border);
}

.sperib-pocket-frame {
  width: 100%;
  height: 820px;
  border: none;
  display: block;
}


/* ==========================================================================
   6. TALLERS DE PESCA INFANTIL
   ========================================================================== */
.sperib-tallers-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
}

.sperib-tallers-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
}

.sperib-tallers-img-card {
  position: relative;
  border-radius: var(--sperib-radius-lg);
  overflow: hidden;
  box-shadow: var(--sperib-shadow-lg);
  max-height: 540px;
}

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

.sperib-tallers-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(12, 35, 64, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.9rem;
}

.sperib-tallers-points {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 30px 0;
}

.sperib-point-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.sperib-point-icon {
  font-size: 1.5rem;
  background: #ffffff;
  padding: 8px;
  border-radius: 10px;
  box-shadow: var(--sperib-shadow-sm);
  line-height: 1;
}

.sperib-point-item strong {
  display: block;
  font-size: 1.05rem;
  color: var(--sperib-navy);
  margin-bottom: 3px;
}

.sperib-point-item p {
  font-size: 0.9rem;
  color: var(--sperib-text-muted);
  margin: 0;
}

.sperib-tallers-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.sperib-tallers-note {
  font-size: 0.85rem;
  color: var(--sperib-text-muted);
  font-weight: 600;
}


/* ==========================================================================
   7. ÈXITS ESPORTIUS
   ========================================================================== */
.sperib-exits-section {
  background: #ffffff;
}

.sperib-exits-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.sperib-exits-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.sperib-exit-box {
  background: var(--sperib-bg-gray);
  border: 1px solid var(--sperib-border);
  border-radius: var(--sperib-radius-md);
  padding: 24px;
  transition: all 0.25s;
}

.sperib-exit-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--sperib-shadow-md);
  border-color: #f59e0b;
}

.sperib-trophy {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 12px;
}

.sperib-exit-box h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.sperib-exit-box p {
  font-size: 0.88rem;
  color: var(--sperib-text-muted);
  margin: 0;
  line-height: 1.5;
}

.sperib-exits-img-wrapper {
  position: relative;
  border-radius: var(--sperib-radius-lg);
  overflow: hidden;
  box-shadow: var(--sperib-shadow-lg);
}

.sperib-exits-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 22, 40, 0.9) 100%);
  color: #ffffff;
  padding: 30px 20px 20px 20px;
  font-weight: 800;
  font-size: 0.95rem;
}


/* ==========================================================================
   8. NOTÍCIES DEL CLUB
   ========================================================================== */
.sperib-news-section {
  background: var(--sperib-bg-gray);
}

.sperib-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 26px;
}

.sperib-news-card {
  background: #ffffff;
  border-radius: var(--sperib-radius-md);
  overflow: hidden;
  box-shadow: var(--sperib-shadow-sm);
  border: 1px solid var(--sperib-border);
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.sperib-news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sperib-shadow-lg);
}

.sperib-news-img-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.sperib-news-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.sperib-news-card:hover .sperib-news-thumb {
  transform: scale(1.06);
}

.sperib-news-cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(12, 35, 64, 0.85);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
}

.sperib-news-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.sperib-news-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sperib-text-muted);
  margin-bottom: 8px;
}

.sperib-news-title {
  font-size: 1.15rem;
  margin: 0 0 16px 0;
  line-height: 1.4;
  flex-grow: 1;
}

.sperib-news-title a {
  color: var(--sperib-navy);
  text-decoration: none;
  transition: color 0.2s;
}

.sperib-news-title a:hover {
  color: var(--sperib-river-blue);
}

.sperib-news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sperib-river-blue);
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  transition: gap 0.2s;
}

.sperib-news-read-more:hover {
  gap: 10px;
}


/* ==========================================================================
   9. EL TEMPS I SPONSORS
   ========================================================================== */
.sperib-weather-box {
  background: linear-gradient(135deg, #0c2340 0%, #1e3a5f 100%);
  border-radius: var(--sperib-radius-lg);
  padding: 50px 40px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.sperib-weather-info h3 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.sperib-weather-info p {
  color: #cbd5e1;
  max-width: 500px;
  margin-bottom: 24px;
}

.sperib-weather-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sperib-weather-widget-mock {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--sperib-radius-md);
  padding: 24px 30px;
  text-align: center;
}

.sperib-weather-badge {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sperib-weather-temp {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--sperib-font-title);
  line-height: 1;
}

.sperib-weather-cond {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 6px 0 12px 0;
}

.sperib-weather-coords {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Sponsors */
.sperib-sponsors-section {
  background: #ffffff;
  padding: 60px 0;
  border-top: 1px solid var(--sperib-border);
}

.sperib-sponsors-title {
  text-align: center;
  font-size: 1.15rem;
  color: var(--sperib-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 35px;
}

.sperib-sponsors-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
}

.sperib-sponsor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  filter: grayscale(1);
  opacity: 0.75;
  transition: all 0.3s;
}

.sperib-sponsor-item:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-3px);
}

.sperib-sponsor-item span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sperib-text-muted);
}


/* ==========================================================================
   10. PEU DE PÀGINA (FOOTER)
   ========================================================================== */
.sperib-footer {
  background: var(--sperib-navy-dark);
  color: #cbd5e1;
  padding-top: 80px;
}

.sperib-footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.3fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.sperib-footer-about {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #94a3b8;
}

.sperib-footer-col-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.sperib-footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: #0284c7;
}

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

.sperib-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.sperib-footer-links a:hover {
  color: #38bdf8;
}

.sperib-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.88rem;
}

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

.sperib-contact-list a {
  color: #38bdf8;
  text-decoration: none;
}

.sperib-social-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sperib-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  transition: all 0.2s;
}

.sperib-social-btn:hover {
  background: rgba(2, 132, 199, 0.3);
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.sperib-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
}

.sperib-footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.82rem;
  color: #64748b;
}

.sperib-footer-bottom-inner p {
  margin: 0;
}

.sperib-legal-links {
  display: flex;
  gap: 10px;
}

.sperib-legal-links a {
  color: #94a3b8;
  text-decoration: none;
}

.sperib-legal-links a:hover {
  color: #38bdf8;
}


/* ==========================================================================
   11. BARRA FLOTANT (FAB)
   ========================================================================== */
.sperib-fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.sperib-fab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sperib-fab-btn:hover {
  transform: translateY(-4px) scale(1.05);
}

.sperib-fab-wa {
  background: #25d366;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.9rem;
  gap: 8px;
  animation: sperib-pulse 2.5s infinite;
}

@keyframes sperib-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.sperib-fab-soci {
  background: var(--sperib-navy);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.sperib-fab-top {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--sperib-navy);
  opacity: 0;
  visibility: hidden;
  margin-left: auto;
}

.sperib-fab-top.visible {
  opacity: 1;
  visibility: visible;
}


/* ==========================================================================
   SLIDER DE FOTOGRAFIES DEL COTO D'ALFARRÀS (ZPC NR-12)
   ========================================================================== */
.sperib-coto-slider-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 50px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  background: #0c2340;
}

.sperib-slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #10b981 100%);
  z-index: 25;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
  pointer-events: none;
  transition: width 0.04s linear;
}

.sperib-coto-slider {
  position: relative;
  width: 100%;
  height: 480px;
}

.sperib-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: scale(1.02);
}

.sperib-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.sperib-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sperib-slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 25px 30px;
  background: linear-gradient(to top, rgba(12, 35, 64, 0.95) 0%, rgba(12, 35, 64, 0.6) 70%, transparent 100%);
  color: #ffffff;
}

.sperib-slide-badge {
  display: inline-block;
  background: #0284c7;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.sperib-slide-caption h4 {
  font-size: 1.45rem;
  margin: 0 0 6px 0;
  color: #ffffff;
  font-family: var(--sperib-font-title);
}

.sperib-slide-caption p {
  margin: 0;
  font-size: 0.95rem;
  color: #cbd5e1;
  max-width: 650px;
}

.sperib-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 35, 64, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 10;
}

.sperib-slider-arrow:hover {
  background: #0284c7;
  border-color: #0284c7;
  transform: translateY(-50%) scale(1.1);
}

.sperib-slider-arrow.prev {
  left: 18px;
}

.sperib-slider-arrow.next {
  right: 18px;
}

.sperib-slider-dots {
  position: absolute;
  bottom: 20px;
  right: 25px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.sperib-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.sperib-dot.active {
  width: 28px;
  border-radius: 10px;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

/* ==========================================================================
   CHATBOT INTEL·LIGENT (RIBA-BOT) — UBICAT A L'ESQUERRA PER NO TAPAR EL BOTÓ D'INICI
   ========================================================================== */
.sperib-chatbot-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: auto;
  z-index: 1200;
  font-family: var(--sperib-font-body);
}

.sperib-chatbot-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 12px 18px;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.45);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sperib-chatbot-trigger:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.6);
}

.sperib-chatbot-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50px;
  border: 2px solid #38bdf8;
  animation: speribBotPulse 2s infinite;
  pointer-events: none;
}

@keyframes speribBotPulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.06); opacity: 0.3; }
  100% { transform: scale(1.12); opacity: 0; }
}

.sperib-chatbot-icon {
  font-size: 1.25rem;
}

.sperib-chatbot-label {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

/* Finestra flotant del xat */
.sperib-chat-window {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 0;
  right: auto;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 550px;
  max-height: calc(100vh - 120px);
  background: #0c2340;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sperib-chat-window.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.sperib-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #07192f 0%, #0c2340 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sperib-chat-bot-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sperib-chat-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.sperib-chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sperib-chat-online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0c2340;
}

.sperib-chat-bot-name {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
}

.sperib-chat-bot-status {
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 600;
}

.sperib-chat-header-actions {
  display: flex;
  gap: 8px;
}

#sperib-chatbot .sperib-chat-btn-min,
#sperib-chatbot .sperib-chat-btn-close,
.sperib-chat-window .sperib-chat-btn-min,
.sperib-chat-window .sperib-chat-btn-close {
  background: rgba(255, 255, 255, 0.12) !important;
  background-color: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#sperib-chatbot .sperib-chat-btn-min svg,
#sperib-chatbot .sperib-chat-btn-close svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

#sperib-chatbot .sperib-chat-btn-min:hover,
.sperib-chat-window .sperib-chat-btn-min:hover {
  background: rgba(2, 132, 199, 0.8) !important;
  background-color: rgba(2, 132, 199, 0.8) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

#sperib-chatbot .sperib-chat-btn-close:hover,
.sperib-chat-window .sperib-chat-btn-close:hover {
  background: rgba(239, 68, 68, 0.85) !important;
  background-color: rgba(239, 68, 68, 0.85) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.sperib-chat-body {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: radial-gradient(circle at top right, rgba(2, 132, 199, 0.08), transparent 70%);
}

.sperib-chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: speribFadeInMsg 0.25s ease;
}

@keyframes speribFadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sperib-chat-msg.bot {
  align-self: flex-start;
}

.sperib-chat-msg.user {
  align-self: flex-end;
}

.sperib-chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sperib-chat-msg.bot .sperib-chat-bubble {
  background: #1e3a5f;
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.sperib-chat-msg.user .sperib-chat-bubble {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.sperib-chat-time {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 4px;
  padding: 0 4px;
}

.sperib-chat-msg.user .sperib-chat-time {
  align-self: flex-end;
}

#sperib-chatbot .sperib-chat-chips,
.sperib-chat-window .sperib-chat-chips {
  padding: 10px 14px !important;
  display: flex !important;
  flex-wrap: wrap !important; /* Permet que els botons baixin de línia perquè MAI es talli cap text */
  gap: 7px !important;
  background: #07192f !important;
  background-color: #07192f !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  max-height: 125px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(56, 189, 248, 0.4) transparent !important;
}

#sperib-chatbot .sperib-chat-chips::-webkit-scrollbar,
.sperib-chat-window .sperib-chat-chips::-webkit-scrollbar {
  width: 4px !important;
  display: block !important;
}

#sperib-chatbot .sperib-chat-chips::-webkit-scrollbar-thumb,
.sperib-chat-window .sperib-chat-chips::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4) !important;
  border-radius: 4px !important;
}

/* Botons de preguntes ràpides (Chips) — Màxima especificitat i contrast */
#sperib-chatbot .sperib-chip,
.sperib-chat-window .sperib-chip,
button.sperib-chip {
  background: #0e2947 !important;
  background-color: #0e2947 !important;
  border: 1.5px solid #0284c7 !important;
  color: #f0f9ff !important;
  font-size: 0.81rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  padding: 6px 12px !important;
  border-radius: 50px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  outline: none !important;
  text-align: left !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  font-family: inherit !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#sperib-chatbot .sperib-chip:hover,
.sperib-chat-window .sperib-chip:hover,
button.sperib-chip:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  background-color: #0284c7 !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.5) !important;
}

#sperib-chatbot .sperib-chip:active,
.sperib-chat-window .sperib-chip:active,
button.sperib-chip:active {
  transform: translateY(0) !important;
}

#sperib-chatbot .sperib-chat-form,
.sperib-chat-window .sperib-chat-form {
  padding: 12px 14px !important;
  background: #07192f !important;
  background-color: #07192f !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

#sperib-chatbot .sperib-chat-input,
.sperib-chat-window .sperib-chat-input {
  flex: 1 !important;
  background: #0e2947 !important;
  background-color: #0e2947 !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 50px !important;
  padding: 10px 16px !important;
  color: #ffffff !important;
  font-size: 0.88rem !important;
  outline: none !important;
  font-family: inherit !important;
  box-shadow: none !important;
  transition: all 0.2s ease !important;
}

#sperib-chatbot .sperib-chat-input::placeholder,
.sperib-chat-window .sperib-chat-input::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
}

#sperib-chatbot .sperib-chat-input:focus,
.sperib-chat-window .sperib-chat-input:focus {
  border-color: #38bdf8 !important;
  background: #123356 !important;
  background-color: #123356 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

#sperib-chatbot .sperib-chat-send,
.sperib-chat-window .sperib-chat-send,
button.sperib-chat-send {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  background-color: #0284c7 !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #ffffff !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#sperib-chatbot .sperib-chat-send svg,
.sperib-chat-window .sperib-chat-send svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

#sperib-chatbot .sperib-chat-send:hover,
.sperib-chat-window .sperib-chat-send:hover,
button.sperib-chat-send:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%) !important;
  background-color: #0369a1 !important;
  border-color: #38bdf8 !important;
  transform: scale(1.06) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.6) !important;
}


/* ==========================================================================
   12. RESPONSIVE MEDIA QUERIES (HAMBURGER NOMÉS EN MÒBIL / TAULETA <= 991px)
   ========================================================================== */
@media (min-width: 992px) {
  .sperib-burger {
    display: none !important;
  }
  .sperib-nav {
    display: block !important;
  }
}

@media (max-width: 1024px) {
  .sperib-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .sperib-tallers-layout,
  .sperib-exits-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  /* 1. Capçalera compacta i Menú Hamburguesa ultra-visible */
  .sperib-header {
    padding: 10px 0 !important;
  }
  .sperib-header .sperib-wrap {
    padding: 0 14px !important;
  }
  .sperib-header-inner {
    gap: 8px !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  .sperib-brand {
    gap: 8px !important;
    max-width: 65% !important;
    flex-shrink: 1 !important;
  }
  .sperib-brand-logo {
    height: 38px !important;
    width: auto !important;
  }
  .sperib-brand-title {
    font-size: 1.05rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .sperib-brand-sub {
    display: none !important;
  }
  .sperib-nav {
    display: none !important;
  }
  .sperib-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    justify-content: flex-end !important;
  }
  /* Ocultar botons grans a la barra superior en mòbil per no desbordar */
  .sperib-btn-cta-header {
    display: none !important;
  }
  .sperib-btn-wa-header {
    display: none !important;
  }
  /* BOTÓ HAMBURGUESA — SEMPRE VISIBLE, DESTACAT I CLICABLE A MÒBILS */
  .sperib-burger {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
    background: rgba(2, 132, 199, 0.25) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    z-index: 100 !important;
    flex-shrink: 0 !important;
  }
  .sperib-burger svg {
    stroke: #ffffff !important;
    display: block !important;
  }

  /* 2. Banner de Tramitació Online a Mòbils */
  .sperib-alta-cta-banner {
    flex-direction: column !important;
    padding: 26px 18px !important;
    text-align: center !important;
    gap: 20px !important;
    border-radius: 18px !important;
    margin-bottom: 35px !important;
  }
  .sperib-alta-cta-content {
    max-width: 100% !important;
  }
  .sperib-alta-cta-title {
    font-size: 1.4rem !important;
  }
  .sperib-alta-cta-desc {
    font-size: 0.88rem !important;
    margin-bottom: 14px !important;
  }
  .sperib-alta-cta-features {
    justify-content: center !important;
    gap: 6px !important;
  }
  .sperib-feature-pill {
    font-size: 0.75rem !important;
    padding: 5px 10px !important;
  }
  .sperib-alta-cta-actions {
    width: 100% !important;
  }
  .sperib-btn-cta-open {
    width: 100% !important;
    justify-content: center !important;
    padding: 15px 20px !important;
    font-size: 1rem !important;
    box-sizing: border-box !important;
  }

  /* 3. Modal Dialog i Formulari a Mòbils */
  .sperib-modal {
    padding: 10px !important;
  }
  .sperib-modal-form-dialog {
    width: 100% !important;
    max-width: 100% !important;
    height: 94vh !important;
    max-height: 94vh !important;
    border-radius: 16px !important;
  }
  .sperib-modal-form-header {
    padding: 14px 16px !important;
  }
  .sperib-modal-form-title {
    font-size: 1.05rem !important;
  }
  .sperib-modal-form-subtitle {
    font-size: 0.75rem !important;
  }
  .sperib-modal-form-body {
    padding: 16px 12px !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .sperib-form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .sperib-col-2 {
    grid-column: span 1 !important;
  }
  .sperib-alta-procedure {
    padding: 24px 16px !important;
  }

  /* Slider & Chatbot */
  .sperib-coto-slider {
    height: 320px;
  }
  .sperib-slide-caption {
    padding: 20px 16px 16px 16px;
  }
  .sperib-slide-caption h4 {
    font-size: 1.15rem;
  }
  .sperib-slide-caption p {
    font-size: 0.82rem;
  }
  .sperib-slider-arrow {
    width: 36px;
    height: 36px;
  }
  .sperib-chatbot-widget {
    bottom: 24px;
    left: 16px;
    right: auto;
  }
  .sperib-chat-window {
    width: calc(100vw - 32px);
    height: 480px;
    bottom: calc(100% + 10px);
    left: 0;
    right: auto;
  }
}

@media (max-width: 768px) {
  .sperib-hero {
    padding-top: 110px;
  }
  .sperib-hero-metrics {
    gap: 14px;
  }
  .sperib-metric-divider {
    display: none;
  }
  .sperib-footer-inner {
    grid-template-columns: 1fr;
  }
  .sperib-fab-text {
    display: none;
  }
  .sperib-fab-wa {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
  }
}
