/* ============================================
   PLANORA — Customizaciones page
   ============================================ */

.modules-showcase {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Module section — alternating layout */
.mod-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.mod-section:last-child {
  border-bottom: none;
}

.mod-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.mod-section--reverse .mod-section__inner {
  direction: rtl;
}

.mod-section--reverse .mod-section__inner > * {
  direction: ltr;
}

.mod-section--center {
  text-align: center;
  padding: 100px 0;
}

/* Text side */
.mod-section__tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 12px;
  opacity: 0.8;
}

.mod-section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.mod-section__desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.mod-section__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.mod-section__features li {
  font-size: 0.9rem;
  color: var(--text);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.mod-section__features li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 0.5rem;
  top: 5px;
}

/* Cost indicator */
.mod-section__cost {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mod-cost-indicator {
  display: flex;
  gap: 3px;
}

.mod-cost-indicator::before {
  content: '';
  display: flex;
  gap: 3px;
}

.mod-cost-indicator[data-level="1"]::after { content: '● ○ ○'; letter-spacing: 2px; color: var(--cyan); font-size: 0.65rem; }
.mod-cost-indicator[data-level="2"]::after { content: '● ● ○'; letter-spacing: 2px; color: var(--cyan); font-size: 0.65rem; }
.mod-cost-indicator[data-level="3"]::after { content: '● ● ●'; letter-spacing: 2px; color: var(--purple); font-size: 0.65rem; }

/* Mockup */
.mod-mockup {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.mod-section:hover .mod-mockup {
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.35);
}

[data-theme="light"] .mod-mockup {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

[data-theme="light"] .mod-section:hover .mod-mockup {
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.mod-mockup__bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}

.mod-mockup__body {
  padding: 24px;
  min-height: 220px;
}

/* --- MOCK UI: Pipeline --- */
.mock-pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  height: 100%;
}

.mock-col__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.mock-card {
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.78rem;
  color: var(--text);
  margin-bottom: 8px;
}

.mock-card--cyan { border-left: 3px solid var(--cyan); }
.mock-card--purple { border-left: 3px solid var(--purple); }
.mock-card--green { border-left: 3px solid #28c840; }

/* --- MOCK UI: Finance --- */
.mock-finance { display: flex; flex-direction: column; gap: 16px; }

.mock-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mock-stat {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  text-align: center;
}

.mock-stat__val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}

.mock-stat__val--green { color: #28c840; }
.mock-stat__val--red { color: #ff5f57; }
.mock-stat__val--cyan { color: var(--cyan); }

.mock-stat__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
  padding: 0 8px;
}

.mock-chart__bar {
  flex: 1;
  background: var(--bg-card-hover);
  border-radius: 4px 4px 0 0;
  transition: background 0.3s;
}

.mock-chart__bar--active {
  background: linear-gradient(to top, var(--cyan), var(--purple));
  box-shadow: 0 0 12px rgba(2,240,228,0.2);
}

/* --- MOCK UI: KPIs --- */
.mock-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mock-kpi {
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mock-kpi__val {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-heading);
}

.mock-kpi__label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mock-kpi__trend {
  font-size: 0.7rem;
  font-weight: 600;
}

.mock-kpi__trend--up { color: #28c840; }
.mock-kpi__trend--down { color: var(--cyan); }

/* --- MOCK UI: Map --- */
.mod-mockup__body--map {
  padding: 0;
  position: relative;
  min-height: 240px;
  background:
    radial-gradient(circle at 30% 40%, rgba(2,240,228,0.05) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(117,85,255,0.04) 0%, transparent 50%),
    var(--bg-elevated);
  overflow: hidden;
}

.mock-map {
  position: relative;
  width: 100%;
  height: 240px;
  /* Grid lines for map feel */
  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: 40px 40px;
}

.mock-map__pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cyan);
}

.mock-map__pin--active {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(2,240,228,0.4);
  animation: map-pulse 2s ease-in-out infinite;
}

@keyframes map-pulse {
  0%, 100% { box-shadow: 0 0 15px rgba(2,240,228,0.4); }
  50% { box-shadow: 0 0 25px rgba(2,240,228,0.6); }
}

.mock-map__route {
  position: absolute;
  top: 34%;
  left: 28%;
  width: 30%;
  height: 40%;
  border: 2px dashed rgba(2,240,228,0.2);
  border-radius: 20px;
  transform: rotate(-15deg);
}

/* --- MOCK UI: Chat --- */
.mock-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 80%;
}

