/* ==========================================================================
   PRO AIC AUTOMATIZACIÓN - CASOS DE ÉXITO & DOSSIER TÉCNICO V4
   Video Hero Dedicado, Banner Compacto con Ingenieros Nítidos, Carrusel Interactivo
   Colores Oficiales: Navy (#0A192F / #061122), Naranja Industrial (#C2541A / #EA580C)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO DOSSIER CON VIDEO INDUSTRIAL (SCADA, PLC, INSTRUMENTACIÓN)
   -------------------------------------------------------------------------- */
.cases-hero-stage {
  position: relative;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #061122;
  color: #FFFFFF;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cases-hero-video-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.cases-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.85) contrast(1.12);
  transform: scale(1.02);
  animation: heroVideoSubtleZoom 24s ease-in-out infinite alternate;
}

@keyframes heroVideoSubtleZoom {
  0% { transform: scale(1.02); }
  100% { transform: scale(1.07); }
}

.cases-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: 
    radial-gradient(circle at 75% 25%, rgba(194, 84, 26, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, rgba(6, 17, 34, 0.58) 0%, rgba(6, 17, 34, 0.42) 45%, rgba(6, 17, 34, 0.88) 100%),
    linear-gradient(90deg, rgba(6, 17, 34, 0.65) 0%, rgba(6, 17, 34, 0.35) 50%, rgba(6, 17, 34, 0.65) 100%);
  pointer-events: none;
}

.cases-hero-container {
  position: relative;
  z-index: 2;
  padding-top: 135px;
  padding-bottom: 75px;
}

.cases-hero-left-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 24px;
}

.cases-hero-header {
  max-width: 900px;
  margin: 0 auto 42px;
  text-align: center;
}

.cases-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 20px;
  background: rgba(194, 84, 26, 0.22);
  border: 1px solid rgba(255, 138, 80, 0.45);
  border-radius: 999px;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FF8A50;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(194, 84, 26, 0.25);
}

.cases-hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #FF8A50;
  box-shadow: 0 0 10px #FF8A50;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.75); }
}

.cases-hero-title {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 20px;
}

.cases-hero-title .highlight {
  background: linear-gradient(135deg, #FF8A50 0%, #EA580C 50%, #FF6600 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cases-hero-desc {
  font-size: 1.14rem;
  line-height: 1.72;
  color: #CBD5E1;
  max-width: 780px;
  margin: 0 auto 30px;
}

/* Píldoras de Especialidad en Hero */
.hero-specialty-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.specialty-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #E2E8F0;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
}

.specialty-pill:hover {
  background: rgba(194, 84, 26, 0.25);
  border-color: rgba(255, 138, 80, 0.5);
  color: #FFFFFF;
}

.specialty-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF8A50;
}

