/* ==========================================================================
   JABALAB — página de inicio (index.html). Lo compartido está en site.css.
   ========================================================================== */

/* ===== CANVAS PARTÍCULAS ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== GLOW ORBS ===== */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s;
}
.glow-orb.orb-1 {
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  background: radial-gradient(circle, var(--primary), transparent);
  top: 10%;
  right: -100px;
}
.glow-orb.orb-2 {
  width: min(350px, 70vw);
  height: min(350px, 70vw);
  background: radial-gradient(circle, var(--accent), transparent);
  top: 50%;
  left: -80px;
}
.glow-orb.orb-3 {
  width: min(400px, 80vw);
  height: min(400px, 80vw);
  background: radial-gradient(circle, var(--primary), transparent);
  bottom: 10%;
  right: -50px;
}
[data-theme="dark"] .glow-orb {
  opacity: 0.2;
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3rem) calc(var(--gutter) + var(--safe-right)) clamp(2rem, 5vw, 3rem) calc(var(--gutter) + var(--safe-left));
  position: relative;
  z-index: 1;
  background: transparent;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: min(700px, 100vw);
  height: min(700px, 100vw);
  background: radial-gradient(circle, var(--hero-overlay-1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: min(600px, 100vw);
  height: min(600px, 100vw);
  background: radial-gradient(circle, var(--hero-overlay-2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 700px;
  flex: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--primary-text);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(2rem, 1.2rem + 4vw, 4.5rem);
  text-wrap: balance;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
[data-theme="dark"] .hero h1 {
  color: #fff;
}

.hero p {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 550px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary {
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 30px rgba(18, 186, 56, 0.35);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.btn-primary:hover::before {
  left: 100%;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(18, 186, 56, 0.5);
}

.btn-secondary {
  padding: 1rem 2.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
  text-decoration: none;
  display: inline-block;
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(18, 186, 56, 0.08);
  transform: translateY(-3px);
  color: var(--text-primary);
}

/* Hero cards */
.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem 1.8rem;
  width: 420px;
  flex-shrink: 0;
  align-items: start;
}
.float-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  transition: all 0.3s;
  cursor: default;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  animation: float 6s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.float-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
  animation: liquidShimmer 12s ease-in-out infinite alternate;
}

.float-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  animation-delay: 0s;
}
.float-card:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  animation-delay: -2s;
}
.float-card:nth-child(3) {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-top: 2.5rem;
  animation-delay: -4s;
}
.float-card:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin-top: 2.5rem;
  animation-delay: -1s;
}

.float-card:nth-child(1) .icon { background: rgba(18, 186, 56, 0.2); }
.float-card:nth-child(2) .icon { background: rgba(128, 128, 128, 0.2); }
.float-card:nth-child(3) .icon { background: rgba(18, 186, 56, 0.15); }
.float-card:nth-child(4) .icon { background: rgba(128, 128, 128, 0.15); }

