/* Updated: 2026-02-03 */
/* SCM1 Section Styling */

.scm1-section {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 100px;
  align-items: start;
  padding: 120px 40px 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: visible;
}

/* Override hero-split background for SCM1 */
.scm1-section.hero-split {
  background: transparent !important;
}

body.dark-theme .scm1-section.hero-split {
  background: transparent !important;
}

.scm-images-container {
  position: relative;
  width: 100%;
  height: 500px;
}

.scm-tablet {
  position: absolute;
  width: 400px;
  height: auto;
  max-width: 600px;
  border-radius: 12px;
  object-fit: contain;
  transition: transform 0.25s ease;
  animation: floatUpAndDown 6s ease-in-out infinite;
}

.scm-tablet-1 {
  top: -50px;
  left: -130px;
  z-index: 2;
}

.scm-tablet-2 {
  top: 100px;
  left: -10px;
  z-index: 1;
  opacity: 0.9;
  animation-delay: -3s; /* Delay to make it asynchronous with the first tablet */
}

.scm-tablet:hover {
  transform: scale(1.04);
}

@keyframes floatUpAndDown {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -20px;
  }
}

.scm1-section .hero-right {
  padding: 0;
  max-width: 600px;
  justify-self: start;
}

.scm-subtitle {
  font-size: 1.3rem;
  color: var(--text-principal);
  margin-bottom: 24px;
  line-height: 1.4;
  font-weight: 600;
}

.scm-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
  margin-top: 16px;
  font-weight: 400;
  max-width: 640px;
  margin-bottom: 24px;
}

.scm-floating-card {
  display: inline-block;
  padding: 16px 24px;
  margin-top: 16px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.4) 100%);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(1, 21, 72, 0.15);
  backdrop-filter: saturate(150%) blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.scm-floating-card p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0B5CD0;
  line-height: 1.4;
}

.scm-floating-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 14px 32px rgba(1, 92, 191, 0.2);
  border-color: rgba(1, 92, 191, 0.45);
}

/* Dark theme */
body.dark-theme .scm1-section {
  background: var(--dark-bg1);
}

body.dark-theme .scm-subtitle {
  color: #ffffff;
}

body.dark-theme .scm-description {
  color: #ccc;
}

body.dark-theme .scm-floating-card {
  background: rgba(0, 33, 118, 0.35);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-theme .scm-floating-card p {
  color: var(--accent-green-text);
}

body.dark-theme .scm-floating-card:hover {
  border-color: rgba(140, 214, 39, 0.45);
  box-shadow: 0 14px 32px rgba(140, 214, 39, 0.15);
}

/* --------------------------- */
/* SCM Diagrama                */
/* --------------------------- */
.scm-diagrama-section {
  padding: 80px 0 160px 0;
  position: relative;
  background: linear-gradient(180deg, rgba(1, 21, 72, 0.035) 0%, rgba(1, 21, 72, 0.06) 100%);
  overflow: hidden;
}

.scm-diagrama-header {
  text-align: center;
  margin-bottom: 32px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .scm1-section {
    display: block;
    padding: 80px 20px;
    text-align: left;
  }
  
  .scm1-section .section-title,
  .scm-subtitle,
  .scm-description,
  .scm-floating-card,
  .scm-diagrama-title,
  .scm-diagrama-subtitle {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  
  .scm1-section .hero-left {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .scm1-section .hero-right {
    max-width: 100%;
    margin-top: 32px;
  }
  
  .scm-images-container {
    height: 450px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
  }
  
  .scm-tablet {
    max-width: none !important;
    width: 70% !important;
    transition: none;
    pointer-events: none;
  }
  
  .scm-tablet:hover {
    transform: none;
  }
  
  .scm-tablet-1 {
    top: 0;
    left: 50%;
    transform: translateX(10%);
  }
  
  .scm-tablet-2 {
    top: 120px;
    left: calc(50% + 50px);
    transform: none;
  }
}

@media (max-width: 480px) {
  .scm1-section .section-title,
  .scm-subtitle,
  .scm-description,
  .scm-floating-card,
  .scm-diagrama-title,
  .scm-diagrama-subtitle {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  
  .scm-images-container {
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
  }
  
  .scm-tablet {
    max-width: 100%;
    width: 100%;
  }
  
  .scm-tablet-1 {
    top: 0;
    left: 0;
  }
  
  .scm-tablet-2 {
    top: 100px;
    left: 25%;
  }
}

.scm-diagrama-title {
  font-size: 1.6rem;
  margin: 0 0 8px 0;
  color: var(--text-principal);
}

.scm-diagrama-subtitle {
  margin: 0;
  color: #4b5563;
}

.scm-diagrama-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 12px;
  align-items: start;
  position: relative;
  justify-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

.scm-diagrama-flow::before {
  content: "";
  position: absolute;
  top: 60px;
  left: 24px;
  right: 24px;
  height: 3px;
  background: linear-gradient(90deg, rgba(1,92,191,0.25), rgba(140,214,39,0.4));
  z-index: 0;
}

.flow-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 180px;
  z-index: 1;
}

.node-card {
  width: 100%;
  min-height: 120px;
  padding: 12px 12px;
  border-radius: 16px;
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.35) 100%);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow: 0 10px 28px rgba(1, 21, 72, 0.12);
  backdrop-filter: saturate(150%) blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  word-break: break-word;
}

.node-title {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0B5CD0;
  text-align: center;
  line-height: 1.2;
}

.node-card ul { margin: 0; padding-left: 14px; color: #1f2937; }
.node-card li { line-height: 1.3; margin: 4px 0; font-size: 0.84rem; }

.flow-node:hover .node-card {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 36px rgba(1, 21, 72, 0.18);
  border-color: rgba(1,92,191,0.45);
}

.scm-diagrama-benefits {
  margin-top: 36px;
}

.benefits-title {
  text-align: center;
  margin-bottom: 12px;
  color: var(--text-principal);
}

.benefits-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 8px;
}

.benefits-track::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 8px;
  right: 8px;
  height: 3px;
  background: linear-gradient(90deg, rgba(1,92,191,0.25), rgba(140,214,39,0.4));
}

