﻿/* Section 7: Entrena tu Mente */
.sec7-entrena {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  padding: 60px 20px;
}

.sec7-bg-image {
  position: absolute;
  inset: 0;
  /* PC: cambia esta URL si quieres otra imagen de fondo */
  background: url('./assets/images/pc33.jpg') center/cover no-repeat;
  opacity: 1;
  z-index: 0;
  animation: s7BgLoop 18s ease-in-out infinite;
  transform-origin: center;
}

.sec7-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
}

/* ===== HEADER - Estilo similar a SecciÃ³n 6 ===== */
.sec7-header {
  position: relative;
  z-index: 5;
  text-align: center;
  margin-bottom: 48px;
}

.sec7-title-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 40px;
  position: relative;
}

.sec7-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(105,42,198,0.1);
  border: 1px solid rgba(105,42,198,0.25);
  border-radius: 999px;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateX(280px);
  transition: opacity 1.02s ease, transform 1.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sec7-dot {
  width: 8px;
  height: 8px;
  background: #692ac6;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(105,42,198,0.8);
  animation: s7Pulse 2s ease-in-out infinite;
}

@keyframes s7Pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
}

.sec7-label span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #692ac6;
}

/* TÃ­tulo principal estilo sec6 */
.sec7-pro-title {
  margin: 0;
  font-family: 'Gilroy-Bold', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sec7-pro-line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.02s ease, transform 1.3s cubic-bezier(0.22, 1, 0.36, 1), filter .5s ease;
}

.sec7-pro-line:nth-child(1) {
  font-size: clamp(16px, 2.2vw, 24px);
  color: rgba(26,26,46,0.6);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  transform: translateX(340px);
}

.sec7-pro-line:nth-child(2) {
  font-size: clamp(40px, 6.5vw, 76px);
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #1a1a2e 0%, #692ac6 50%, #1a1a2e 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 12px rgba(105,42,198,0.2));
  transform: translateY(220px);
  animation: s7GradientShift 4s ease infinite;
  position: relative;
}

.sec7-pro-line:nth-child(2)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #692ac6, #c77dff, #692ac6, transparent);
  border-radius: 2px;
  opacity: 0;
  transition: width .9s ease-out .75s, opacity .35s ease .75s;
}

.sec7-pro-line:nth-child(3) {
  font-size: clamp(14px, 2vw, 22px);
  color: #692ac6;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 8px;
  transform: translateX(460px);
  text-shadow: 0 0 20px rgba(105,42,198,0.3);
}

/* Underline decorativo */
.sec7-title-underline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(220px) scaleX(.72);
  transition: opacity .95s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.sec7-entrena.sec7-title-visible .sec7-label {
  opacity: 1;
  transform: translateX(0);
}
.sec7-entrena.sec7-title-visible .sec7-pro-line:nth-child(1) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: .14s;
}
.sec7-entrena.sec7-title-visible .sec7-pro-line:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .24s;
}
.sec7-entrena.sec7-title-visible .sec7-pro-line:nth-child(3) {
  opacity: 1;
  transform: translateX(0);
  transition-delay: .34s;
}
.sec7-entrena.sec7-title-visible .sec7-title-underline {
  opacity: 1;
  transform: translateY(0) scaleX(1);
  transition-delay: .42s;
}
.sec7-entrena.sec7-title-visible .sec7-pro-line:nth-child(2)::after {
  width: 80%;
  opacity: 1;
}

.sec7-underline-left,
.sec7-underline-right {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105,42,198,0.5));
}

.sec7-underline-right {
  background: linear-gradient(90deg, rgba(105,42,198,0.5), transparent);
}

.sec7-underline-center {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(105,42,198,0.6);
  border-radius: 50%;
  position: relative;
  animation: s7Rotate 8s linear infinite;
}

.sec7-underline-center::before {
  content: '';
  position: absolute;
  inset: 2px;
  background: #692ac6;
  border-radius: 50%;
  animation: s7Pulse 2s ease-in-out infinite;
}

