/* ============================================
   JARVI - Estilos principales
   Inspirado en app2u.es
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 18px;
  color: #303030;
  line-height: 1.6;
  background: #fff;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('imagenes/fondo.png');
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
  opacity: 0.18;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* --- Variables --- */
:root {
  --color-primary:    #E8001D;
  --color-primary-dark: #B5001A;
  --color-primary-hover: #cc0019;
  --color-dark:       #1D1D1F;
  --color-dark-2:     #303030;
  --color-gray:       #515151;
  --color-light-gray: #f5f7fa;
  --color-border:     #eaeaea;
  --color-white:      #ffffff;
  --color-accent:     #ff4d63;
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.16);
  --transition: 0.25s ease;
  --max-width:  1200px;
}

/* ============================================
   HEADER / NAVEGACIÓN
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(8, 6, 6, 0.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition), box-shadow var(--transition);
}

/* Línea degradada roja en el borde inferior */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232, 0, 29, 0.7) 25%,
    rgba(255, 77, 99, 0.9) 50%,
    rgba(232, 0, 29, 0.7) 75%,
    transparent 100%
  );
}

.header.scrolled {
  background: rgba(6, 4, 4, 0.88);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.3px;
}

.logo__icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #E8001D 0%, #ff4d63 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px rgba(232, 0, 29, 0.5);
}

.logo__icon svg {
  width: 22px;
  height: 22px;
  fill: #fff;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: block;
  padding: 8px 15px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.1px;
}

.nav__link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

/* Dropdown */
.nav__item--dropdown:hover .nav__dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav__dropdown-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  transition: transform var(--transition);
  opacity: 0.6;
}

.nav__item--dropdown:hover .nav__dropdown-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: rgba(14, 10, 10, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition);
  padding: 12px 0 8px;
}

.nav__dropdown-link {
  display: block;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  transition: background var(--transition), color var(--transition);
}

.nav__dropdown-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* Header CTA */
.header__cta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.header__phone {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.2px;
}

/* CTA pill con brillo rojo */
.header .btn--primary {
  border-radius: 50px;
  padding: 10px 26px;
  font-size: 15px;
  background: linear-gradient(135deg, #E8001D 0%, #ff2d45 100%);
  border-color: transparent;
  box-shadow: 0 0 22px rgba(232, 0, 29, 0.45);
  letter-spacing: 0.2px;
}

.header .btn--primary:hover {
  background: linear-gradient(135deg, #cc0019 0%, #E8001D 100%);
  box-shadow: 0 0 32px rgba(232, 0, 29, 0.65);
  transform: translateY(-2px);
}

/* Toggle mobile: blanco sobre fondo oscuro */
.nav__toggle {
  color: rgba(255, 255, 255, 0.85);
}

/* Botón principal */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

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

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

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

.btn--outline-dark {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark-2);
}

.btn--outline-dark:hover {
  background: var(--color-dark);
  color: #fff;
}

.btn--lg {
  padding: 14px 32px;
  font-size: 18px;
  border-radius: 8px;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: rgba(255, 255, 255, 0.85);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
  background: #1a0a0a;
}

/* Video de fondo */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.55;
}

/* Overlay rojizo sobre el video */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg,
    rgba(139,0,0,0.72) 0%,
    rgba(181,0,26,0.58) 40%,
    rgba(26,10,10,0.75) 100%
  );
}

.hero__bg-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  background: #fff;
}

.hero__bg-circle--1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -100px;
}

.hero__bg-circle--2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  left: 10%;
}