.float-card:hover {
  transform: scale(1.04);
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(18, 186, 56, 0.15);
}
.float-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}
.float-card .float-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}
.float-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}
.float-card a {
  color: var(--primary-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.2rem;
}
.float-card a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
[data-theme="dark"] .float-card .float-card-title {
  color: #fff;
}
[data-theme="dark"] .float-card p {
  color: rgba(255, 255, 255, 0.6);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes liquidShimmer {
  0% { transform: translate(0%, 0%) rotate(0deg); }
  50% { transform: translate(3%, -3%) rotate(2deg); }
  100% { transform: translate(-2%, 4%) rotate(-1deg); }
}

/* Hero responsive — breakpoints: 1280 / 1024 / 768 / 480 */
@media (max-width: 1280px) {
  .hero-cards {
    width: 360px;
    gap: 1rem 1.2rem;
  }
  .float-card {
    padding: 1rem 1.2rem;
  }
  .float-card .float-card-title { font-size: 0.8rem; }
  .float-card p { font-size: 0.7rem; }
  .float-card:nth-child(3),
  .float-card:nth-child(4) {
    margin-top: 1.8rem;
  }
}
@media (max-width: 1024px) {
  .hero-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-content {
    max-width: 680px;
  }
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-btns,
  .hero-badge {
    justify-content: center;
  }
  .hero-cards {
    width: 100%;
    max-width: 520px;
    gap: 1rem;
  }
  /* Misma especificidad que .float-card:nth-child(n) y declarada después */
  .hero-cards .float-card {
    align-self: stretch;
    margin-top: 0;
    text-align: left;
  }
  .float-card .float-card-title { font-size: 0.9rem; }
  .float-card p { font-size: 0.78rem; }
  .float-card a { font-size: 0.78rem; }
}
@media (max-width: 768px) {
  .hero {
    min-height: auto;
  }
}
@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.72rem;
    padding: 0.4rem 0.9rem;
    text-align: center;
  }
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-btns a {
    text-align: center;
  }
  .hero-cards {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
  .hero-cards .float-card {
    grid-column: auto;
    grid-row: auto;
  }
}

/* ===== SECCIONES ===== */
.section {
  padding: clamp(2.5rem, 6vw, 5rem) calc(var(--gutter) + var(--safe-right)) clamp(2.5rem, 6vw, 5rem) calc(var(--gutter) + var(--safe-left));
  position: relative;
  z-index: 1;
  /* El navegador no calcula ni pinta las secciones fuera de pantalla (ni sus animaciones)
     hasta que el usuario se acerca; "auto" recuerda la altura real una vez mostrada. */
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}
.section-glass {
  background: var(--section-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: clamp(24px, 4vw, 48px);
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1rem, 3.5vw, 2.5rem);
  box-shadow: var(--glass-shadow);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}
.section-glass::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.05) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(18,186,56,0.02) 0%, transparent 50%);
  pointer-events: none;
  animation: liquidShimmer 15s ease-in-out infinite alternate;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  position: relative;
  z-index: 1;
}
.section-header h2 {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-wrap: balance;
}
.section-header h2 .accent {
  color: var(--primary-light);
}
.section-header p {
  color: var(--text-muted);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  position: relative;
  z-index: 1;
}
.about-visual .glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
}
.about-visual .glass-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(18, 186, 56, 0.06), transparent 70%);
  animation: rotate 20s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }

.cert-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(18, 186, 56, 0.06);
  border: 1px solid rgba(18, 186, 56, 0.15);
  border-radius: 16px;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}
.cert-badge:hover {
  background: rgba(18, 186, 56, 0.1);
  border-color: var(--primary);
}
.cert-badge .cert-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}
.cert-badge h3 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.cert-badge span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
[data-theme="dark"] .cert-badge h3 {
  color: #fff;
}

.about-text h3 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}
.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--stat-bg);
  border: 1px solid var(--stat-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.stat-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(18, 186, 56, 0.1);
}
.stat-item .number {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .about-stats { gap: 0.6rem; }
  .stat-item { padding: 1rem 0.4rem; }
  .stat-item .number { font-size: 1.5rem; }
  .stat-item .label { font-size: 0.72rem; }
  .cert-badge { padding: 0.8rem 1rem; }
}