/* Métricas Hero Bar con Contadores Animados */
.cases-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-metric-card {
  background: rgba(10, 25, 47, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 24px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.hero-metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #FF8A50, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-metric-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 138, 80, 0.5);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.hero-metric-card:hover::after {
  opacity: 1;
}

.hero-metric-val {
  display: block;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 2.45rem;
  font-weight: 800;
  color: #FF8A50;
  line-height: 1.1;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.hero-metric-lbl {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-metric-sub {
  font-size: 0.74rem;
  color: #94A3B8;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   2. INTRODUCCIÓN A SECCIÓN (SIN FILTROS)
   -------------------------------------------------------------------------- */
.cases-section-intro {
  padding: 75px 0 25px;
  background-color: #F8FAFC;
  text-align: center;
}

.cases-section-intro .section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(10, 25, 47, 0.06);
  border: 1px solid rgba(10, 25, 47, 0.12);
  border-radius: 6px;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0A192F;
  margin-bottom: 14px;
}

.cases-section-intro h2 {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: clamp(2.1rem, 3.6vw, 2.8rem);
  font-weight: 800;
  color: #0A192F;
  line-height: 1.2;
  margin-bottom: 12px;
}

.cases-section-intro p {
  font-size: 1.06rem;
  color: #475569;
  max-width: 740px;
  margin: 0 auto;
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   3. GRID DE CASOS DE ÉXITO (MAGAZINE DOSSIER CARDS)
   -------------------------------------------------------------------------- */
.cases-section {
  padding: 20px 0 90px;
  background-color: #F8FAFC;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.case-card {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 20px rgba(10, 25, 47, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  position: relative;
}

.case-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(10, 25, 47, 0.12);
  border-color: #CBD5E1;
}

/* Media / Imagen con Zoom y Badges */
.case-card-media {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: #0A192F;
}

.case-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

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

.case-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(10, 25, 47, 0.3) 0%, transparent 40%, rgba(10, 25, 47, 0.9) 100%);
  pointer-events: none;
}

.case-card-badges-top {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.case-industry-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(10, 25, 47, 0.92);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.case-norm-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 6px;
  background: linear-gradient(135deg, #C2541A 0%, #EA580C 100%);
  color: #FFFFFF;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(194, 84, 26, 0.4);
}

.case-location-badge {
  position: absolute;
  bottom: 16px;
  left: 18px;
  z-index: 2;
  color: #E2E8F0;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.location-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF8A50;
}

/* Cuerpo de la Tarjeta */
.case-card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.case-card-header {
  margin-bottom: 20px;
}

.case-client-type {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #C2541A;
  margin-bottom: 6px;
  display: block;
}

.case-card-title {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #0A192F;
  line-height: 1.28;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.case-card-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.65;
  margin-bottom: 22px;
}

/* Fila de Comparativa: Desafío vs Solución */
.case-narrative-box {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-narrative-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  line-height: 1.52;
}

.case-narrative-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 800;
  margin-top: 1px;
}

.case-narrative-icon.challenge {
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.case-narrative-icon.solution {
  background: #DCFCE7;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.case-narrative-text strong {
  color: #0A192F;
  font-weight: 700;
}

.case-narrative-text span {
  color: #475569;
}

/* Métricas Cuantitativas de Impacto (KPI Cards) */
.case-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.case-kpi-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.case-kpi-item:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 6px 16px rgba(10, 25, 47, 0.06);
}

.case-kpi-val {
  display: block;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #C2541A;
  line-height: 1.1;
  margin-bottom: 3px;
}

.case-kpi-lbl {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Tech Stack Tags */
.case-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tech-tag:hover {
  background: #E2E8F0;
  border-color: #94A3B8;
}

/* Botones Premium con Efecto Shimmer de Presencia */
.case-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid #E2E8F0;
}

.btn-case-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, #0A192F 0%, #112240 100%);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(10, 25, 47, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-case-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
}

.btn-case-detail:hover::before {
  left: 140%;
  transition: left 0.75s ease-in-out;
}

.btn-case-detail:hover {
  background: linear-gradient(135deg, #C2541A 0%, #EA580C 50%, #FF6600 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(194, 84, 26, 0.45);
}

.btn-case-detail .btn-arrow {
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.22s ease;
}

.btn-case-detail:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-case-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: #15803D !important;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.btn-case-whatsapp:hover {
  color: #16A34A !important;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   4. SIMULADOR DE IMPACTO INDUSTRIAL INTERACTIVO (ROI / OEE WIDGET)
   -------------------------------------------------------------------------- */
.roi-simulator-section {
  padding: 85px 0;
  background: linear-gradient(135deg, #0A192F 0%, #061122 100%);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.roi-simulator-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(194, 84, 26, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.roi-simulator-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 44px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.roi-info-title {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 14px;
}

.roi-info-desc {
  font-size: 1rem;
  line-height: 1.65;
  color: #94A3B8;
  margin-bottom: 26px;
}

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

.roi-form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #CBD5E1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.roi-select, .roi-range {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 25, 47, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.roi-select:focus {
  border-color: #FF8A50;
  box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.2);
}

.roi-range-value-display {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #94A3B8;
  margin-top: 6px;
}

/* Resultados del Simulador */
.roi-result-box {
  background: linear-gradient(135deg, rgba(194, 84, 26, 0.18) 0%, rgba(10, 25, 47, 0.75) 100%);
  border: 1px solid rgba(255, 138, 80, 0.4);
  border-radius: 16px;
  padding: 34px 28px;
  text-align: center;
  position: relative;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.roi-result-header {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FF8A50;
  margin-bottom: 14px;
}

.roi-result-main-kpi {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1;
  margin-bottom: 8px;
}

.roi-result-main-lbl {
  font-size: 0.92rem;
  color: #CBD5E1;
  margin-bottom: 22px;
}

.roi-result-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 24px;
}

.roi-subkpi-val {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #38BDF8;
}

.roi-subkpi-lbl {
  font-size: 0.76rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   5. CARRUSEL INTERACTIVO CON LOGOS OFICIALES (MOUSE REACTION)
   -------------------------------------------------------------------------- */
.tech-ecosystem-section {
  padding: 70px 0;
  background: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
  overflow: hidden;
  position: relative;
}

.tech-ecosystem-title {
  text-align: center;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748B;
  margin-bottom: 36px;
}

.tech-carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.tech-carousel-track {
  display: flex;
  align-items: center;
  gap: 44px;
  width: max-content;
  animation: techTicker 36s linear infinite;
  cursor: default;
}

/* Ensure carousel runs continuously without pausing on hover */
.tech-carousel-container:hover .tech-carousel-track,
.tech-carousel-track:hover {
  animation-play-state: running !important;
}

@keyframes techTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tech-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  min-width: 155px;
  height: 68px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-logo-item {
  max-height: 38px;
  max-width: 115px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.62);
  transition: all 0.3s ease;
}

