/**
 * Cerewro Web - Estilos avanzados
 */

:root {
  --bs-body-bg: transparent;
  --glow-green: rgba(132, 204, 22, 0.35);
  --glow-pink: rgba(232, 121, 249, 0.35);
}

/* ═══════════════════════════════════════════
   ANIMACIONES
   ═══════════════════════════════════════════ */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(132, 204, 22, 0.15); }
  50%      { box-shadow: 0 0 40px rgba(132, 204, 22, 0.35), 0 0 80px rgba(232, 121, 249, 0.1); }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes skeletonPulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes circuit-flow {
  0%   { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}
@keyframes counter {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }
.animate-delay-6 { transition-delay: 0.6s; }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */

.hero-section {
  position: relative;
  padding: 60px 0 48px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(132, 204, 22, 0.35);
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.12), rgba(232, 121, 249, 0.06));
  color: var(--accent-green);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeIn 0.6s ease;
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-glow 2s ease infinite;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease;
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-pink));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 540px;
  animation: fadeInUp 0.8s ease 0.15s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-visual {
  position: relative;
  animation: fadeInRight 1s ease 0.3s both;
}
.hero-video-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(232, 121, 249, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(232, 121, 249, 0.08);
  position: relative;
}
.hero-video-wrap video {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
}
.hero-video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* Producto: vídeo más grande, ocupa todo su columna */
.product-hero .hero-grid {
  grid-template-columns: 1fr 2fr;
}
.product-hero .hero-grid > div:last-child {
  display: flex;
  align-items: center;
  justify-content: stretch;
  min-width: 0;
}
.product-hero .hero-video-wrap {
  width: 100%;
  min-width: 0;
}
.product-hero .hero-video-wrap video {
  width: 100%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════════
   STATS BAR
   ═══════════════════════════════════════════ */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 2px;
  background: rgba(232, 121, 249, 0.08);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(232, 121, 249, 0.12);
  margin-bottom: 24px;
}
.stat-item {
  padding: 28px 20px;
  background: rgba(12, 16, 36, 0.95);
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.stat-label {
  color: #fff;
  font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   FEATURE CARDS
   ═══════════════════════════════════════════ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid rgba(232, 121, 249, 0.12);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(232, 121, 249, 0.04), rgba(12, 16, 36, 0.95));
  transition: transform 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-pink));
  opacity: 0;
  transition: opacity 300ms ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(232, 121, 249, 0.1);
  border-color: rgba(232, 121, 249, 0.25);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid rgba(132, 204, 22, 0.25);
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.12), rgba(232, 121, 249, 0.06));
}
.feature-icon svg {
  width: 26px; height: 26px;
  color: var(--accent-green);
}
.feature-icon.pink {
  border-color: rgba(232, 121, 249, 0.25);
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.12), rgba(132, 204, 22, 0.06));
}
.feature-icon.pink svg { color: var(--accent-pink); }

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.feature-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}
.feature-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  margin-top: 14px;
  border: 1px solid rgba(132, 204, 22, 0.3);
  color: var(--accent-green);
  background: rgba(132, 204, 22, 0.08);
}
.feature-tag.pink {
  border-color: rgba(232, 121, 249, 0.3);
  color: var(--accent-pink);
  background: rgba(232, 121, 249, 0.08);
}

/* ═══════════════════════════════════════════
   VIDEO SECTION
   ═══════════════════════════════════════════ */

.video-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

/* Vídeo “Mira Cerewro en acción”: ancho completo respecto al panel (sin márgenes internos laterales) */
.panel-shell .video-demos-media-full {
  width: calc(100% + 2 * var(--space-2xl));
  max-width: none;
  margin-left: calc(-1 * var(--space-2xl));
  margin-right: calc(-1 * var(--space-2xl));
  box-sizing: border-box;
  grid-template-columns: 1fr;
}
.panel-shell .video-demos-media-full .video-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.panel-shell .video-demos-media-full [data-show-lang] {
  width: 100%;
  max-width: 100%;
}
@media (max-width: 768px) {
  .panel-shell .video-demos-media-full {
    width: calc(100% + 2 * var(--space-lg));
    margin-left: calc(-1 * var(--space-lg));
    margin-right: calc(-1 * var(--space-lg));
  }
}

.video-showcase > .video-card:nth-child(2) .video-card-info h4 {
  font-size: 1rem;
}

.video-showcase > .video-card:nth-child(2) .video-card-info p {
  font-size: 0.82rem;
}
.video-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(232, 121, 249, 0.15);
  background: rgba(12, 16, 36, 0.95);
  transition: box-shadow 300ms ease, transform 300ms ease;
}
.video-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(132, 204, 22, 0.1);
  transform: translateY(-3px);
}
.video-card video {
  width: 100%;
  display: block;
}

.video-card-youtube-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0c14;
}
.video-card-youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-card-info {
  padding: 20px;
}
.video-card-info h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.video-card-info p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════
   FLOW / PROCESS STEPS
   ═══════════════════════════════════════════ */