/* ===== PLATFORM BANNER ===== */
.platform-banner {
  background: linear-gradient(135deg, rgba(18, 186, 56, 0.08), rgba(128, 128, 128, 0.08));
  border: 1px solid rgba(18, 186, 56, 0.2);
  border-radius: 24px;
  padding: clamp(1.75rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.platform-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(18, 186, 56, 0.04), transparent 60%);
  animation: rotate 25s linear infinite;
}
.platform-banner h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
  color: var(--text-primary);
}
.platform-banner p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}
.platform-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.platform-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}
.platform-link:hover {
  border-color: var(--primary);
  background: rgba(18, 186, 56, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(18, 186, 56, 0.15);
}
.platform-link .link-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: rgba(18, 186, 56, 0.15);
}
[data-theme="dark"] .platform-link {
  color: #fff;
}
.platform-link-title {
  font-weight: 700;
}
.platform-link-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== SERVICIOS (tarjetas generales) ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  position: relative;
  z-index: 1;
}
.section-cta {
  text-align: center;
  margin-top: 2.5rem;
  position: relative;
  z-index: 1;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  cursor: default;
  box-shadow: var(--card-shadow);
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 50px rgba(18, 186, 56, 0.1);
}
.service-card .service-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, rgba(18, 186, 56, 0.2), rgba(128, 128, 128, 0.1));
  border: 1px solid rgba(18, 186, 56, 0.2);
  transition: all 0.3s;
}
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 30px rgba(18, 186, 56, 0.2);
}
.service-card h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.service-card .service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.service-card .service-tags span {
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: rgba(18, 186, 56, 0.08);
  border: 1px solid rgba(18, 186, 56, 0.15);
  font-size: 0.7rem;
  color: var(--primary-text);
}
[data-theme="dark"] .service-card h3 {
  color: #fff;
}

/* ===== NUEVA SECCIÓN: NORMAS Y ENSAYOS (ACORDEÓN) ===== */
.normas-section {
  background: linear-gradient(180deg, var(--section-bg), transparent);
}
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.accordion-item {
  background: var(--accordion-bg);
  border: 1px solid var(--accordion-border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.accordion-item:hover {
  border-color: var(--primary);
}
.accordion-item summary {
  padding: 1.2rem 1.8rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  transition: background 0.3s;
  user-select: none;
}
.accordion-item summary::-webkit-details-marker {
  display: none;
}
.accordion-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin-left: auto;
  background-color: var(--primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.3s ease;
}
.accordion-item[open] summary::after {
  transform: rotate(180deg);
}
.accordion-item summary:hover {
  background: rgba(18, 186, 56, 0.04);
}
.accordion-item summary .svg-icon {
  color: var(--primary);
  font-size: 1.3rem;
  width: 1.8rem;
  text-align: center;
}
.accordion-content {
  padding: 0 1.8rem 1.8rem 1.8rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}
.accordion-content ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}
.accordion-content ul li {
  padding: 0.4rem 0 0.4rem 1.8rem;
  position: relative;
  border-bottom: 1px solid rgba(128, 128, 128, 0.06);
}
.accordion-content ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.accordion-content .norma-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  border-left: 3px solid var(--primary);
  padding-left: 1rem;
}
.accordion-content .norma-note--spaced {
  margin-top: 0.8rem;
}
.inline-link {
  color: var(--primary-text);
  font-weight: 600;
}
.accordion-content .norma-titulo {
  overflow-wrap: anywhere;
}
.accordion-content .sub-section {
  margin-top: 1.2rem;
}
.accordion-content .sub-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.accordion-content .sub-section h3 .svg-icon {
  color: var(--primary);
}
.accordion-content .norma-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.accordion-content .norma-item .norma-titulo {
  font-weight: 600;
  color: var(--text-primary);
}
.accordion-content .norma-item .norma-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.accordion-content .norma-item .norma-desc ul {
  margin: 0.2rem 0 0 0;
  padding-left: 1.2rem;
}
.accordion-content .norma-item .norma-desc ul li {
  border: none;
  padding: 0.1rem 0;
  list-style: disc;
}
.accordion-content .norma-item .norma-desc ul li::before {
  content: '';
  display: none;
}
[data-theme="dark"] .accordion-item summary {
  color: #fff;
}
[data-theme="dark"] .accordion-content .sub-section h3 {
  color: #fff;
}
[data-theme="dark"] .accordion-content .norma-item .norma-titulo {
  color: #e6edf3;
}

