/* Updated: 2026-02-03 */
/* Producción Section Styles */

.produccion-section {
  width: 100%;
  padding: 80px 0;
  background: white;
}

/* Tablero Subsection */
.produccion-tablero {
  padding: 80px 0;
  background: linear-gradient(135deg, #F0F9FF 0%, #F5F3FF 100%);
}

.produccion-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 56px;
}

.produccion-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0B4BB3;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.produccion-highlight {
  color: #0B4BB3;
}

.produccion-subtitle {
  font-size: 1rem;
  color: #6B7280;
  margin: 0;
  line-height: 1.6;
}

/* Dashboard */
.produccion-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.dashboard-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}



.dashboard-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.dashboard-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #015CBF;
  font-weight: 600;
}

.dashboard-equipment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.equipment-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: #F9FAFB;
  border-radius: 12px;
  transition: all 0.3s ease;
}



.equipment-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.equipment-data {
  flex-grow: 1;
}

.equipment-code {
  font-size: 0.85rem;
  color: #6B7280;
  font-weight: 500;
  margin-bottom: 4px;
}

.equipment-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0B4BB3;
  margin: 0;
}

.equipment-unit {
  font-size: 0.75rem;
  color: #9CA3AF;
  font-weight: 500;
}

.dashboard-operator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #F0F9FF;
  border-radius: 12px;
}

.operator-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.operator-info {
  flex-grow: 1;
}

.operator-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1F2937;
  margin: 0 0 4px 0;
}

.operator-status {
  font-size: 0.85rem;
  color: #6B7280;
  margin: 0;
}

.operator-count {
  font-size: 1rem;
  font-weight: 700;
  color: #0B4BB3;
  text-align: right;
}

/* Right Dashboard Card - Metrics */
.dashboard-right {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.metric-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: #F9FAFB;
  border-radius: 12px;
  transition: all 0.3s ease;
}



.metric-badge {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.metric-content {
  flex-grow: 1;
}

.metric-title {
  font-size: 0.85rem;
  color: #6B7280;
  margin: 0 0 8px 0;
  font-weight: 500;
}

.metric-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0B4BB3;
  margin: 0;
}

.metric-progress {
  font-size: 1.2rem;
  font-weight: 700;
  color: #F59E0B;
  margin: 0 0 8px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B 0%, #FCD34D 100%);
  transition: width 0.3s ease;
}

/* Image Card */
.produccion-image-card {
  position: relative;
  max-width: 1080px;
  margin: 48px auto 0;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.5s ease;
  cursor: pointer;
}

.produccion-image-card:hover {
  box-shadow: 0 16px 48px rgba(11, 75, 179, 0.2);
  transform: translateY(-8px) scale(1.02);
}

.produccion-image-main,
.produccion-image-hover {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.produccion-image-main {
  opacity: 1;
  z-index: 1;
}

.produccion-image-hover {
  opacity: 0;
  z-index: 2;
}

.produccion-image-card:hover .produccion-image-main {
  opacity: 0;
}

.produccion-image-card:hover .produccion-image-hover {
  opacity: 1;
}

/* Floating Labels */
.produccion-label {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #0B4BB3;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: opacity 0.5s ease;
  z-index: 3;
}

.produccion-label-main {
  opacity: 1;
}

.produccion-label-hover {
  opacity: 0;
}

.produccion-image-card:hover .produccion-label-main {
  opacity: 0;
}

.produccion-image-card:hover .produccion-label-hover {
  opacity: 1;
}

/* Soluciones Subsection */
.produccion-soluciones {
  padding: 80px 40px;
  background: white;
  text-align: center;
}

.soluciones-header {
  margin-bottom: 56px;
}

.soluciones-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1F2937;
  margin: 0;
  line-height: 1.3;
}

.soluciones-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1300px;
  margin: 0 auto 48px;
}

.solucion-card {
  background: white;
  border: 3px solid #E5E7EB;
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
  text-align: left;
}

.solucion-card:hover {
  border-color: #0B4BB3;
  box-shadow: 0 12px 32px rgba(11, 75, 179, 0.12);
  transform: translateY(-8px);
}

.solucion-icon {
  width: 56px;
  height: 56px;
  background: #EFF6FF;
  border: 2px solid #0B4BB3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0B4BB3;
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.solucion-card:hover .solucion-icon {
  background: #0B4BB3;
  color: white;
  transform: scale(1.1);
}

.solucion-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2937;
  margin: 0;
  line-height: 1.3;
}