.hero__bg-circle--3 {
  width: 200px;
  height: 200px;
  top: 30%;
  right: 20%;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__content {
  color: #fff;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
}

.hero__tag-dot {
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero__title {
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero__title span {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: 21px;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  margin-bottom: 36px;
  max-width: 500px;
}

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

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mock de teléfono / dashboard */
.phone-mock {
  width: 280px;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  position: relative;
}

.phone-mock__header {
  background: #075E54;
  padding: 16px 20px 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-mock__avatar {
  width: 36px;
  height: 36px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.phone-mock__info {
  flex: 1;
}

.phone-mock__status {
  font-size: 11px;
  opacity: 0.75;
  font-weight: 400;
}

.phone-mock__body {
  background: #ECE5DD;
  padding: 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.chat-bubble--bot {
  background: #fff;
  border-top-left-radius: 2px;
  align-self: flex-start;
  color: #303030;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-bubble--user {
  background: #DCF8C6;
  border-top-right-radius: 2px;
  align-self: flex-end;
  color: #303030;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-bubble__time {
  font-size: 10px;
  color: #888;
  text-align: right;
  margin-top: 4px;
}

.phone-mock__footer {
  background: #f0f0f0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-input {
  flex: 1;
  background: #fff;
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 13px;
  color: #999;
}

/* ============================================
   SECCIONES GENERALES
   ============================================ */

section {
  padding: 80px 0;
}

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

.section-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 19px;
  color: var(--color-gray);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 48px;
}

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

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

/* ============================================
   SERVICIOS
   ============================================ */

.services {
  background: transparent;
}

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

.service-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 32px 28px;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: default;
}

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

.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.service-card__icon--blue   { background: #EBF6FD; }
.service-card__icon--green  { background: #E6F9F0; }
.service-card__icon--purple { background: #F0EEFF; }
.service-card__icon--orange { background: #FFF4E6; }
.service-card__icon--teal   { background: #E5F8F6; }
.service-card__icon--pink   { background: #FEE8F0; }

.service-card__title {
  font-size: 21px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.service-card__desc {
  font-size: 16px;
  color: var(--color-gray);
  line-height: 1.6;
}

/* ============================================
   SVC CARDS — Funcionalidades (moderno)
   ============================================ */

.svc-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 32px 28px 28px;
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
  transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
  cursor: default;
}

/* Gradiente sutil al hacer hover */
.svc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,0,29,0.04) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
  pointer-events: none;
}

.svc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.11);
  border-color: rgba(232,0,29,0.25);
}

.svc-card:hover::after {
  opacity: 1;
}

/* Fila superior: número + icono */
.svc-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.svc-card__num {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  opacity: 0.55;
}

.svc-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.32s ease, transform 0.32s ease;
  flex-shrink: 0;
}

.svc-card__icon svg {
  width: 26px;
  height: 26px;
  stroke: #666;
  transition: stroke 0.32s ease;
}

.svc-card:hover .svc-card__icon {
  background: rgba(232,0,29,0.09);
  transform: rotate(-5deg) scale(1.07);
}

.svc-card:hover .svc-card__icon svg {
  stroke: var(--color-primary);
}

/* Línea decorativa animada */
.svc-card__line {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--color-primary) 0%, transparent 100%);
  margin-bottom: 18px;
  transform-origin: left center;
  transform: scaleX(0.2);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.svc-card:hover .svc-card__line {
  transform: scaleX(1);
}

.svc-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.svc-card__desc {
  font-size: 15.5px;
  color: var(--color-gray);
  line-height: 1.65;
}

/* ============================================
   BANNER CTA
   ============================================ */

.cta-banner {
  background: linear-gradient(135deg, #8B0000 0%, #B5001A 100%);
  padding: 60px 0;
}

.cta-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-banner__text {
  color: #fff;
}

.cta-banner__title {
  font-size: 33px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.cta-banner__subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
}

/* ============================================
   POR QUÉ NOSOTROS
   ============================================ */

.why-us__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.why-us__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat-card {
  text-align: center;
  padding: 24px 16px;
  border-radius: var(--radius-md);
  background: var(--color-light-gray);
}

.stat-card__number {
  font-size: 50px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card__number span {
  font-size: 24px;
}

.stat-card__label {
  font-size: 15px;
  color: var(--color-gray);
  font-weight: 500;
  line-height: 1.4;
}

.why-us__features {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.why-us__feature {
  display: flex;
  gap: 16px;
}

.why-us__feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #EBF6FD;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.why-us__feature-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.why-us__feature-desc {
  font-size: 16px;
  color: var(--color-gray);
  line-height: 1.6;
}

/* Tags de especialidades */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag {
  background: var(--color-light-gray);
  border: 1px solid var(--color-border);
  color: var(--color-dark-2);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
}

/* ============================================
   CASOS DE ÉXITO / PROYECTOS
   ============================================ */

.projects {
  background: linear-gradient(135deg, #8B0000 0%, #B5001A 40%, #1a0a0a 100%);
  position: relative;
  overflow: hidden;
}

/* Burbujas de fondo */
.projects__bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}

.projects__bubble--1 {
  width: 700px;
  height: 700px;
  top: -200px;
  right: -150px;
  animation: bubbleFloat1 18s ease-in-out infinite;
}

.projects__bubble--2 {
  width: 300px;
  height: 300px;
  bottom: -80px;
  left: 5%;
  animation: bubbleFloat2 12s ease-in-out infinite;
}

.projects__bubble--3 {
  width: 160px;
  height: 160px;
  top: 40%;
  right: 18%;
  animation: bubbleFloat3 9s ease-in-out infinite;
}

@keyframes bubbleFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-40px, 30px) scale(1.04); }
  66%  { transform: translate(20px, -40px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes bubbleFloat2 {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(30px, -40px); }
  100% { transform: translate(0, 0); }
}

@keyframes bubbleFloat3 {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(-20px, 25px); }
  100% { transform: translate(0, 0); }
}

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

.project-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.project-card__img {
  height: 200px;
  overflow: hidden;
  background: #1a0a0a;
}

.project-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.45s ease;
}

.project-card:hover .project-card__img img {
  transform: scale(1.06);
}

.project-card__body {
  padding: 22px 24px;
}

.project-card__client {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.project-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.3;
}

/* ============================================
   PAIN POINTS
   ============================================ */

.pain-points__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.pain-points__header .section-subtitle {
  margin-bottom: 0;
}

.pain-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Keyframes de flotación — 3 ritmos distintos */
@keyframes painFloat1 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
@keyframes painFloat2 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-7px); }
}
@keyframes painFloat3 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-13px); }
}