.mock-msg--other {
  background: var(--bg-card);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.mock-msg--self {
  background: rgba(2,240,228,0.08);
  border: 1px solid rgba(2,240,228,0.15);
  align-self: flex-end;
  color: var(--text);
}

.mock-msg__author {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 4px;
}

/* --- MOCK UI: API --- */
.mock-api {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-api__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
}

.mock-api__status { font-size: 0.6rem; }
.mock-api__status--green { color: #28c840; }
.mock-api__status--yellow { color: #febc2e; }

.mock-api__name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  flex: 1;
}

.mock-api__ping {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* --- MORE section --- */
.mod-more {
  max-width: 800px;
  margin: 0 auto;
}

.mod-more__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.mod-more__desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.mod-more__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.mod-more__item {
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.88rem;
  color: var(--text);
  transition: all 0.3s;
}

.mod-more__item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.mod-more__item--custom {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(2,240,228,0.04);
  font-weight: 600;
}

/* --- AI Section --- */
.mod-section--ai {
  border-bottom-color: rgba(2, 240, 228, 0.08);
}

.mod-section__tag--ai {
  color: var(--purple) !important;
}

/* AI Visual — orbital network */
.ai-visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ai-visual__core {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.ai-visual__brain {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-visual__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
}

.ai-visual__ring--1 {
  width: 100%;
  height: 100%;
  border-color: rgba(2, 240, 228, 0.08);
  animation: ring-rotate 20s linear infinite;
}

.ai-visual__ring--2 {
  width: 75%;
  height: 75%;
  top: 12.5%;
  left: 12.5%;
  border-color: rgba(117, 85, 255, 0.12);
  animation: ring-rotate 15s linear infinite reverse;
}

.ai-visual__ring--3 {
  width: 50%;
  height: 50%;
  top: 25%;
  left: 25%;
  border-color: rgba(2, 240, 228, 0.15);
  animation: ring-rotate 10s linear infinite;
}

@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ai-visual__center {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #000;
  box-shadow:
    0 0 30px rgba(2, 240, 228, 0.2),
    0 0 60px rgba(117, 85, 255, 0.1);
  animation: ai-pulse 3s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(2, 240, 228, 0.2), 0 0 60px rgba(117, 85, 255, 0.1); }
  50% { box-shadow: 0 0 40px rgba(2, 240, 228, 0.35), 0 0 80px rgba(117, 85, 255, 0.2); }
}

.ai-visual__nodes {
  position: absolute;
  inset: 0;
}

.ai-visual__node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  transform: rotate(var(--angle)) translateY(-130px) rotate(calc(-1 * var(--angle)));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--text-muted);
  animation: node-float 4s ease-in-out infinite;
  animation-delay: var(--delay);
}

.ai-visual__node:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(2, 240, 228, 0.15);
}

@keyframes node-float {
  0%, 100% { transform: rotate(var(--angle)) translateY(-130px) rotate(calc(-1 * var(--angle))) scale(1); }
  50% { transform: rotate(var(--angle)) translateY(-135px) rotate(calc(-1 * var(--angle))) scale(1.05); }
}

/* AI Chat mockup */
.ai-visual__chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.ai-chat-msg {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 90%;
  animation: chat-in 0.5s ease both;
}

.ai-chat-msg--user {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  align-self: flex-end;
  animation-delay: 0.2s;
}

.ai-chat-msg--ai {
  background: rgba(2, 240, 228, 0.04);
  border: 1px solid rgba(2, 240, 228, 0.1);
  align-self: flex-start;
  color: var(--text);
  animation-delay: 0.6s;
}

@keyframes chat-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-chat-msg__typing {
  display: inline-flex;
  gap: 4px;
  margin-right: 6px;
}

.ai-chat-msg__typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: typing-dot 1.2s ease-in-out infinite;
  opacity: 0.4;
}

.ai-chat-msg__typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat-msg__typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .mod-section__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .mod-section--reverse .mod-section__inner {
    direction: ltr;
  }

  .mod-section {
    padding: 50px 0;
  }
}

@media (max-width: 640px) {
  .mock-pipeline {
    grid-template-columns: 1fr;
  }

  .mock-kpi-grid {
    grid-template-columns: 1fr;
  }
}
