/* =======================================================
   CRM Page — crm.css
   Styles específicos de la página educativa de CRM
   ======================================================= */

/* ── Navbar override para página CRM ── */
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.navbar-back:hover { color: var(--color-primary); }

/* ── Hero ── */
.crm-page-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0812;
  padding: 120px 5% 80px;
}

.crm-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 50%, rgba(123,105,255,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(196,59,255,0.12) 0%, transparent 60%);
}

.crm-hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  text-align: center;
}

.crm-hero-title {
  font-family: var(--font-headings);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 20px 0 24px;
}

.crm-hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, #a78bff, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.crm-hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 36px;
}

.crm-hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Float cards in hero */
.crm-hero-float-cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-card {
  position: absolute;
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  animation: floatDrift 6s ease-in-out infinite;
}

.fc-1 { top: 22%; left: 5%;  animation-delay: 0s; }
.fc-2 { top: 38%; right: 5%; animation-delay: 1.2s; }
.fc-3 { bottom: 28%; left: 8%; animation-delay: 2.4s; }
.fc-4 { bottom: 18%; right: 7%; animation-delay: 0.8s; }

@keyframes floatDrift {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── Shared section styles ── */
.crm-section {
  padding: 100px 0;
}

.crm-section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.crm-section-header h2 {
  font-family: var(--font-headings);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  color: #0d0d12;
  margin: 14px 0 14px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.crm-section-header p {
  color: #666;
  font-size: 1rem;
  line-height: 1.7;
}

.section-tag-red {
  display: inline-block;
  background: #fff0f0;
  color: #d93030;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid #ffc0c0;
}

.section-tag-green {
  display: inline-block;
  background: #f0fff4;
  color: #1a7a40;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid #a0e0b0;
}

.crm-pill-dark {
  background: #0d0d12;
  color: #c4b5ff;
}

/* ── Chaos Section ── */
.crm-chaos-section { background: #fff; }

.chaos-grid-lg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.chaos-card-lg {
  background: #fff;
  border: 1.5px solid #ffe0e0;
  border-radius: 20px;
  padding: 36px 32px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(40px);
}

.chaos-card-lg.visible {
  animation: cardReveal 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
}

.chaos-card-lg[data-index="1"] { animation-delay: 0.1s; }
.chaos-card-lg[data-index="2"] { animation-delay: 0.2s; }
.chaos-card-lg[data-index="3"] { animation-delay: 0.3s; }
.chaos-card-lg[data-index="4"] { animation-delay: 0.4s; }
.chaos-card-lg[data-index="5"] { animation-delay: 0.5s; }

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

.chaos-card-lg:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(255,80,80,0.08);
}

.chaos-number {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 3rem;
  font-weight: 900;
  color: #f0f0f0;
  font-family: var(--font-headings);
  line-height: 1;
}

.chaos-icon-lg { font-size: 2.8rem; margin-bottom: 16px; }

.chaos-card-lg h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0d0d12;
  margin-bottom: 12px;
}

.chaos-card-lg p {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
}

.chaos-cost {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: #fff5f5;
  border-radius: 10px;
  border-left: 3px solid #ff6b6b;
}

.cost-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #d93030;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cost-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: #333;
}