.pain-item {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.07);
  position: relative;
  cursor: default;
  /* la transición de transform la controla la animación; solo aplicamos la de box-shadow y border-color */
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Ritmos y delays distintos por tarjeta */
.pain-item:nth-child(1) { animation: painFloat1 4.0s ease-in-out infinite 0s; }
.pain-item:nth-child(2) { animation: painFloat2 5.5s ease-in-out infinite -1.8s; }
.pain-item:nth-child(3) { animation: painFloat3 3.6s ease-in-out infinite -1.1s; }
.pain-item:nth-child(4) { animation: painFloat1 6.2s ease-in-out infinite -2.7s; }
.pain-item:nth-child(5) { animation: painFloat2 4.8s ease-in-out infinite -0.6s; }

.pain-item:hover {
  border-left-color: var(--color-primary-dark);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.13);
}

/* El texto siempre encima del blur */
.pain-item__title,
.pain-item__desc {
  position: relative;
  z-index: 2;
}

.pain-item__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 6px;
}

.pain-item__desc {
  font-size: 16px;
  color: var(--color-gray);
  line-height: 1.55;
}

/* ============================================
   TESTIMONIOS
   ============================================ */

.testimonials {
  background: var(--color-light-gray);
}

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

.testimonial-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-sm);
}

.testimonial-card__stars {
  color: #F5A623;
  font-size: 20px;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.testimonial-card__text {
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-dark-2);
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.testimonial-card__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-dark);
}

.testimonial-card__role {
  font-size: 14px;
  color: var(--color-gray);
}

/* ============================================
   VIDEO SHOWCASE
   ============================================ */

.video-showcase {
  background: transparent;
  padding: 100px 0;
}

.video-showcase__header {
  margin-bottom: 56px;
}

.video-showcase__header .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.video-showcase__player {
  max-width: 400px;
  margin: 0 auto;
}

.video-showcase__frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.06),
    0 32px 80px rgba(0,0,0,0.22),
    0 0 0 8px rgba(232,0,29,0.07);
  background: #111;
  aspect-ratio: 9 / 16;
}

