/* ==========================================================================
   DeFi 101 – Neon suave, glassmorphism, tonos claros de marca
   ========================================================================== */

.defi101-page {
  position: relative;
  padding: calc(var(--header-total, 120px) + var(--space-lg)) 0 var(--space-2xl);
  min-height: 100vh;
  overflow: hidden;
}

/* Fondo tonos claros de marca */
.defi101-neon-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #e8eef5 0%, #f0f4f9 30%, #e2e8f0 60%, #dbe2ec 100%);
  z-index: 0;
}

.defi101-neon-bg::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 700px;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(39, 117, 202, 0.12) 0%, rgba(14, 45, 80, 0.04) 50%, transparent 75%);
  animation: defi101-neon-pulse 10s ease-in-out infinite;
}

.defi101-neon-bg::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 700px;
  height: 50%;
  background: radial-gradient(ellipse at center, rgba(98, 126, 234, 0.08) 0%, rgba(39, 117, 202, 0.03) 50%, transparent 75%);
  animation: defi101-neon-pulse 10s ease-in-out infinite 3s;
}

@keyframes defi101-neon-pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Hilo/línea sutil desde card hacia header (card colgando) */
.defi101-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  max-height: 380px;
  background: linear-gradient(to bottom, rgba(140, 148, 160, 0.2) 0%, rgba(140, 148, 160, 0.12) 20%, rgba(140, 148, 160, 0.08) 50%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

.defi101-carousel__viewport::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 60px;
  background: linear-gradient(to top, rgba(140, 148, 160, 0.25) 0%, transparent 100%);
  pointer-events: none;
}

.defi101-container {
  position: relative;
  z-index: 1;
}

.defi101__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #1a2a3a;
  text-align: center;
  margin: 0 0 var(--space-md);
}

.defi101__lead {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #3d4f5f;
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-2xl);
}

/* Carousel */
.defi101-carousel {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.defi101-carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}

.defi101-carousel__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card glassmorphism */
.defi101-card {
  flex: 0 0 100%;
  min-width: 100%;
  padding: var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

.defi101-card--glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  border: 1px solid rgba(14, 45, 80, 0.1);
  border-radius: 24px;
  box-shadow:
    0 8px 40px rgba(14, 45, 80, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.defi101-card__num {
  position: absolute;
  top: var(--space-lg);
  left: var(--space-xl);
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(14, 45, 80, 0.5);
  letter-spacing: 0.05em;
}

.defi101-card__icon {
  width: 64px;
  height: 64px;
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.defi101-card__icon svg {
  width: 64px;
  height: 64px;
}

.defi101-card__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a2a3a;
  margin: 0;
}

.defi101-card__desc {
  font-size: 1rem;
  line-height: 1.5;
  color: #3d4f5f;
  margin: 0;
}

/* Flechas izquierda y derecha */
.defi101-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(14, 45, 80, 0.12);
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.defi101-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.defi101-arrow svg {
  width: 24px;
  height: 24px;
}

.defi101-arrow--prev {
  left: -56px;
}

.defi101-arrow--next {
  right: -56px;
}

@media (max-width: 900px) {
  .defi101-arrow--prev {
    left: -40px;
    width: 44px;
    height: 44px;
  }

  .defi101-arrow--next {
    right: -40px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 768px) {
  .defi101-arrow--prev {
    left: 8px;
  }

  .defi101-arrow--next {
    right: 8px;
    left: auto;
  }
}

/* Active nav link */
.header__nav--active {
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   Secciones explicativas – Blockchain, Smart Contracts, Autocustodia
   Glassmorphism, tonos morado suave + marca
   ========================================================================== */

.defi101-explain {
  position: relative;
  padding: var(--space-2xl) var(--space-md);
  overflow: hidden;
}

.defi101-explain__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.defi101-explain__bg--1 {
  background: linear-gradient(165deg, #e8e8f2 0%, #f0eef8 40%, #ebe8f5 100%);
}

.defi101-explain__bg--2 {
  background: linear-gradient(165deg, #eef0f8 0%, #ebe8f5 50%, #e6e4f2 100%);
}

.defi101-explain__bg--3 {
  background: linear-gradient(165deg, #ebe8f5 0%, #e8ecf5 50%, #e2e6f0 100%);
}

.defi101-explain .container {
  position: relative;
  z-index: 1;
  max-width: min(94%, 720px);
}

.defi101-explain--left .container {
  margin-right: auto;
  margin-left: var(--space-md);
}

.defi101-explain--right .container {
  margin-left: auto;
  margin-right: var(--space-md);
}

/* Líneas conectoras entre cards – punto A→B con luz azul suave */
.defi101-connector {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.defi101-connector svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.defi101-connector__path {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 2px rgba(140, 150, 165, 0.08));
}

.defi101-connector__dot {
  filter: drop-shadow(0 0 4px rgba(14, 45, 80, 0.2));
}

@media (max-width: 768px) {
  .defi101-explain--left .container,
  .defi101-explain--right .container {
    margin-left: auto;
    margin-right: auto;
  }

  .defi101-connector {
    opacity: 0.85;
  }
}

.defi101-explain__card {
  border-radius: 24px;
  padding: var(--space-2xl);
}

.defi101-explain__card--glass {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(14, 45, 80, 0.08);
  box-shadow:
    0 12px 48px rgba(98, 126, 234, 0.08),
    0 4px 24px rgba(14, 45, 80, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.defi101-explain__card--glass:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(14, 45, 80, 0.12);
}

.defi101-explain__num {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(98, 126, 234, 0.7);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.defi101-explain__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2a3a;
  margin: 0 0 var(--space-md);
}

.defi101-explain__text {
  font-size: 1rem;
  line-height: 1.75;
  color: #3d4f5f;
  margin: 0;
}