.benefit-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.benefit-index {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0B5CD0;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 24px rgba(1, 92, 191, 0.18);
  backdrop-filter: blur(6px) saturate(150%);
  transition: transform 0.2s ease;
}

.benefit-label { font-size: 0.85rem; color: #374151; text-align: center; }

.benefit-step:hover .benefit-index { transform: scale(1.06); }

/* Dark theme adjustments */
body.dark-theme .scm-diagrama-section { background: var(--dark-bg3) !important; }
body.dark-theme .scm-diagrama-title, body.dark-theme .benefits-title { color: #fff; }
body.dark-theme .scm-diagrama-subtitle { color: #cbd5e1; }
body.dark-theme .node-title { color: #8cd627; }
body.dark-theme .node-card { background: var(--dark-bg2); border-color: rgba(255,255,255,0.18); box-shadow: 0 10px 28px rgba(0,0,0,0.35); }
body.dark-theme .node-card ul { color: #e5e7eb; }
body.dark-theme .benefit-index { background: rgba(0,49,179,0.45); border-color: rgba(255,255,255,0.2); color: #fff; }
body.dark-theme .benefit-label { color: #e5e7eb; }

/* Responsive */
@media (max-width: 1280px) {
  .scm-diagrama-flow { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .flow-node::after { display: none; }
}

@media (max-width: 768px) {
  .scm-diagrama-section { padding: 32px 24px 56px 24px; }
  .scm-diagrama-flow { grid-template-columns: 1fr; gap: 16px; }
  
  .flow-node {
    max-width: 100%;
  }
  
  .node-card { 
    min-height: auto;
    width: 80%;
  }
  
  /* Remove br tags in Liquidación de Fruta card on mobile */
  .flow-node:nth-child(6) .node-title br,
  .flow-node:nth-child(6) li br {
    display: none;
  }
  
  .flow-node:nth-child(6) .node-title::after {
    content: " ";
  }
  
  .flow-node:nth-child(6) li::after {
    content: " ";
  }
  
  .scm-diagrama-flow::before {
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, rgba(1,92,191,0.25), rgba(140,214,39,0.4));
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .scm1-section {
    grid-template-columns: 1fr;
    padding: 60px 48px;
    gap: 40px;
  }

  .scm-images-container {
    height: 480px;
    max-width: 100%;
  }

  .scm-tablet {
    max-width: 380px;
  }

  .scm1-section .hero-right {
    padding-right: 0;
    max-width: 680px;
  }
}

@media (max-width: 768px) {
  .scm1-section {
    padding: 40px 24px;
    gap: 30px;
  }

  .scm-images-container {
    height: 420px;
  }

  .scm-tablet {
    max-width: 320px;
  }

  .scm-subtitle {
    font-size: 1.1rem;
  }

  .scm-description {
    font-size: 0.95rem;
  }

  /* Beneficios section - reducir tamaño y espaciado */
  .benefits-track {
    gap: 8px;
    padding: 0 4px;
  }

  .benefit-index {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .benefit-label {
    font-size: 0.75rem;
  }

  .benefits-track::before {
    top: 18px;
    left: 4px;
    right: 4px;
  }
}

@media (max-width: 480px) {
  .scm1-section {
    padding: 30px 16px;
  }

  .scm-images-container {
    height: 320px;
  }

  .scm-tablet {
    max-width: 220px;
  }

  .scm-subtitle {
    font-size: 1rem;
  }
}