.video-showcase__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* Overlay con botón play */
.video-showcase__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,0,0,0.55) 0%, rgba(139,0,0,0.35) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
  cursor: pointer;
  border-radius: 20px;
}

.video-showcase__overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-showcase__play-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.4));
}

.video-showcase__play-btn svg {
  width: 80px;
  height: 80px;
}

.video-showcase__play-btn:hover {
  transform: scale(1.12);
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(232,0,29,0.45); }
  70%  { box-shadow: 0 0 0 22px rgba(232,0,29,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,0,29,0); }
}

.video-showcase__play-btn::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  animation: pulseRing 2.2s ease-out infinite;
}

/* Línea decorativa debajo */
.video-showcase__player::after {
  content: '';
  display: block;
  height: 4px;
  margin-top: 32px;
  border-radius: 4px;
  background: linear-gradient(to right, transparent, var(--color-primary), transparent);
  opacity: 0.35;
}

/* Responsive */
@media (max-width: 768px) {
  .video-showcase { padding: 64px 0; }
  .video-showcase__frame { border-radius: 20px; }
  .video-showcase__video { border-radius: 20px; }
  .video-showcase__overlay { border-radius: 20px; }
  .video-showcase__play-btn svg { width: 64px; height: 64px; }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: #1D1D1F;
  color: rgba(255,255,255,0.65);
  padding: 60px 0 30px;
}

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

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__desc {
  font-size: 16px;
  line-height: 1.7;
  max-width: 280px;
}

.footer__col-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 16px;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--color-primary);
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background var(--transition);
}

.footer__social-link:hover {
  background: var(--color-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ── Tablet grande (≤ 1024px) ── */
@media (max-width: 1024px) {

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
    padding: 60px 24px;
  }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__actions  { justify-content: center; }
  .hero__tag      { margin-left: auto; margin-right: auto; }

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

  /* svc-cards → 2 col en tablet */
  .services__grid .svc-card:last-child:nth-child(odd) {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
  }

  .catalogo__inner {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
    text-align: center;
  }
  .catalogo__inner > div:last-child {
    display: flex;
    justify-content: center;
  }

  .why-us__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .why-us__stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .pain-points__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* ── Tablet (≤ 768px) ── */
@media (max-width: 768px) {

  section { padding: 56px 0; }

  .container { padding: 0 20px; }

  /* Header mobile */
  .header__inner { padding: 0 16px; gap: 8px; }
  .header__cta   { gap: 8px; }
  .header .btn--primary { display: none; }
  .lang-toggle   { font-size: 11px !important; padding: 4px 8px !important; }

  /* Nav mobile */
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 78px);
    background: rgba(8, 6, 6, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    gap: 4px;
    overflow-y: auto;
    z-index: 1001;
    border-top: 1px solid rgba(255,255,255,0.07);
  }
  .nav.is-open .nav__link {
    color: rgba(255,255,255,0.85);
  }
  .nav.is-open .nav__link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
  }
  .nav__toggle { display: flex; }
  .nav__dropdown {
    position: static;
    opacity: 1;
    pointer-events: all;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius-sm);
    display: none;
  }
  .nav__item--dropdown.is-open .nav__dropdown { display: block; }
  .nav__dropdown .nav__dropdown-link {
    color: rgba(255,255,255,0.7);
  }
  .nav__dropdown .nav__dropdown-link:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
  }
  .header__phone { display: none; }

  /* Grids → 1 columna */
  .services__grid,
  .projects__grid,
  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  /* svc-card último elemento: quita el span */
  .services__grid .svc-card:last-child:nth-child(odd) {
    grid-column: span 1;
    max-width: 100%;
  }

  /* Stats */
  .why-us__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .stat-card__number { font-size: 38px; }

  /* CTA banner */
  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  /* Catálogo mock */
  .phone-mock { width: 100%; max-width: 320px; }

  /* Sección catálogo */
  .catalogo__inner {
    gap: 36px !important;
  }
  #catalogo { padding: 60px 0 !important; }

  /* Hero */
  .hero__inner { padding: 48px 20px; }

  /* Sección contacto */
  #contacto > .container > div {
    flex-direction: column;
  }
}