@keyframes s7FadeInDown {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes s7FadeInUp {
  0% { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  60% { filter: blur(2px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes s7FadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes s7LineGrow {
  0% { width: 0; }
  100% { width: 80%; }
}

@keyframes s7GradientShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@keyframes s7Rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes s7BgLoop {
  0%, 100% { transform: scale(1) translate3d(0, 0, 0); filter: saturate(1) contrast(1); }
  50% { transform: scale(1.05) translate3d(0, -1%, 0); filter: saturate(1.1) contrast(1.05); }
}

/* ===== WIDGET LAYOUT ===== */
.sec7-widget {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 340px;
}

/* ===== HUB ===== */
.sec7-hub {
  width: 240px;
  height: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(105,42,198,0.2);
  border: 3px solid rgba(105,42,198,0.12);
  animation: s7HubFloat 3.2s ease-in-out infinite, s7HubPulse 1.6s ease-in-out infinite;
}

@keyframes s7HubFloat {
  0%, 100% { transform: translateY(0px); box-shadow: 0 20px 60px rgba(105,42,198,0.2); }
  50% { transform: translateY(-8px); box-shadow: 0 30px 80px rgba(105,42,198,0.3); }
}

@keyframes s7HubPulse {
  0%, 100% { box-shadow: 0 20px 60px rgba(105,42,198,0.25), 0 0 0 0 rgba(94,180,185,0.45); }
  50% { box-shadow: 0 34px 90px rgba(105,42,198,0.35), 0 0 0 26px rgba(94,180,185,0); }
}

.sec7-hub:hover {
  border-color: rgba(105,42,198,0.3);
}

.sec7-hub.pressed {
  animation: s7HubPress 0.4s ease;
}

@keyframes s7HubPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.sec7-hub-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(105,42,198,0.3));
  transition: all 0.3s ease;
}

.sec7-hub:hover .sec7-hub-img {
  filter: drop-shadow(0 15px 40px rgba(105,42,198,0.5));
}

.sec7-hub-hint {
  font-size: 13px;
  color: #888;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  text-align: center;
}

.sec7-hub:hover .sec7-hub-hint {
  opacity: 1;
}

/* Hub activado en PC */
.sec7-hub.activated {
  width: 100px;
  height: 100px;
  box-shadow: 0 8px 24px rgba(105,42,198,0.15);
  border-color: rgba(105,42,198,0.2);
  animation: s7HubFloatSmall 4s ease-in-out infinite;
}

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

.sec7-hub.activated .sec7-hub-img {
  width: 70px;
  height: 70px;
}

.sec7-hub.activated .sec7-hub-hint {
  display: none;
}

/* ===== GRID DE CARDS ===== */
.sec7-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  width: 100%;
  max-width: 720px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateX(20px);
}

.sec7-grid.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* ===== CARDS con efecto 3D y animaciÃ³n loop ===== */
.sec7-card {
  background: url('https://iqexponencial.app/api/images/aa745ed5-f424-49f2-ac3b-dcadaa2fc5d2') center/cover no-repeat;
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border: 1px solid rgba(0, 180, 255, 0.25);
  box-shadow:
    0 8px 30px rgba(0,0,0,0.15),
    0 0 26px rgba(94, 180, 185, 0.28),
    0 0 42px rgba(94, 180, 185, 0.22),
    0 0 20px rgba(0, 180, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  border: 2px solid transparent;
  opacity: 0;
  transform: scale(0.86);
  transform-style: preserve-3d;
  perspective: 800px;
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 200px;
}
.sec7-card:nth-child(1){ transform: translateX(-180px) scale(0.86); }
.sec7-card:nth-child(2){ transform: translateY(180px) scale(0.86); }
.sec7-card:nth-child(3){ transform: translateY(-180px) scale(0.86); }
.sec7-card:nth-child(4){ transform: translateX(180px) scale(0.86); }

/* Shimmer effect */
.sec7-card::before {
  content: '';
  position: absolute;
  top: -100%;
  left: -60%;
  width: 40%;
  height: 300%;
  background: linear-gradient(90deg, transparent, rgba(105,42,198,0.08), transparent);
  transform: skewX(-20deg);
  animation: s7Shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.sec7-card:nth-child(1)::before { animation-delay: 0s; }
.sec7-card:nth-child(2)::before { animation-delay: 0.75s; }
.sec7-card:nth-child(3)::before { animation-delay: 1.5s; }
.sec7-card:nth-child(4)::before { animation-delay: 2.25s; }

@keyframes s7Shimmer {
  0% { left: -60%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

.sec7-card.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: opacity 1s ease, transform 1.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}

/* AnimaciÃ³n float loop por card */
.sec7-card:nth-child(1).visible { animation: s7CardFloat1 3.5s ease-in-out infinite 0.5s; }
.sec7-card:nth-child(2).visible { animation: s7CardFloat2 3.8s ease-in-out infinite 0.8s; }
.sec7-card:nth-child(3).visible { animation: s7CardFloat3 3.2s ease-in-out infinite 0.3s; }
.sec7-card:nth-child(4).visible { animation: s7CardFloat4 4s ease-in-out infinite 1s; }

@keyframes s7CardFloat1 {
  0%, 100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08),
      0 0 26px rgba(94, 180, 185, 0.28),
      0 0 42px rgba(94, 180, 185, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: translateY(-4px) rotateX(0.6deg) rotateY(-0.4deg);
    box-shadow: 0 18px 50px rgba(105,42,198,0.12),
      0 0 28px rgba(94, 180, 185, 0.3),
      0 0 46px rgba(94, 180, 185, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}
@keyframes s7CardFloat2 {
  0%, 100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08),
      0 0 26px rgba(94, 180, 185, 0.28),
      0 0 42px rgba(94, 180, 185, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: translateY(-5px) rotateX(-0.5deg) rotateY(0.7deg);
    box-shadow: 0 20px 55px rgba(105,42,198,0.14),
      0 0 28px rgba(94, 180, 185, 0.3),
      0 0 46px rgba(94, 180, 185, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}
@keyframes s7CardFloat3 {
  0%, 100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08),
      0 0 26px rgba(94, 180, 185, 0.28),
      0 0 42px rgba(94, 180, 185, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: translateY(-4px) rotateX(0.6deg) rotateY(0.4deg);
    box-shadow: 0 16px 45px rgba(105,42,198,0.1),
      0 0 28px rgba(94, 180, 185, 0.3),
      0 0 46px rgba(94, 180, 185, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}
@keyframes s7CardFloat4 {
  0%, 100% {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08),
      0 0 26px rgba(94, 180, 185, 0.28),
      0 0 42px rgba(94, 180, 185, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  50% {
    transform: translateY(-5px) rotateX(-0.7deg) rotateY(-0.6deg);
    box-shadow: 0 22px 60px rgba(105,42,198,0.16),
      0 0 28px rgba(94, 180, 185, 0.3),
      0 0 46px rgba(94, 180, 185, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
}

.sec7-card:hover {
  border-color: #692ac6;
  box-shadow: 0 24px 60px rgba(105,42,198,0.22) !important;
  animation: none !important;
  transform: translateY(-6px) scale(1.02) rotateX(1deg) !important;
}

.sec7-card-icon {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  transition: transform 0.3s ease;
  background: transparent;
  flex-shrink: 0;
}

.sec7-card:hover .sec7-card-icon {
  transform: scale(1.1) translateY(-2px);
}

.sec7-card-icon img,
.sec7-card-icon video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sec7-card h3 {
  font-size: 16px;
  color: #2d2d2d;
  margin: 0;
  font-weight: 700;
  font-family: 'Gilroy-Bold', sans-serif;
  text-shadow: none;
}

.sec7-card p {
  font-size: 13px;
  color: #555;
  line-height: 1.4;
  text-shadow: none;
  margin: 0;
}

/* ===== MODAL ===== */
.sec7-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
}

.sec7-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sec7-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
  max-width: 420px;
  width: 90%;
  padding: 36px;
  text-align: center;
}

.sec7-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.sec7-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f0f0f0;
  border-radius: 50%;
  cursor: pointer;
  color: #666;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.sec7-close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

.sec7-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #fff;
}

.sec7-modal-icon ion-icon {
  font-size: 36px;
}

.sec7-modal h3 {
  font-size: 22px;
  color: #1a1a2e;
  margin-bottom: 12px;
  font-weight: 700;
  font-family: 'Gilroy-Bold', sans-serif;
}

.sec7-modal p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 18px;
}

.sec7-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}

.sec7-modal-tags span {
  background: rgba(105,42,198,0.08);
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: #692ac6;
  font-weight: 600;
}

.sec7-modal-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: url('https://iqexponencial.app/api/images/44c8c952-c0ad-409d-a18d-074cdd3936b1') center/cover no-repeat;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'Gilroy-Bold', sans-serif;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.sec7-modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  filter: brightness(1.1);
}

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 768px) {
  .sec7-pro-line:nth-child(2) { font-size: clamp(32px, 8vw, 56px); }
  .sec7-widget { gap: 24px; }
  .sec7-hub { width: 200px; height: 200px; }
  .sec7-hub-img { width: 130px; height: 130px; }
  .sec7-hub.activated { width: 80px; height: 80px; }
  .sec7-hub.activated .sec7-hub-img { width: 55px; height: 55px; }
  .sec7-grid { max-width: 520px; gap: 12px; }
  .sec7-card { padding: 16px 12px; }
  .sec7-card-icon { width: 120px; height: 120px; }
}

/* ===== RESPONSIVE: MÃ“VIL ===== */
@media (max-width: 600px) {
  .sec7-entrena { padding: 40px 16px; }
  .sec7-title-wrapper { padding: 16px 20px; }
  .sec7-pro-line:nth-child(2) { font-size: clamp(28px, 10vw, 44px); }
  .sec7-bg-image {
    background-image: url('./assets/images/pc33.jpg');
    opacity: 1;
    animation: s7BgLoopMobile 16s ease-in-out infinite;
  }

  .sec7-widget {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
  }

  .sec7-hub {
    width: 180px;
    height: 180px;
  }

  .sec7-hub-img {
    width: 120px;
    height: 120px;
  }

  /* Hub activado en mÃ³vil: pequeÃ±o, arriba-izquierda */
  .sec7-hub.activated {
    width: 70px;
    height: 70px;
    position: absolute;
    top: 0;
    left: 0;
    animation: s7HubFloatSmall 4s ease-in-out infinite;
  }

  .sec7-hub.activated .sec7-hub-img {
    width: 48px;
    height: 48px;
  }

  /* Grid en mÃ³vil: 2 columnas, 2 filas */
  .sec7-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    max-width: 100%;
    width: 100%;
    margin-top: 0;
    padding-top: 80px;
  }

  .sec7-card {
    padding: 16px 10px 24px;
    flex-direction: column;
    text-align: center;
    aspect-ratio: auto;
    min-height: 270px;
    height: auto;
    gap: 4px;
  }
  .sec7-card-icon { width: 130px; height: 130px; border-radius: 12px; }
  .sec7-card-icon ion-icon { font-size: 22px; }
  .sec7-card h3 { font-size: 13px; margin: 0; line-height: 1.15; }
  .sec7-card p { font-size: 11px; margin: 0; line-height: 1.35; }
}

@keyframes s7BgLoopMobile {
  0%, 100% { transform: scale(1) translate3d(0, 0, 0); filter: saturate(1) contrast(1); }
  50% { transform: scale(1.04) translate3d(0, -1.5%, 0); filter: saturate(1.08) contrast(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .sec7-card, .sec7-hub { animation: none !important; }
}

