/* ==========================================================================
   PRO AIC AUTOMATIZACIÓN - CASOS DE ÉXITO INDIVIDUALES (DOSSIERS TÉCNICOS B2B)
   Diseño de Alta Producción para Demostración de Experiencia y Alcances
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO TÉCNICO DE CASO DE ÉXITO (ESTÁNDAR HOME / BBS AUTOMATION)
   -------------------------------------------------------------------------- */
.case-hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background-color: #0b0f17;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.case-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.02);
  animation: stageMediaZoom 24s ease-in-out infinite alternate;
}

@keyframes stageMediaZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.07);
  }
}

/* Overlay técnico cinematográfico igual a la página de inicio */
.case-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 12, 20, 0.82) 0%, rgba(8, 12, 20, 0.48) 45%, rgba(8, 12, 20, 0.12) 78%, transparent 100%),
    linear-gradient(180deg, rgba(8, 12, 20, 0.45) 0%, transparent 40%, rgba(8, 12, 20, 0.75) 100%);
  pointer-events: none;
}

.case-hero-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

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

.case-hero-inner {
  max-width: 1020px;
}

.case-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94A3B8;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.case-breadcrumb a {
  color: #CBD5E1;
  text-decoration: none;
  transition: color var(--transition-fast, 0.2s);
}

.case-breadcrumb a:hover {
  color: var(--brand-orange, #F48415);
}

.case-breadcrumb span.sep {
  color: #64748B;
}

.case-breadcrumb span.current {
  color: #38BDF8;
}

.case-hero-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

/* Stage Pill idéntico al Hero de Inicio */
.stage-pill-case {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stage-pill-case .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22C55E;
  box-shadow: 0 0 10px #22C55E;
  animation: stagePulse 2s infinite;
}

@keyframes stagePulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.case-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(244, 132, 21, 0.16);
  color: #FF8A50;
  border: 1px solid rgba(244, 132, 21, 0.38);
  backdrop-filter: blur(8px);
}

.case-badge-pill.blue {
  background: rgba(56, 189, 248, 0.15);
  color: #7DD3FC;
  border-color: rgba(56, 189, 248, 0.35);
}

.case-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #CBD5E1;
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.case-hero-title {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8), 0 4px 30px rgba(0, 0, 0, 0.55);
}

.case-hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.68;
  color: #E2E8F0;
  max-width: 920px;
  margin-bottom: 30px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* KPIs Banner en Hero con Glassmorphism Premium */
.case-hero-kpi-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  background: rgba(8, 15, 28, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px 30px;
  margin-top: 28px;
  max-width: 940px;
}

.case-hero-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-hero-kpi-val {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 2.3rem;
  font-weight: 800;
  color: #38BDF8;
  line-height: 1;
  text-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

.case-hero-kpi-val.highlight-orange {
  color: #F48415;
  text-shadow: 0 0 24px rgba(244, 132, 21, 0.35);
}

.case-hero-kpi-val.highlight-green {
  color: #22C55E;
  text-shadow: 0 0 24px rgba(34, 197, 94, 0.35);
}

.case-hero-kpi-lbl {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 0.94rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-top: 2px;
}

.case-hero-kpi-sub {
  font-size: 0.80rem;
  color: #94A3B8;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   LAYOUT DE CONTENIDO PRINCIPAL (2 COLUMNAS: MAIN + STICKY SIDEBAR)
   -------------------------------------------------------------------------- */
.case-content-section {
  padding: 64px 0 88px;
  background-color: #FFFFFF;
}

.case-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
}

.case-main-body {
  min-width: 0;
}

/* Imagen Principal del Proyecto */
.case-featured-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(10, 25, 47, 0.12);
  margin-bottom: 44px;
  border: 1px solid #E2E8F0;
}

.case-featured-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.case-media-caption {
  padding: 12px 20px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  font-size: 0.85rem;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Bloques de Sección de Caso */
.case-block {
  margin-bottom: 52px;
}

.case-block-header {
  margin-bottom: 20px;
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 12px;
}

.case-block-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1E3A8A;
  display: block;
  margin-bottom: 6px;
}

.case-block-title {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 1.7rem;
  font-weight: 800;
  color: #0A192F;
  line-height: 1.25;
}

.case-text {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1.02rem;
  line-height: 1.75;
  color: #475569;
  margin-bottom: 18px;
}

/* Comparativa Reto vs Solución */
.case-challenge-solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 28px 0 36px;
}

.case-cs-card {
  padding: 28px 24px;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
}

.case-cs-card.challenge {
  background: #FEF2F2;
  border-color: #FECACA;
  border-top: 4px solid #DC2626;
}

.case-cs-card.solution {
  background: #F0FDF4;
  border-color: #BBF7D0;
  border-top: 4px solid #16A34A;
}

.case-cs-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.case-cs-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #FFFFFF;
}

.case-cs-card.challenge .case-cs-icon {
  background: #DC2626;
}

.case-cs-card.solution .case-cs-icon {
  background: #16A34A;
}

.case-cs-title {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0A192F;
  margin: 0;
}