/* ── Móvil (≤ 480px) ── */
@media (max-width: 480px) {

  section { padding: 48px 0; }

  .hero__title    { font-size: 30px; }
  .section-title  { font-size: 26px; }
  .phone-mock     { width: 100%; max-width: 280px; }

  .why-us__stats  { grid-template-columns: 1fr; gap: 12px; }
  .stat-card      { padding: 18px 12px; }

  .hero__actions  { flex-direction: column; width: 100%; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .btn--lg { padding: 13px 24px; font-size: 17px; }

  .header__inner  { padding: 0 16px; }

  .why-us__feature { flex-direction: column; gap: 10px; }

  /* Mock catálogo productos */
  #catalogo .catalogo__inner > div:first-child {
    text-align: left;
  }
}

/* Dot de atributo */
.attr-dot {
  font-size: 20px;
  color: #000;
  line-height: 1;
}

/* Recuadro del dot — gris claro + resplandor continuo */
@keyframes dotGlow {
  0%, 100% {
    box-shadow: 0 0 0px 0px rgba(0,0,0,0.08);
    background-color: #ebebeb;
  }
  50% {
    box-shadow: 0 0 10px 4px rgba(0,0,0,0.10);
    background-color: #e0e0e0;
  }
}

.why-us__feature-icon,
.dot-box {
  background: #ebebeb !important;
  animation: dotGlow 2.4s ease-in-out infinite;
}

/* ============================================
   APP MENSAJERO
   ============================================ */

.mensajero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

/* Teléfono */
.mensajero-phone {
  width: 240px;
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.20), 0 0 0 1px rgba(0,0,0,0.07);
  overflow: hidden;
}

.mensajero-phone__bar {
  background: #1D1D1F;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(255,255,255,0.65);
}

.mensajero-phone__header {
  background: #E8001D;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  position: relative;
}

.mensajero-phone__avatar {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.mensajero-notif-badge {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: #E8001D;
  font-size: 10px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePulse 2s ease-in-out infinite;
}

/* Mapa */
.mensajero-map {
  position: relative;
  height: 160px;
  background: #dce8dc;
  overflow: hidden;
}

.mensajero-map__road--h {
  position: absolute;
  left: 0;
  width: 100%;
  height: 7px;
  background: rgba(255,255,255,0.75);
}

.mensajero-map__road--v {
  position: absolute;
  top: 0;
  height: 100%;
  width: 7px;
  background: rgba(255,255,255,0.75);
}

.mensajero-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mensajero-pin {
  position: absolute;
  font-size: 20px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  line-height: 1;
}

.mensajero-pin--rider {
  animation: riderMove 3.5s ease-in-out infinite;
}

@keyframes riderMove {
  0%, 100% { transform: translate(-50%, -50%); }
  50%       { transform: translate(calc(-50% + 14px), calc(-50% - 8px)); }
}

/* Tarjeta de orden */
.mensajero-order {
  padding: 14px 16px;
  background: #fff;
}

.mensajero-order__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mensajero-order__badge {
  background: rgba(232,0,29,0.1);
  color: #E8001D;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.mensajero-order__id {
  font-size: 11px;
  font-weight: 600;
  color: #888;
}

.mensajero-order__client {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mensajero-order__items {
  font-size: 11px;
  color: #515151;
  padding-top: 8px;
  border-top: 1px solid #f2f2f2;
}

@keyframes badgePulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%       { transform: translateY(-50%) scale(1.15); }
}

/* Responsive */
@media (max-width: 1024px) {
  .mensajero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .mensajero__inner > div:first-child {
    order: 2;
  }
  .mensajero__inner > div:last-child {
    order: 1;
  }
}

/* ============================================
   CARRUSEL CATÁLOGO
   ============================================ */

.catalogo-carousel {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Efecto blur en bordes laterales */
.carousel-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}

.carousel-fade--left {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.85) 0%, transparent 100%);
  backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(to right, white 30%, transparent 100%);
  mask-image: linear-gradient(to right, white 30%, transparent 100%);
}