/* ===== CLIENTES ===== */
.clients-section {
  background: linear-gradient(180deg, transparent, var(--section-bg));
}
.counter {
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: -1.5rem;
}
.counter--spaced {
  margin-bottom: clamp(2rem, 4vw, 2.75rem);
}
.counter-number {
  font-size: clamp(3rem, 2.2rem + 4vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.counter-label {
  color: var(--text-secondary);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  font-weight: 500;
  margin-top: 0.25rem;
}
.clients-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1.75rem 0 0.5rem;
  position: relative;
  z-index: 1;
}

.clients-carousel-wrapper {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.clients-carousel {
  display: flex;
  gap: 2rem;
  /* ~70 px/s con 25 logos; ajustar si cambia el número de logos */
  animation: scrollCarousel 75s linear infinite;
  width: max-content;
  padding: 0.75rem 0;
}
.clients-carousel:hover { animation-play-state: paused; }
@keyframes scrollCarousel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
/* Fondo claro en ambos temas: los logos conservan sus colores de marca
   (varios son azul marino o negro y no se verían sobre fondo oscuro) */
.client-logo {
  flex-shrink: 0;
  width: 180px;
  height: 90px;
  background: #fff;
  border: 1px solid rgba(11, 26, 48, 0.06);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.client-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.client-logo:hover {
  transform: scale(1.06);
  border-color: var(--primary);
  box-shadow: 0 0 25px rgba(18, 186, 56, 0.18);
}
[data-theme="dark"] .client-logo {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* ===== BUZÓN ===== */
.suggestion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  position: relative;
  z-index: 1;
}
.suggestion-info h3 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.suggestion-info p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.suggestion-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.suggestion-feature {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}
.suggestion-feature .feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
}
.suggestion-feature h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}
.suggestion-feature span {
  font-size: 0.8rem;
  color: var(--text-muted);
}
[data-theme="dark"] .suggestion-feature h3 {
  color: #fff;
}

.suggestion-form {
  background: var(--form-card-bg);
  border: 1px solid var(--form-card-border);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  box-shadow: var(--card-shadow);
}
.suggestion-form h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.suggestion-form .form-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem; /* 16px: evita el zoom automático de iOS al enfocar */
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(18, 186, 56, 0.04);
  box-shadow: 0 0 15px rgba(18, 186, 56, 0.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b9eb5' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.form-group select option {
  background: var(--bg-body);
  color: var(--text-primary);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-submit {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 25px rgba(18, 186, 56, 0.25);
}
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(18, 186, 56, 0.4);
}
/* --- Formularios conectados a la API --- */
.form-challenge label .svg-icon {
  color: var(--primary);
  margin-right: 0.15rem;
}
.challenge-prompt {
  color: var(--text-primary);
}
.challenge-row {
  display: flex;
  gap: 0.5rem;
}
.challenge-row input {
  flex: 1;
  min-width: 0;
}
.challenge-refresh {
  flex-shrink: 0;
  width: 44px;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.challenge-refresh:hover,
.challenge-refresh:focus-visible {
  color: var(--primary-text);
  border-color: var(--primary);
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.25rem 0 1.2rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
  cursor: pointer;
}
.form-check input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check a,
.form-status a {
  color: var(--primary-text);
  font-weight: 600;
  text-underline-offset: 2px;
}
/* Campo trampa: fuera de la vista y del orden de tabulación */
.hp-field {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-group [aria-invalid="true"] {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.form-check input[aria-invalid="true"] {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}
/* Mensaje de error bajo el campo (lo crea home.js con el texto del idioma de la página) */
.field-error {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #b91c1c;
}
[data-theme="dark"] .field-error { color: #fca5a5; }
.form-status,
.modal-box .form-status {
  margin: 1rem 0 0;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.form-status:empty { display: none; }
.form-status.is-success {
  background: rgba(18, 186, 56, 0.1);
  border: 1px solid rgba(18, 186, 56, 0.35);
  color: var(--primary-text);
}
.form-status.is-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #b91c1c;
}
[data-theme="dark"] .form-status.is-error { color: #fca5a5; }
.form-submit:disabled,
.modal-box .btn-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

@media (max-width: 1024px) {
  .suggestion-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .platform-links { flex-direction: column; align-items: stretch; max-width: 400px; margin: 0 auto; }
  .platform-link { padding: 0.9rem 1.2rem; }
  .client-logo { width: 150px; height: 75px; }
  .clients-carousel { gap: 1.25rem; }
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .suggestion-feature { padding: 0.9rem 1rem; }
}

/* ===== OFICINAS REGIONALES ===== */
.oficinas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  position: relative;
  z-index: 1;
  margin-top: 2rem;
}
.oficina-card {
  background: var(--contact-card-bg);
  border: 1px solid var(--contact-card-border);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.25rem, 3vw, 1.8rem);
  transition: all 0.3s;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.oficina-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 20px 50px rgba(18, 186, 56, 0.08);
}
.oficina-card .oficina-icon {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}
.oficina-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.oficina-card .ciudad-estado {
  font-size: 0.9rem;
  color: var(--primary-text);
  font-weight: 600;
  margin-top: -0.2rem;
  margin-bottom: 0.3rem;
}
.oficina-card .detalle {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}
.oficina-card .detalle .svg-icon {
  width: 1.2rem;
  color: var(--primary);
  margin-top: 0.15rem;
}
.oficina-card .detalle a {
  color: var(--primary-text);
  text-decoration: none;
}
.oficina-card .detalle a:hover {
  text-decoration: underline;
}
.oficina-card .estado-pendiente {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}
[data-theme="dark"] .oficina-card h3 {
  color: #fff;
}

.support-block {
  margin-top: 3rem;
  text-align: center;
  background: var(--support-bg);
  backdrop-filter: blur(8px);
  border-radius: 40px;
  padding: 2rem;
  border: 1px solid var(--support-border);
  position: relative;
  z-index: 1;
}
.support-block .svg-icon {
  font-size: 2.5rem;
  color: var(--primary);
}
.support-block h3 {
  margin: 0.5rem 0;
  color: var(--text-primary);
}
.support-block p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.support-block a {
  color: var(--primary-text);
  font-weight: 600;
  text-decoration: none;
}
.support-block a:hover {
  color: var(--primary-dark);
}

/* ===== BOTÓN FLOTANTE Y MODAL ===== */
.floating-btn {
  position: fixed;
  bottom: calc(2rem + var(--safe-bottom));
  right: calc(2rem + var(--safe-right));
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  box-shadow: 0 8px 30px rgba(18, 186, 56, 0.35);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: all 0.3s ease;
  animation: floatingPulse 2s ease-in-out infinite;
}
.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(18, 186, 56, 0.5);
}
@keyframes floatingPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 30px rgba(18, 186, 56, 0.35); }
  50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(18, 186, 56, 0.5); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-overlay);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: var(--bg-body);
  border-radius: 32px;
  padding: 2.5rem;
  max-width: 460px;
  width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  position: relative;
  animation: modalFade 0.3s ease;
}
@keyframes modalFade {
  0% { opacity: 0; transform: scale(0.95) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.3s;
}
.modal-close:hover {
  color: var(--text-primary);
}
.modal-close:focus-visible,
.floating-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.modal-box h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  padding-right: 2.5rem;
}
.modal-box h3 .svg-icon {
  color: var(--primary);
  margin-right: 0.5rem;
}
.modal-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.modal-box .form-group {
  margin-bottom: 1rem;
}
.modal-box .form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.modal-box .form-group input,
.modal-box .form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transition: all 0.3s;
  backdrop-filter: blur(4px);
}
.modal-box .form-group input:focus,
.modal-box .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(18, 186, 56, 0.08);
}
.modal-box .form-group textarea {
  resize: vertical;
  min-height: 80px;
}
.modal-box .btn-submit {
  width: 100%;
  padding: 0.8rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 25px rgba(18, 186, 56, 0.25);
}
.modal-box .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(18, 186, 56, 0.4);
}

