/* ── Home Page Styles ── */

/* ── Hero Section ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(96, 165, 250, 0.28), transparent 30rem),
    radial-gradient(circle at 18% 84%, rgba(16, 185, 129, 0.13), transparent 26rem),
    var(--gradient-hero);
  overflow: hidden;
  padding-top: var(--nav-height);
  max-width: 100vw;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
  animation: gridDrift 20s linear infinite;
}

@keyframes gridDrift {
  0%   { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}

/* Línea de escaneo tech */
.hero-scanline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(59,130,246,0.0) 10%,
    rgba(59,130,246,0.5) 50%,
    rgba(59,130,246,0.0) 90%,
    transparent 100%);
  z-index: 2;
  pointer-events: none;
  animation: scanLine 6s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(59,130,246,0.4);
}

@keyframes scanLine {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 1;
  pointer-events: none;
}

.hero-bg-glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(59, 130, 246, 0.25);
  top: -200px;
  right: -200px;
  animation: float 8s ease-in-out infinite;
}

.hero-bg-glow-2 {
  width: 400px;
  height: 400px;
  background: rgba(23, 59, 122, 0.4);
  bottom: -100px;
  left: -100px;
  animation: float 10s ease-in-out 2s infinite;
}

.hero-bg-glow-3 {
  width: 300px;
  height: 300px;
  background: rgba(59, 130, 246, 0.15);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 6s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--sp-20) var(--container-padding);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-16);
  align-items: center;
}

.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 120px;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(248, 251, 255, 0.98));
  pointer-events: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93C5FD;
  width: fit-content;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  background: #3B82F6;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  font-weight: var(--fw-black);
  color: white;
  line-height: 1.08;
  letter-spacing: -0.035em;
  animation: heroBlurReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

@keyframes heroBlurReveal {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

.hero-title span {
  background: linear-gradient(135deg, #60A5FA 0%, #93C5FD 40%, #3B82F6 70%, #60A5FA 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: heroBlurReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both,
             gradientShimmer 4s linear 1.5s infinite;
}

@keyframes gradientShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--lh-relaxed);
  max-width: 560px;
  animation: heroBlurReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
  animation: heroBlurReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

.hero-stats {
  display: flex;
  gap: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--sp-4);
}

.hero-stats > div {
  padding: var(--sp-4);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.055);
  backdrop-filter: blur(10px);
}

.hero-stat-number {
  font-size: var(--text-3xl);
  font-weight: var(--fw-black);
  color: white;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-stat-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ── Hero Visual ── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dashboard {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.dashboard-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-2xl);
  padding: var(--sp-6);
  animation: float 7s ease-in-out infinite;
}

.dashboard-header {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.dashboard-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.dashboard-title {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: white;
}

.dashboard-sub {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
}

.dashboard-progress-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.dp-item-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--sp-2);
}

.dp-bar {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.dp-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  animation: progressReveal 2s cubic-bezier(0.4,0,0.2,1) 0.5s both;
}

@keyframes progressReveal {
  from { width: 0; }
}

.dashboard-float-1 {
  position: absolute;
  top: -30px;
  right: -30px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-xl);
  padding: var(--sp-3) var(--sp-4);
  animation: float 5s ease-in-out 1s infinite;
}

.dashboard-float-2 {
  position: absolute;
  bottom: -25px;
  left: -25px;
  background: rgba(59,130,246,0.15);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius-xl);
  padding: var(--sp-3) var(--sp-4);
  animation: float 8s ease-in-out 3s infinite;
}

.float-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: white;
  white-space: nowrap;
}

.float-badge .icon {
  width: 28px;
  height: 28px;
  background: rgba(59,130,246,0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* ── Hero Photo Frame ── */
.hero-photo-frame {
  position: relative;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  height: 340px;
  width: 100%;
  margin-bottom: var(--sp-5);
  box-shadow: 0 32px 64px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.hero-photo-frame:hover img {
  transform: scale(1.04);
}

.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,31,68,0.45) 0%, rgba(59,130,246,0.2) 100%);
  border-radius: var(--radius-3xl);
}

/* ── Hero Scroll Indicator ── */
.hero-scroll {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.45);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: fadeIn 1s ease 1.5s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3));
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.5); opacity: 0.3; }
}

/* ── Respaldo Section ── */
.respaldo-section {
  padding: var(--sp-24) 0;
  background: var(--bg-white);
}

.respaldo-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
  margin-bottom: var(--sp-16);
}

.respaldo-text h2 {
  font-size: clamp(1.75rem, 3vw, var(--text-4xl));
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-bottom: var(--sp-4);
}

.respaldo-text p {
  font-size: var(--text-lg);
  color: var(--text-medium);
  line-height: var(--lh-relaxed);
}

.respaldo-badges {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.respaldo-badge-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-light);
  border-radius: var(--radius-xl);
  border: 1px solid var(--bg-subtle);
  transition: all var(--transition-base);
}

.respaldo-badge-item:hover {
  background: white;
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.respaldo-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-accent);
}

.respaldo-badge-text strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-dark);
}

.respaldo-badge-text span {
  font-size: var(--text-xs);
  color: var(--text-light);
}

/* ── Impacto Card Photo ── */
.impacto-card-photo {
  margin: calc(-1 * var(--sp-8)) calc(-1 * var(--sp-8)) var(--sp-6);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  overflow: hidden;
  position: relative;
}

.impacto-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.impacto-card:hover .impacto-card-photo img {
  transform: scale(1.06);
}