.carousel-fade--right {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,0.85) 0%, transparent 100%);
  backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(to left, white 30%, transparent 100%);
  mask-image: linear-gradient(to left, white 30%, transparent 100%);
}

/* Dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  padding: 0;
}

.carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.3);
}


/* ============================================
   SPLASH SCREEN
   ============================================ */

#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #E8001D;
  transition: opacity 1s ease;
}

#splash.hide {
  opacity: 0;
  pointer-events: none;
}

#splash-logo {
  position: absolute;
  top: 18%;
  left: 50%;
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 28px;
  animation: splashPulseLogo 0.8s ease forwards;
}

#splash-meta {
  position: absolute;
  bottom: 12%;
  left: 50%;
  width: 220px;
  height: 190px;
  object-fit: contain;
  opacity: 0;
  transform-origin: center bottom;
  animation: metaRunJumpRelax 2.1s linear 0.2s forwards;
}

@keyframes splashPulseLogo {
  0%   { transform: translateX(-50%) scale(0.7); opacity: 0; }
  60%  { transform: translateX(-50%) scale(1.08); opacity: 1; }
  100% { transform: translateX(-50%) scale(1);    opacity: 1; }
}

@keyframes metaRunJumpRelax {
  /* ── Fase 1: corriendo desde la izquierda ── */
  0% {
    transform: translateX(calc(-50vw - 230px)) rotate(-20deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.1, 0, 0.3, 1);
  }
  /* llega al centro con leve rebose */
  30% {
    transform: translateX(calc(-50% + 14px)) rotate(-6deg);
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }

  /* ── Fase 2: squash al frenar ── */
  36% {
    transform: translateX(-50%) rotate(0deg) scaleX(1.28) scaleY(0.72);
    animation-timing-function: cubic-bezier(0.2, 0.6, 0.4, 1);
  }
  /* sube en el salto */
  47% {
    transform: translateX(-50%) translateY(-65px) scaleX(0.92) scaleY(1.12) rotate(5deg);
    animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
  }
  /* pico del salto */
  51% {
    transform: translateX(-50%) translateY(-72px) scaleX(0.95) scaleY(1.08) rotate(3deg);
  }
  /* aterriza con squash */
  59% {
    transform: translateX(-50%) translateY(0px) scaleX(1.2) scaleY(0.82) rotate(-1deg);
    animation-timing-function: ease-out;
  }

  /* ── Fase 3: balanceo relajante (amplitud decreciente) ── */
  65% {
    transform: translateX(-50%) rotate(-14deg) scaleX(1) scaleY(1);
    animation-timing-function: ease-in-out;
  }
  72% {
    transform: translateX(-50%) rotate(11deg);
    animation-timing-function: ease-in-out;
  }
  78% {
    transform: translateX(-50%) rotate(-7deg);
    animation-timing-function: ease-in-out;
  }
  83% {
    transform: translateX(-50%) rotate(4deg);
    animation-timing-function: ease-in-out;
  }
  88% {
    transform: translateX(-50%) rotate(-2.5deg);
    animation-timing-function: ease-in-out;
  }
  92% {
    transform: translateX(-50%) rotate(1.5deg);
  }
  96% {
    transform: translateX(-50%) rotate(-0.5deg);
  }
  100% {
    transform: translateX(-50%) rotate(0deg);
    opacity: 0.9;
  }
}


/* ============================================
   ANIMACIONES
   ============================================ */

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

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }

/* Contador animado */
.counter { display: inline-block; }

/* ── Logo 3D canvas fix ──────────────────────────────
   El canvas Three.js tiene z-index:1.
   Todas las secciones debajo del hero necesitan z-index >= 2
   para quedar encima del canvas.
──────────────────────────────────────────────────── */
.services,
.pain-points,
.why-us,
.cta-banner,
.video-showcase,
.cases,
.testimonios,
.pricing,
.faq,
.contact,
#contacto,
#casos,
#por-que,
#servicios,
#testimonios,
#problemas,
#catalogo,
#app-mensajero,
footer,
.footer {
  position: relative;
  z-index: 2;
}