/* ===== REVEAL ===== */
.js .reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE (global) =====
   Breakpoints: ≤1024 tablet horizontal · ≤768 tablet vertical · ≤480 celular · ≥1440 pantallas grandes */
@media (max-width: 768px) {
  .accordion-item summary { font-size: 1rem; padding: 1rem 1.2rem; }
  .accordion-content { padding: 0 1.2rem 1.2rem 1.2rem; font-size: 0.9rem; }
  .accordion-content ul li { padding-left: 1.4rem; }
  .support-block { border-radius: 24px; padding: 1.5rem 1rem; }
  .support-block p { font-size: 1rem; overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .floating-btn {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    bottom: calc(1rem + var(--safe-bottom));
    right: calc(1rem + var(--safe-right));
  }
  .modal-box { padding: 1.5rem 1.25rem; border-radius: 24px; }
  /* Espacio para que el botón flotante no tape el final del footer */
  .footer { padding-bottom: calc(5.5rem + var(--safe-bottom)); }
  .accordion-content .norma-item .norma-desc ul { padding-left: 1rem; }
}
@media (min-width: 1440px) {
  .hero-container,
  .section-glass {
    max-width: 1360px;
  }
}

/* Pantallas táctiles: sin efectos hover que desplacen elementos (en táctil se quedan "pegados" tras el toque) */
@media (hover: none) {
  .float-card:hover,
  .stat-item:hover,
  .service-card:hover,
  .service-card:hover .service-icon,
  .platform-link:hover,
  .client-logo:hover,
  .oficina-card:hover,
  .social-link:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .nav-cta:hover,
  .form-submit:hover,
  .modal-box .btn-submit:hover,
  .theme-toggle:hover {
    transform: none;
  }
  .clients-carousel:hover { animation-play-state: running; }
}

/* Movimiento reducido: el usuario pidió menos animación en su sistema */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #particles-canvas { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  /* Carrusel estático: se muestran todos los clientes una sola vez */
  .clients-carousel-wrapper {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .clients-carousel {
    animation: none;
    width: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .client-logo--dup { display: none; }
}

/* Rendimiento en celulares y tablets: backdrop-filter es caro en GPUs móviles.
   Se quita el desenfoque de las tarjetas (no de la navbar) y se compensa con fondos más opacos. */
@media (max-width: 768px) {
  .main-wrapper :not(.navbar) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  :root {
    --glass-bg: rgba(255, 255, 255, 0.75);
    --card-bg: rgba(255, 255, 255, 0.8);
    --section-bg: rgba(255, 255, 255, 0.6);
    --stat-bg: rgba(255, 255, 255, 0.8);
    --form-card-bg: rgba(255, 255, 255, 0.8);
    --contact-card-bg: rgba(255, 255, 255, 0.8);
    --support-bg: rgba(255, 255, 255, 0.75);
    --accordion-bg: rgba(255, 255, 255, 0.75);
  }
  [data-theme="dark"] {
    --glass-bg: rgba(20, 30, 45, 0.75);
    --card-bg: rgba(20, 30, 45, 0.7);
    --section-bg: rgba(14, 20, 32, 0.6);
    --stat-bg: rgba(20, 30, 45, 0.7);
    --form-card-bg: rgba(20, 30, 45, 0.7);
    --contact-card-bg: rgba(20, 30, 45, 0.7);
    --support-bg: rgba(20, 30, 45, 0.65);
    --accordion-bg: rgba(20, 30, 45, 0.55);
    --input-bg: rgba(30, 45, 60, 0.8);
  }
  .glow-orb { filter: blur(60px); }
}