.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 20px;
  position: relative;
}
.flow-step {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(132, 204, 22, 0.15);
  background: rgba(12, 16, 36, 0.92);
  text-align: center;
  transition: border-color 300ms ease, box-shadow 300ms ease;
}
.flow-step:hover {
  border-color: rgba(132, 204, 22, 0.4);
  box-shadow: 0 0 30px rgba(132, 204, 22, 0.1);
}
.flow-step:nth-child(even) {
  border-color: rgba(232, 121, 249, 0.15);
}
.flow-step:nth-child(even):hover {
  border-color: rgba(232, 121, 249, 0.4);
  box-shadow: 0 0 30px rgba(232, 121, 249, 0.1);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(132, 204, 22, 0.2), rgba(132, 204, 22, 0.05));
  border: 1px solid rgba(132, 204, 22, 0.3);
  color: var(--accent-green);
}
.flow-step:nth-child(even) .step-number {
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.2), rgba(232, 121, 249, 0.05));
  border-color: rgba(232, 121, 249, 0.3);
  color: var(--accent-pink);
}

.flow-step h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}
.flow-step p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════
   PROVIDERS / TECH ROW
   ═══════════════════════════════════════════ */

.providers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.provider-pill {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(232, 121, 249, 0.15);
  background: rgba(12, 16, 36, 0.9);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 250ms ease;
}
.provider-pill:hover {
  color: var(--text);
  border-color: rgba(132, 204, 22, 0.4);
  background: rgba(132, 204, 22, 0.08);
  box-shadow: 0 0 20px rgba(132, 204, 22, 0.1);
}

/* ═══════════════════════════════════════════
   SECTION TITLES
   ═══════════════════════════════════════════ */

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(132, 204, 22, 0.25);
  background: rgba(132, 204, 22, 0.06);
  color: var(--accent-green);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 36px;
}

/* ═══════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════ */

.cta-section {
  text-align: center;
  padding: 60px 40px;
  border: 1px solid rgba(132, 204, 22, 0.2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 30% 50%, rgba(132, 204, 22, 0.08), transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(232, 121, 249, 0.06), transparent 50%),
    rgba(12, 16, 36, 0.95);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-green), var(--accent-pink), transparent);
}

/* ═══════════════════════════════════════════
   GALLERY ENHANCED
   ═══════════════════════════════════════════ */

.gallery-section .gallery-viewport {
  position: relative;
}
.gallery-section .gallery-track img {
  transition: opacity 400ms ease;
}
.gallery-thumbs img {
  transition: opacity 250ms ease, border-color 250ms ease;
  border: 2px solid transparent;
}
.gallery-thumbs img.active {
  opacity: 1 !important;
  border-color: var(--accent-green);
}

/* ═══════════════════════════════════════════
   TWO-COL LAYOUT
   ═══════════════════════════════════════════ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

/* ═══════════════════════════════════════════
   SKELETON / LOADING
   ═══════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 12px);
}

/* ═══════════════════════════════════════════
   CONTACT / FORMS
   ═══════════════════════════════════════════ */

.contact-form .form-control,
.contact-form .form-select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 121, 249, 0.25);
  color: var(--text, #f4f8ff);
  border-radius: var(--radius-md, 16px);
}
.contact-form .form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(232, 121, 249, 0.5);
  box-shadow: 0 0 0 3px rgba(232, 121, 249, 0.2);
}
.contact-form .form-control::placeholder {
  color: rgba(159, 178, 201, 0.6);
}

.form-status { padding: 12px 16px; border-radius: var(--radius-md, 16px); font-size: 0.9rem; }
.form-status.success { background: rgba(142,255,191,0.12); border: 1px solid rgba(142,255,191,0.3); color: var(--accent-2, #8effbf); }
.form-status.error   { background: rgba(255,159,159,0.12); border: 1px solid rgba(255,159,159,0.3); color: var(--danger, #ff9f9f); }
.form-status.loading { background: rgba(121,231,255,0.08); border: 1px solid rgba(121,231,255,0.2); }

/* ═══════════════════════════════════════════
   LIST FEATURES
   ═══════════════════════════════════════════ */

.check-list {
  list-style: none;
  padding: 0;
}
.check-list li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 8px;
  color: var(--accent-green);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .two-col.reverse { direction: ltr; }
  .video-showcase { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .flow-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr; }
}

/* Menú Email marketing (admin id 1): dropdown acorde al header oscuro */
.site-header .header-nav .dropdown-menu {
  background: rgba(15, 15, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.35rem 0;
  min-width: 12rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.site-header .header-nav .dropdown-item {
  color: var(--text-secondary, #a0a0b0);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}
.site-header .header-nav .dropdown-item:hover,
.site-header .header-nav .dropdown-item:focus {
  background: rgba(0, 245, 212, 0.1);
  color: var(--text-primary, #fff);
}
.site-header .header-nav .dropdown-item.active {
  color: var(--neon-mint, #00f5d4);
  font-weight: 600;
}
