/* iARTESANA · Estilos y Animaciones del Ecosistema */

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.node-line {
  position: relative;
}

.node-line::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -16px;
  width: 16px;
  height: 2px;
  background-color: #334155;
}

@media (max-width: 768px) {
  .node-line::after {
    display: none;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.apple-modal {
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details[open] summary .accordion-chevron {
  transform: rotate(180deg);
}

#mental-map-container:fullscreen,
#mental-map-container:-webkit-full-screen {
  background-color: #090d16;
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes branchReveal {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  65% {
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.map-branch-revealed {
  animation: branchReveal 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Estilos para Tarjetas con Zoom / Lightbox */
.zoomable-card {
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.zoomable-card:hover {
  transform: translateY(-2px);
}

.zoom-card-trigger {
  opacity: 0.45;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.zoomable-card:hover .zoom-card-trigger {
  opacity: 1;
}

.zoomed-card-body {
  font-size: 1.05rem;
  line-height: 1.65;
}

.zoomed-card-body h4, 
.zoomed-card-body h5 {
  font-size: 1.5rem !important;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.zoomed-card-body ul li {
  font-size: 1.05rem !important;
  padding: 0.35rem 0;
  line-height: 1.55;
}

.zoomed-card-body p, 
.zoomed-card-body div {
  font-size: 1.02rem;
  line-height: 1.6;
}

.zoomed-card-body .zoom-card-trigger {
  display: none !important;
}

/* Animación de apertura suave del zoom */
@keyframes zoomModalPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.zoom-modal-content {
  animation: zoomModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Área de impresión para Presupuesto PDF */
@media print {
  @page {
    margin: 1.2cm;
    size: A4 portrait;
  }
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body * {
    visibility: hidden;
  }
  #printArea,
  #printArea * {
    visibility: visible;
  }
  #printArea {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .print-avoid-break {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* Slider y gráfico de progresión cartesiana (Ejes X e Y) */
.expo-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 9999px;
  background: #1e293b;
  outline: none;
  transition: all 0.2s ease;
}

.expo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.expo-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #34d399;
}

.expo-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
  border: 2px solid #ffffff;
}

@keyframes pulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(52, 211, 153, 0.95));
  }
}

.glow-expo-line {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Modal de Zoom Inmersivo para el Gráfico Cartesiano */
#cartesianZoomModal {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#cartesianZoomModal .zoom-modal-dialog {
  animation: cartesianModalZoomIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cartesianModalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Animaciones del Ecualizador de Audio para Tarjetas */
@keyframes audioBarWave {
  0%, 100% {
    height: 4px;
  }
  50% {
    height: 12px;
  }
}

.animate-audio-bar-1 {
  animation: audioBarWave 0.5s ease-in-out infinite;
}

.animate-audio-bar-2 {
  animation: audioBarWave 0.7s ease-in-out infinite 0.15s;
}

.animate-audio-bar-3 {
  animation: audioBarWave 0.45s ease-in-out infinite 0.3s;
}