.case-cs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.case-cs-list li {
  font-size: 0.94rem;
  line-height: 1.55;
  color: #334155;
  position: relative;
  padding-left: 18px;
}

.case-cs-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  font-weight: bold;
}

.case-cs-card.challenge li::before {
  color: #DC2626;
}

.case-cs-card.solution li::before {
  color: #16A34A;
}

/* Fases de Ejecución del Alcance (Scope Timeline / Steps) */
.case-scope-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0;
}

.case-scope-phase {
  position: relative;
  padding: 22px 24px 22px 64px;
  background: #F8FAFD;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.case-scope-phase:hover {
  transform: translateX(4px);
  border-color: #1E3A8A;
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.07);
  background: #FFFFFF;
}

.case-phase-num {
  position: absolute;
  top: 20px;
  left: 18px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #162B4D 0%, #1E3A8A 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}

.case-phase-title {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0A192F;
  margin-bottom: 6px;
}

.case-phase-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* Bill of Materials (BOM) & Tabla de Hardware/Software */
.case-bom-table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(10, 25, 47, 0.04);
}

.case-bom-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  text-align: left;
}

.case-bom-table th {
  background-color: #0A192F;
  color: #FFFFFF;
  padding: 14px 18px;
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid #1E3A8A;
}

.case-bom-table td {
  padding: 14px 18px;
  font-size: 0.92rem;
  color: #334155;
  border-bottom: 1px solid #E2E8F0;
  line-height: 1.5;
}

.case-bom-table tr:last-child td {
  border-bottom: none;
}

.case-bom-table tr:hover td {
  background-color: #F8FAFD;
}

.case-bom-table .badge-tech {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: #EEF2FF;
  color: #1E3A8A;
  border: 1px solid #C7D2FE;
}

/* Entregables y Documentación */
.case-deliverables-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.case-deliv-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #1E3A8A;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(10, 25, 47, 0.02);
}

.case-deliv-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  color: #1E3A8A;
}

.case-deliv-content h4 {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: #0A192F;
  margin-bottom: 4px;
}

.case-deliv-content p {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #64748B;
  margin: 0;
}

/* Navegación Inferior entre Casos */
.case-pagination-nav {
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.case-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 22px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
  max-width: 320px;
}

.case-nav-btn:hover {
  background: #FFFFFF;
  border-color: #1E3A8A;
  box-shadow: 0 6px 18px rgba(30, 58, 138, 0.08);
  transform: translateY(-2px);
}

.case-nav-btn span.label {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
}

.case-nav-btn strong.title {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #0A192F;
}

/* --------------------------------------------------------------------------
   SIDEBAR STICKY DE COTIZACIÓN Y CONSULTA DE INGENIERÍA
   -------------------------------------------------------------------------- */
.case-sidebar-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 96px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-top: 4px solid var(--brand-orange, #C2541A);
  border-radius: 14px;
  padding: 32px 26px;
  box-shadow: 0 12px 36px rgba(10, 25, 47, 0.08);
}

.case-sidebar-kicker {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-orange, #C2541A);
  background: rgba(194, 84, 26, 0.08);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(194, 84, 26, 0.25);
  margin-bottom: 14px;
}

.case-sidebar-title {
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #0A192F;
  line-height: 1.3;
  margin-bottom: 10px;
}

.case-sidebar-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 22px;
}

.case-sidebar-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.case-btn-whatsapp {
  background: #1B7F49;
  color: #FFFFFF !important;
  border: 1px solid #146338;
  border-radius: 8px;
  padding: 13px 18px;
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(27, 127, 73, 0.2);
}

.case-btn-whatsapp:hover {
  background: #146338;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(27, 127, 73, 0.3);
}

.case-btn-quote {
  background: #0A192F;
  color: #FFFFFF !important;
  border: 1px solid #0A192F;
  border-radius: 8px;
  padding: 13px 18px;
  font-family: var(--font-heading, 'Barlow', sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.case-btn-quote:hover {
  background: #162B4D;
  border-color: #162B4D;
  transform: translateY(-2px);
}

.case-sidebar-spec-box {
  background: #F8FAFD;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.case-sidebar-spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid #E2E8F0;
}

.case-sidebar-spec-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.case-sidebar-spec-item span.lbl {
  color: #64748B;
}

.case-sidebar-spec-item span.val {
  color: #0A192F;
  font-weight: 700;
}

.case-sidebar-guarantee {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.4;
  padding-top: 14px;
  border-top: 1px solid #E2E8F0;
}

.case-sidebar-guarantee .shield-icon {
  font-size: 1.3rem;
  color: #1B7F49;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   RESPONSIVIDAD
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .case-grid-layout {
    grid-template-columns: 1fr;
  }
  
  .case-hero-kpi-bar {
    grid-template-columns: 1fr;
  }
  
  .case-challenge-solution-grid {
    grid-template-columns: 1fr;
  }
  
  .case-deliverables-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .case-hero {
    padding: 48px 0 40px;
  }
  
  .case-content-section {
    padding: 40px 0 60px;
  }
  
  .case-scope-phase {
    padding: 18px 18px 18px 56px;
  }
  
  .case-phase-num {
    top: 16px;
    left: 14px;
  }
}