.impacto-card.alumno  .impacto-card-photo::after { content: none; }
.impacto-card.empresa .impacto-card-photo::after { content: none; }
.impacto-card.sociedad .impacto-card-photo::after{ content: none; }

/* ── Segmentación Card Photo ── */
.seg-card-photo {
  margin: calc(-1 * var(--sp-10)) calc(-1 * var(--sp-10)) var(--sp-6);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  overflow: hidden;
  height: 220px;
  position: relative;
}

.seg-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.seg-card:hover .seg-card-photo img {
  transform: scale(1.04);
}

.seg-card.public .seg-card-photo::after {
  content: none;
}

.seg-card.corporate .seg-card-photo::after {
  content: none;
}

/* ── Impacto Section ── */
.impacto-section {
  padding: var(--sp-24) 0;
  background:
    linear-gradient(135deg, rgba(10, 31, 68, 0.07), rgba(59, 130, 246, 0.12)),
    #f5f9ff;
  overflow: hidden;
}

.impacto-section::after {
  content: '';
  position: absolute;
  inset: auto 8% -90px auto;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.14);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.impacto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
  margin-top: var(--sp-12);
}

.impacto-card {
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius-2xl);
  padding: var(--sp-8);
  border: 1px solid rgba(59, 130, 246, 0.14);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 54px rgba(10, 31, 68, 0.09);
  backdrop-filter: blur(12px);
}

.impacto-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), transparent 45%),
    radial-gradient(circle at 20% 0%, rgba(59,130,246,0.16), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.impacto-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

.impacto-card.alumno::after  { background: #F59E0B; }
.impacto-card.empresa::after { background: #3B82F6; }
.impacto-card.sociedad::after{ background: #10B981; }

.impacto-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 34px 84px rgba(10, 31, 68, 0.18);
  border-color: rgba(59, 130, 246, 0.26);
}

.impacto-card:hover::before {
  opacity: 1;
}

.impacto-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--sp-5);
}

.impacto-card.alumno .impacto-icon  { background: #FFFBEB; }
.impacto-card.empresa .impacto-icon { background: #EFF6FF; }
.impacto-card.sociedad .impacto-icon{ background: #F0FDF4; }

.impacto-card h3 {
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--text-dark);
  margin-bottom: var(--sp-2);
}

.impacto-card .subtitle {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
}

.impacto-card.alumno  .subtitle { color: #B45309; }
.impacto-card.empresa .subtitle { color: #1D4ED8; }
.impacto-card.sociedad .subtitle{ color: #15803D; }

.impacto-card p {
  font-size: var(--text-base);
  color: var(--text-medium);
  line-height: var(--lh-relaxed);
}

/* ── Segmentacion Section ── */
.segmentacion-section {
  padding: var(--sp-24) 0;
  background: var(--bg-white);
}

.segmentacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  margin-top: var(--sp-12);
}

.seg-card {
  border-radius: var(--radius-2xl);
  padding: var(--sp-10);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.seg-card.public {
  background: var(--gradient-primary);
  color: white;
}

.seg-card.corporate {
  background: white;
  border: 2px solid var(--bg-subtle);
  color: var(--text-dark);
}

.seg-card.corporate:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.seg-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.seg-card.public .seg-icon     { background: rgba(255,255,255,0.12); }
.seg-card.corporate .seg-icon  { background: var(--color-accent-light); }

.seg-card h3 {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.seg-card.corporate h3 { color: var(--color-primary); }

.seg-card p {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
}

.seg-card.public p     { color: rgba(255,255,255,0.75); }
.seg-card.corporate p  { color: var(--text-medium); }

.seg-card.public::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

/* ── Stats Banner ── */
.stats-banner {
  background: var(--color-primary);
  padding: var(--sp-16) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  text-align: center;
}

.stats-banner .stat-number {
  color: white;
  font-size: clamp(2.5rem, 4vw, 4rem);
}

.stats-banner .stat-label {
  color: rgba(255,255,255,0.55);
}

.stats-banner .stat-accent {
  color: #60A5FA;
}


/* ==============================================
   BARRA DE SCROLL PERSONALIZADA (NEÓN + EFECTO)
   ============================================== */

/* Para navegadores WebKit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 10px;               /* Ancho de la barra vertical */
  height: 10px;              /* Alto de la barra horizontal */
}

/* Fondo del canal de la barra (track) */
::-webkit-scrollbar-track {
  background: #0A0F1E;       /* Fondo oscuro elegante */
  border-radius: 10px;
  margin-block: 4px;         /* Pequeño margen arriba/abajo */
}

/* El pulgar (thumb) que se arrastra */
::-webkit-scrollbar-thumb {
  background: linear-gradient(145deg, #3B82F6, #60A5FA);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
  transition: background 0.2s, box-shadow 0.2s;
}

/* Efecto hover sobre el pulgar */
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(145deg, #60A5FA, #93C5FD);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.9);
  cursor: grab;
}

/* Efecto active (cuando se está arrastrando) */
::-webkit-scrollbar-thumb:active {
  cursor: grabbing;
  background: linear-gradient(145deg, #2563EB, #3B82F6);
  box-shadow: 0 0 16px #3B82F6;
}

/* Esquinas (donde se juntan scroll vertical y horizontal) */
::-webkit-scrollbar-corner {
  background: #0A0F1E;
}

/* ==============================================
   SOPORTE PARA FIREFOX
   ============================================== */
/* Nota: Firefox no soporta gradientes ni glow avanzado, pero podemos dar colores sólidos */
* {
  scrollbar-width: thin;                 /* Opciones: auto, thin, none */
  scrollbar-color: #3B82F6 #0A0F1E;     /* thumb y track */
}