.tech-logo-card:hover {
  background: #FFFFFF;
  border-color: #C2541A;
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(194, 84, 26, 0.12);
}

.tech-logo-card:hover .tech-logo-item {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   6. BANNER DE AGENDAR DIAGNÓSTICO COMPACTO Y CON MÁXIMA CLARIDAD VISUAL
   -------------------------------------------------------------------------- */
.diagnostic-banner-section {
  padding: 28px 0 55px;
  background-color: #FFFFFF;
}

.diagnostic-banner-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background-color: #0A192F;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 40px rgba(10, 25, 47, 0.15);
  display: flex;
  align-items: center;
  min-height: 220px;
}

.diagnostic-banner-bg-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 1;
  opacity: 1;
  filter: brightness(1.06) contrast(1.05);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.25) 14%, rgba(0, 0, 0, 0.88) 32%, #000000 50%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.25) 14%, rgba(0, 0, 0, 0.88) 32%, #000000 50%);
}

.diagnostic-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: linear-gradient(90deg, #0A192F 0%, rgba(10, 25, 47, 0.98) 28%, rgba(10, 25, 47, 0.4) 44%, transparent 66%);
  pointer-events: none;
}

.diagnostic-banner-content {
  position: relative;
  z-index: 3;
  padding: 28px 36px;
  max-width: 540px;
}

.diagnostic-banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(194, 84, 26, 0.28);
  border: 1px solid rgba(255, 138, 80, 0.45);
  border-radius: 999px;
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FF8A50;
  margin-bottom: 10px;
}

.diagnostic-banner-title {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.22;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.diagnostic-banner-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #CBD5E1;
  margin-bottom: 18px;
}

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

/* --------------------------------------------------------------------------
   7. MODAL DE FICHA TÉCNICA
   -------------------------------------------------------------------------- */
.case-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.case-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.case-modal-container {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border-radius: 16px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-modal.is-active .case-modal-container {
  transform: translateY(0) scale(1);
}

.case-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #475569;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.case-modal-close:hover {
  background: #0A192F;
  color: #FFFFFF;
}

.case-modal-header {
  padding: 32px 32px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.case-modal-title {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #0A192F;
  line-height: 1.25;
  margin-top: 8px;
}

.case-modal-content {
  padding: 28px 32px;
}

.case-modal-section-title {
  font-family: 'Barlow', var(--font-heading), sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0A192F;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-modal-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #C2541A;
  border-radius: 2px;
}

.case-modal-bom-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.case-modal-bom-list li {
  font-size: 0.88rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-modal-bom-list li::before {
  content: '•';
  color: #C2541A;
  font-weight: 800;
  font-size: 1.2rem;
}

.case-modal-actions {
  padding: 20px 32px 28px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  border-radius: 0 0 16px 16px;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cases-grid {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
  }
  .cases-hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .roi-simulator-card {
    grid-template-columns: 1fr;
    padding: 34px 24px;
  }
  .diagnostic-banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .diagnostic-banner-bg-img {
    position: relative;
    width: 100%;
    height: 220px;
    -webkit-mask-image: linear-gradient(to bottom, #000000 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000000 65%, transparent 100%);
  }
  .diagnostic-banner-overlay {
    background: linear-gradient(180deg, transparent 0%, rgba(10, 25, 47, 0.8) 75%, #0A192F 100%);
  }
  .diagnostic-banner-content {
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  .cases-hero-container {
    padding-top: 110px;
    padding-bottom: 60px;
  }
  .cases-hero-metrics {
    grid-template-columns: 1fr;
  }
  .case-kpi-grid {
    grid-template-columns: 1fr;
  }
  .case-card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-case-detail, .btn-case-whatsapp {
    justify-content: center;
  }
  .case-modal-bom-list {
    grid-template-columns: 1fr;
  }
  .case-modal-content {
    padding: 20px;
  }
  .case-modal-header {
    padding: 24px 20px 16px;
  }
  .case-modal-actions {
    flex-direction: column;
    padding: 16px 20px;
  }
  .case-modal-actions a, .case-modal-actions button {
    width: 100%;
    justify-content: center;
  }
}