.chaos-card-summary {
  background: linear-gradient(135deg, #f8f5ff, #f0ebff);
  border-color: #c4b5ff;
}

.chaos-card-summary:hover {
  box-shadow: 0 20px 50px rgba(123,105,255,0.12);
}

/* ── Demo Section ── */
.crm-demo-section { background: #f9f8ff; }

.crm-app-frame-lg {
  max-width: 100%;
  box-shadow: 0 32px 100px rgba(123,105,255,0.18);
}

.crm-sidebar-lg { width: 160px; }

.crm-main-lg { padding: 24px; gap: 20px; }

.crm-stats-row-lg {
  grid-template-columns: repeat(4, 1fr);
}

.crm-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.crm-notif-list-lg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-notif-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.crm-mini-pipeline {
  background: #fff;
  border: 1px solid #ede9ff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-stage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-stage-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #555;
  width: 80px;
  flex-shrink: 0;
}

.mini-stage-bar {
  flex: 1;
  height: 6px;
  background: #f0ecff;
  border-radius: 50px;
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
}

.blue-fill   { background: #5b8cff; }
.orange-fill { background: #ff9f43; }
.yellow-fill { background: #ffd32a; }
.green-fill  { background: #27c93f; }

.mini-stage-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7b69ff;
  width: 16px;
  text-align: right;
}

/* ── Pipeline Page Section ── */
.crm-pipeline-page-section { background: #fff; }

.crm-pipeline-lg {
  gap: 0;
}

.draggable { cursor: grab; }
.draggable:active { cursor: grabbing; }
.draggable.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}
.pipeline-col.drag-over {
  background: #f0ecff;
  border-color: #7b69ff;
  border-style: dashed;
}

.pipeline-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 0.82rem;
  color: #aaa;
}
.pipeline-hint i { margin-right: 6px; }

/* ── Industries Section ── */
.crm-industries-section { background: #fafafa; }

.industry-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.industry-tab {
  background: #fff;
  border: 1.5px solid #e8e0ff;
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  transition: all 0.25s ease;
}

.industry-tab.active,
.industry-tab:hover {
  background: linear-gradient(135deg, #7b69ff, #c43bff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(123,105,255,0.3);
}

.industry-panel { display: none; }
.industry-panel.active { display: block; }

.industry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.industry-scenario {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid #eee;
}

.industry-scenario h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: #0d0d12;
}

.scenario-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-list li {
  font-size: 0.88rem;
  color: #555;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.scenario-list li::before { flex-shrink: 0; font-size: 1rem; }
.scenario-list.bad  li::before { content: '✗'; color: #d93030; }
.scenario-list.good li::before { content: '✓'; color: #27c93f; font-weight: 900; }

.industry-result {
  grid-column: 1 / -1;
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.result-stat {
  background: linear-gradient(135deg, #7b69ff, #c43bff);
  border-radius: 16px;
  padding: 24px 36px;
  text-align: center;
  color: #fff;
  min-width: 200px;
}

.result-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  font-family: var(--font-headings);
  margin-bottom: 6px;
}

.result-lbl {
  font-size: 0.82rem;
  opacity: 0.85;
  line-height: 1.4;
}

/* ── ROI Calculator ── */
.crm-roi-section { background: #0d0d12; }

.crm-roi-section .crm-section-header h2 { color: #fff; }
.crm-roi-section .crm-section-header p  { color: rgba(255,255,255,0.55); }

.roi-calculator {
  max-width: 900px;
  margin: 0 auto;
}

.roi-inputs {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
}

.roi-input-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
}

.roi-val {
  color: #a78bff;
  font-size: 1rem;
  font-weight: 800;
}

.roi-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 50px;
  outline: none;
  cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7b69ff, #c43bff);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(123,105,255,0.5);
}

.roi-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  margin-top: 6px;
}

.roi-results {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.roi-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 28px 36px;
  text-align: center;
  min-width: 200px;
  flex: 1;
}

.roi-card.projected {
  background: linear-gradient(135deg, rgba(123,105,255,0.25), rgba(196,59,255,0.2));
  border-color: rgba(123,105,255,0.4);
}

.roi-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
}

.roi-card-num {
  font-size: 2.4rem;
  font-weight: 900;
  font-family: var(--font-headings);
  color: #fff;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.roi-card.projected .roi-card-num { color: #c4b5ff; }

.roi-card-sub {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

.roi-vs {
  font-size: 1.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.roi-gain-box {
  width: 100%;
  background: linear-gradient(135deg, #27c93f20, #27c93f10);
  border: 1px solid #27c93f40;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roi-gain-label {
  font-size: 0.75rem;
  color: #27c93f;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.roi-gain-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: #27c93f;
  font-family: var(--font-headings);
  transition: all 0.3s ease;
}

.roi-gain-year {
  font-size: 0.85rem;
  color: rgba(39,201,63,0.7);
}

.roi-disclaimer {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.25);
  margin-top: 16px;
}

/* ── CTA Section ── */
.crm-cta-section {
  background: linear-gradient(135deg, #7b69ff, #c43bff);
  text-align: center;
  padding: 120px 5%;
}

.crm-cta-inner {
  max-width: 680px;
  margin: 0 auto;
}

.crm-cta-section h2 {
  font-family: var(--font-headings);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  margin: 20px 0 16px;
  line-height: 1.2;
}

.crm-cta-section p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 36px;
}

.crm-cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-white {
  background: #fff;
  color: #7b69ff;
  border: none;
}
.btn-white:hover { background: #f0ecff; }

.btn-outline-white {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ── Footer ── */
.crm-footer {
  background: #0a0812;
  padding: 24px 0;
}

.crm-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

.crm-footer a { color: rgba(255,255,255,0.5); text-decoration: none; }
.crm-footer a:hover { color: #c4b5ff; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .crm-stats-row-lg  { grid-template-columns: repeat(2, 1fr); }
  .crm-demo-grid     { grid-template-columns: 1fr; }
  .industry-grid     { grid-template-columns: 1fr; }
  .crm-sidebar-lg    { display: none; }
  .crm-hero-float-cards { display: none; }
}

@media (max-width: 600px) {
  .crm-stats-row-lg { grid-template-columns: 1fr 1fr; }
  .chaos-grid-lg    { grid-template-columns: 1fr; }
  .roi-results      { flex-direction: column; }
  .roi-vs           { transform: rotate(90deg); }
  .crm-footer .container { flex-direction: column; gap: 8px; text-align: center; }
}