.solucion-desc {
  font-size: 0.9rem;
  color: #6B7280;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.solucion-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.solucion-features li {
  font-size: 0.85rem;
  color: #015CBF;
  font-weight: 500;
  display: flex;
  gap: 8px;
}

.soluciones-quote {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0B4BB3;
  margin: 32px 0;
  line-height: 1.5;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
}

.soluciones-cta {
  margin-top: 32px;
  text-align: center;
}

.produccion-btn {
  display: inline-block;
  padding: 16px 48px;
  background: #FCD34D;
  color: #1F2937;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(252, 211, 77, 0.3);
}

.produccion-btn:hover {
  background: #FBBF24;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(252, 211, 77, 0.5);
}

/* Responsive */
@media (max-width: 1200px) {
  .soluciones-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .produccion-tablero {
    padding: 60px 24px;
  }

  .produccion-soluciones {
    padding: 60px 24px;
  }

  .produccion-dashboard {
    grid-template-columns: 1fr;
  }

  .produccion-title {
    font-size: 1.6rem;
  }

  .soluciones-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .produccion-section > div:first-child {
    margin-bottom: 24px !important;
  }

  .produccion-section > div:first-child img[src*="decoration"] {
    display: none !important;
  }

  .produccion-tablero {
    padding: 68px 16px;
    margin-top: 20px;
  }

  .produccion-soluciones {
    padding: 20px 8px;
  }

  .produccion-header {
    margin-bottom: 32px;
  }

  .produccion-title {
    font-size: 1.4rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .produccion-subtitle {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .produccion-dashboard {
    padding: 0 8px;
  }

  .dashboard-card {
    padding: 24px 16px;
  }

  .dashboard-equipment {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .equipment-item {
    padding: 12px 8px;
  }
  
  .equipment-value {
    font-size: 1.3rem;
  }

  .produccion-image-card {
    height: 300px;
    margin: 32px auto 0;
  }
  
  /* Disable hover and enable auto loop in mobile */
  .produccion-image-card:hover {
    transform: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  }
  
  .produccion-image-card:hover .produccion-image-main {
    opacity: 1;
  }
  
  .produccion-image-card:hover .produccion-image-hover {
    opacity: 0;
  }
  
  .produccion-image-card:hover .produccion-label-main {
    opacity: 1;
  }
  
  .produccion-image-card:hover .produccion-label-hover {
    opacity: 0;
  }
  
  /* Auto fade loop animation */
  .produccion-image-main {
    /* loop retirado */
  }
  
  .produccion-image-hover {
    /* loop retirado */
  }
  
  .produccion-label-main {
    /* loop retirado */
  }
  
  .produccion-label-hover {
    /* loop retirado */
  }
  
  @keyframes fadeInOut {
    0%, 45% {
      opacity: 1;
    }
    50%, 95% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  .soluciones-quote {
    font-size: 1.1rem;
  }

  .soluciones-grid {
    max-width: 90%;
  }

  .solucion-card {
    padding: 24px 20px;
    text-align: center;
  }
  
  .solucion-features {
    text-align: left;
  }
  
  .solucion-icon {
    margin-left: auto;
    margin-right: auto;
  }
  
  .solucion-title {
    text-align: center;
  }

  .soluciones-title {
    font-size: 1.3rem;
  }
}
.produccion-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.produccion-image img {
  width: 100%;
  max-width: 672px;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

/* KPIs Grid */
.produccion-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.produccion-kpi-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.produccion-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(212, 164, 69, 0.15);
}

.produccion-kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #d4a445;
  margin-bottom: 8px;
}

.produccion-kpi-label {
  font-size: 0.95rem;
  color: #666;
  font-weight: 500;
}

/* Features List */
.produccion-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.produccion-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.produccion-feature-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: rgba(212, 164, 69, 0.15);
  border: 2px solid #d4a445;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d4a445;
  font-size: 1.1rem;
  margin-top: 2px;
}

.produccion-feature-text {
  flex: 1;
  font-size: 1rem;
  color: #333;
  line-height: 1.5;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
  .produccion-subsection,
  .produccion-subsection.reverse {
    flex-direction: column;
    gap: 36px;
  }

  .produccion-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .produccion-section {
    padding: 48px 8px;
  }

  .produccion-subsection {
    margin-bottom: 40px;
  }

  .produccion-content h2 {
    font-size: 1.75rem;
  }

  .produccion-subtitle {
    font-size: 1rem;
  }

  .produccion-kpi-card {
    border-width: 2px;
  }

  .produccion-kpi-value {
    font-size: 2rem;
  }
}
/* Producción Subsections (para cacao.html) */
.produccion-subsection {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 40px;
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
}

.produccion-subsection.reverse {
  grid-template-columns: 1fr 1fr;
  direction: rtl;
}

.produccion-subsection.reverse > * {
  direction: ltr;
}

.produccion-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #0b1f3f;
  margin-bottom: 16px;
  line-height: 1.3;
}

.produccion-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
}

.produccion-subtitle {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}

.produccion-badge {
  display: inline-block;
  background: rgba(212, 164, 69, 0.15);
  color: #d4a445;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.produccion-image {
  width: 100%;
  height: 640px;
  overflow: hidden;
  border-radius: 16px;
}

.produccion-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.highlight {
  color: #d4a445;
}

@media (max-width: 1024px) {
  .produccion-subsection,
  .produccion-subsection.reverse {
    grid-template-columns: 1fr;
    gap: 40px;
    direction: ltr;
  }

  .produccion-subsection.reverse > * {
    direction: ltr;
  }

  .produccion-image {
    height: 480px;
  }
}
/* Dark theme overrides */
body.dark-theme .produccion-tablero {
  background: var(--dark-bg1) !important;
}

body.dark-theme .produccion-header .produccion-title {
  color: #ffffff !important;
}

body.dark-theme .produccion-header .produccion-subtitle {
  color: #d1d5db !important;
}

body.dark-theme .dashboard-card {
  background: var(--dark-bg2) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}



body.dark-theme .dashboard-label,
body.dark-theme .equipment-label,
body.dark-theme .produccion-content h2,
body.dark-theme .produccion-content h3,
body.dark-theme .produccion-content p {
  color: #ffffff !important;
}

body.dark-theme .dashboard-section-header {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .equipment-item {
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .dashboard-operator {
  background: var(--dark-bg1) !important;
}

body.dark-theme .operator-name,
body.dark-theme .operator-status,
body.dark-theme .operator-count {
  color: #ffffff !important;
}

body.dark-theme .dashboard-right {
  background: var(--dark-bg2) !important;
}

body.dark-theme .metric-row {
  background: var(--dark-bg1) !important;
}

body.dark-theme .produccion-soluciones {
  background: var(--dark-bg1) !important;
}

body.dark-theme .soluciones-title {
  color: #ffffff !important;
}

body.dark-theme .solucion-card {
  background: var(--dark-bg2) !important;
  border-color: rgba(100, 181, 246, 0.2) !important;
}

body.dark-theme .solucion-card:hover {
  border-color: rgba(100, 181, 246, 0.6) !important;
  box-shadow: 0 12px 32px rgba(11, 75, 179, 0.25) !important;
}

body.dark-theme .solucion-title {
  color: #ffffff !important;
}

body.dark-theme .solucion-desc {
  color: #d1d5db !important;
}

body.dark-theme .solucion-features li {
  color: #64b5f6 !important;
}

body.dark-theme .produccion-section img[src*="decoration"] {
  filter: brightness(0) invert(1) !important;
}

@media (max-width: 768px) {
  .produccion-subsection {
    padding: 24px 8px 56px;
    gap: 32px;
  }
  
  .produccion-subsection:first-of-type {
    padding-top: 0 !important;
  }
  
  #video-produccion {
    padding: 0 !important;
    margin: 0 !important;
    margin-top: -40px !important;
    margin-bottom: -40px !important;
  }

  .produccion-content h2 {
    font-size: 1.5rem;
  }

  .produccion-image {
    height: 400px;
  }
}
/* ===== Tech-glass: Producción (dashboard command-center) ===== */
.produccion-section {
  background:
    radial-gradient(760px 380px at 82% -5%, rgba(1, 92, 191, 0.30), transparent 60%),
    linear-gradient(160deg, #0a1b3d 0%, #07122a 100%) !important;
  position: relative;
}
.produccion-section::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(100, 181, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 181, 246, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 12%, #000, transparent 80%);
  mask-image: radial-gradient(circle at 50% 12%, #000, transparent 80%);
  pointer-events: none;
}
.produccion-section > * { position: relative; z-index: 1; }
.produccion-title { color: #fff !important; }
.produccion-title span, .produccion-title .highlight { color: #4DA3FF !important; }
.produccion-subtitle { color: #c3d2ec !important; }
.dashboard-card {
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  box-shadow: none !important;
}
.dashboard-section-header, .dashboard-operator, .equipment-code,
.equipment-value, .metric-content, .dashboard-label, .metric-row,
.dashboard-card h1, .dashboard-card h2, .dashboard-card h3, .dashboard-card h4,
.dashboard-card strong { color: #e7eef9 !important; }
.equipment-unit, .equipment-data, .dashboard-status, .dashboard-card p,
.dashboard-card span:not(.equipment-value):not(.metric-badge) { color: #9fb3d6 !important; }
.equipment-item, .metric-row {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}
.equipment-icon, .metric-badge {
  background: rgba(100, 181, 246, 0.16) !important; color: #64B5F6 !important;
}

/* completar tablero anidado */
.produccion-tablero { background: transparent !important; }
.produccion-header, .produccion-header h2, .produccion-header h3, .produccion-header p { color: #e7eef9 !important; }
.produccion-header span, .produccion-header .highlight { color: #4DA3FF !important; }
.dashboard-left, .dashboard-right, .dashboard-equipment {
  background: rgba(255,255,255,0.05) !important; border: 1px solid rgba(255,255,255,0.10) !important;
}
.produccion-section .soluciones-title { color: #0a1b3d; }

/* ===== Dashboard "Empacadora en tiempo real" — animación profesional ===== */
/* Revelado suave (fade + slide-up) con stagger, easing pro (sin rebote) */
/* estado oculto SOLO si el JS está activo (.anim-ready); si el JS falla, todo queda visible */
.produccion-dashboard.anim-ready .dashboard-card,
.produccion-dashboard.anim-ready .equipment-item,
.produccion-dashboard.anim-ready .dashboard-operator,
.produccion-dashboard.anim-ready .metric-row {
  opacity: 0;
  transform: translateY(22px);
  will-change: transform, opacity;
}
.produccion-dashboard.is-visible .dashboard-card { animation: dashReveal .7s cubic-bezier(.22,1,.36,1) forwards; }
.produccion-dashboard.is-visible .dashboard-right { animation-delay: .1s; }
.produccion-dashboard.is-visible .equipment-item,
.produccion-dashboard.is-visible .dashboard-operator,
.produccion-dashboard.is-visible .metric-row { animation: dashReveal .6s cubic-bezier(.22,1,.36,1) forwards; }
.produccion-dashboard.is-visible .equipment-item:nth-of-type(2) { animation-delay: .12s; }
.produccion-dashboard.is-visible .dashboard-operator { animation-delay: .22s; }
.produccion-dashboard.is-visible .dashboard-right .metric-row:nth-of-type(1) { animation-delay: .14s; }
.produccion-dashboard.is-visible .dashboard-right .metric-row:nth-of-type(2) { animation-delay: .24s; }
.produccion-dashboard.is-visible .dashboard-right .metric-row:nth-of-type(3) { animation-delay: .34s; }
@keyframes dashReveal { to { opacity: 1; transform: none; } }

/* Punto "En línea" — indicador live con pulso sutil (no parpadeo) */
.dashboard-status { gap: 7px; }
.dashboard-status .status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #22c55e; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  /* punto live estatico */
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  55%      { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
}

/* La barra de progreso se llena con easing al revelarse (la anima el JS) */
.produccion-dashboard .progress-fill { transition: width 1.3s cubic-bezier(.22,1,.36,1); }

/* Accesibilidad: sin movimiento si el usuario lo pide */
@media (prefers-reduced-motion: reduce) {
  .produccion-dashboard .dashboard-card,
  .produccion-dashboard .equipment-item,
  .produccion-dashboard .dashboard-operator,
  .produccion-dashboard .metric-row { opacity: 1 !important; transform: none !important; animation: none !important; }
  .dashboard-status .status-dot { animation: none; }
  .produccion-dashboard .progress-fill { transition: none; }
}
