
:root {
  --primary-color: #7833FF;
  --secondary-color: #FC2E6A;
  --accent-color: #14DE95;
  --background-dark: #121212;
  --background-variant: #191919;
  --background-light: #1e1e1e;
  --background-disabled: #434343;
  --text-primary: #ffffff;
  --text-secondary: #A3A3A3;
  --text-muted: #888888;
  --gradient-primary: linear-gradient(136deg, #7833FF 0%, #FC2E6A 100%);
  --gradient-accent: linear-gradient(45deg, #14DE95 0%, #2FB2FF 100%);
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.4);
  --border-radius: 12px;
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  /* Spring-like timing function (ease-out-back) */
  --spring: cubic-bezier(.34,1.56,.64,1);
}
body {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
}

.hero-mashapp {
  position: relative;
  min-height: calc(100vh - 80px);
  background: var(--background-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}


/* Imagen debajo del hero */
.hero-illustration-section {
  background: var(--background-dark);
  margin-top: 0; /* dejar exactamente 40px desde CTA via padding del hero */
}
.hero-illustration {
  width: 100%;
  height: auto;
  display: block;
  margin-left: 15%;
  margin-right: 15%;
  max-width: 70%;
  border-radius: 8px;
}

@media (min-width: 992px) {
  .hero-illustration-section { margin-top: 0; }
}

/* Mashapp en números */
.numbers-section {
  padding: 56px 0 72px;
  background: var(--background-dark);
}
.numbers-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.8vw, 56px);
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-left: 5%;
  margin-right: 5%;
}
.numbers-card {
  position: relative;
  aspect-ratio: 8 / 7;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  grid-column: span 12;
}
@media (min-width: 768px) {
  .numbers-card { grid-column: span 4; }
}
.numbers-card .bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 500ms var(--spring), opacity 300ms ease;
  opacity: 0.65;
}
.numbers-card:hover .bg-image {
  transform: scale(1.06);
}
.numbers-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}
.numbers-card .content {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: var(--text-primary);
}
.numbers-card .value {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 52px;
}
.numbers-card .label {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--text-primary);
}

/* Eventos */
.events-section {
  padding: 56px 0 72px;
  background: var(--background-dark);
}
.events-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.8vw, 56px);
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* Carousel container */
.events-carousel-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: 400px;
}

/* Carousel */
.events-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow-subtle);
  width: 90%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  min-height: 300px;
}

.event-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 500ms ease, transform 500ms ease;
}

.event-card.active {
  opacity: 1;
  transform: translateX(0);
}

.event-card.prev {
  transform: translateX(-100%);
}

.event-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--background-variant);
  transform: scale(1);
  transition: transform 500ms var(--spring);
  opacity: 0.7;
  width: 100%;
  height: 100%;
  /* Debug: asegurar que las imágenes se muestren */
  min-height: 400px;
  /* Optimización para móviles */
  will-change: transform;
  backface-visibility: hidden;
}

.event-card:hover .event-bg-image {
  transform: scale(1.06);
}

.event-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}

.event-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  top: 24px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.event-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.event-participants {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
}

.event-participants i {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
  fill: var(--text-primary);
}

.participants-count {
  font-weight: 600;
  color: var(--text-primary);
}

.participants-label {
  color: var(--text-secondary);
}

/* Navigation arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 300ms ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav i {
  width: 24px;
  height: 24px;
  fill: var(--text-primary) !important;
  color: var(--text-primary) !important;
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Dots indicator */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  position: relative;
}



.dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  border: none;
  background: var(--background-disabled);
  cursor: pointer;
  transition: all 300ms ease;
}

.dot.active {
  background: var(--text-primary);
  transform: scale(1.2);
}

.dot:hover {
  background: var(--text-secondary);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .events-carousel-container {
    padding: 0;
    min-height: 350px;
  }
  
  .events-carousel {
    width: 90%;
    min-height: 300px;
    aspect-ratio: 4 / 3;
  }
  
  .carousel-nav {
    display: none;
  }
  
  .event-content {
    left: 16px;
    right: 16px;
    bottom: 16px;
    top: 16px;
  }
  
  .event-title {
    font-size: clamp(18px, 6vw, 24px);
    margin-bottom: 8px;
  }
  
  .event-participants {
    font-size: 14px;
    gap: 6px;
  }
  
  .event-participants i {
    width: 16px;
    height: 16px;
    color: var(--text-primary);
    fill: var(--text-primary);
  }
  
  .carousel-dots {
    margin-top: 16px;
    gap: 6px;
  }
  
  .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .events-carousel-container {
    padding: 0;
    min-height: 300px;
  }
  
  .events-carousel {
    width: 100%;
    min-height: 250px;
    aspect-ratio: 3 / 2;
  }
  
  .carousel-nav {
    display: none;
  }
  
  .event-content {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: 12px;
  }
  
  .event-title {
    font-size: clamp(16px, 7vw, 20px);
    margin-bottom: 6px;
  }
  
  .event-participants {
    font-size: 12px;
    gap: 4px;
  }
  
  .event-participants i {
    width: 14px;
    color: var(--text-primary);
    height: 14px;
  }
  
  .carousel-dots {
    margin-top: 12px;
    gap: 4px;
  }
  
  .dot {
    width: 5px;
    height: 5px;
    border-radius: 1px;
  }
}
.hero-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

/* Glow/gradiente suave detrás del título */
/* Quitar completamente el brillo/mancha detrás del título */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-content::before { content: none; }


.hero-subtitle {
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  border: none;
  padding: 12px 16px;
  border-radius: 24px;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.5px;
  transition: background-color 220ms ease-out, color 220ms ease-out, transform 220ms ease-out, box-shadow 220ms ease-out;
  color: #000000;
  text-decoration: none;
  box-shadow: var(--shadow-medium);
  gap: 10px;
}
.btn-cta:hover,
.btn-cta:active,
.btn-cta:focus-visible { 
  background: #ffffff;
  color: #000000;
  transform: translateY(-2px);
  text-decoration: none;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}



/* CTA inferior */
.cta-bottom-section {
  padding: 80px 0 120px;
  background: var(--background-dark);
}
.cta-bottom-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.8vw, 56px);
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.cta-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
}
.btn.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 12px 24px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
  color: var(--text-primary);
  text-decoration: none;
}
.btn.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

/* Blogs */
.blogs-section { background: var(--background-dark); }
.blogs-title {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 60px);
  line-height: 1.15;
  color: var(--text-primary);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 1100px;
  margin-bottom: 24px;
}
.blogs-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px;
  margin-left: 5%;
  margin-right: 5%;
}
.blogs-grid.stacked {
  position: relative;
}
.blogs-grid.stacked .blog-card {
  grid-column: 1 / -1;
  position: sticky;
  top: calc(var(--navbar-sticky-offset) + 8px); /* debajo del navbar fijo */
  margin-top: 40px;
  z-index: 0;
}
.blogs-grid.stacked .blog-card.in-view { z-index: 1; }
.blogs-grid.stacked .blog-card:first-child { margin-top: 0; }
.blog-card {
  grid-column: span 12;
  background: var(--background-dark);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  min-height: 320px;
}
/* Link full-card */
.blog-card-link { display:block; color: inherit; text-decoration: none; height: 100%; }
.blog-card-link:hover .blog-title { text-decoration: underline; }
@media (min-width: 992px) {
  .blog-card { grid-column: span 12; min-height: 420px; }
}
.blog-card-inner { display: grid; grid-template-columns: 1fr; height: 100%; }
@media (min-width: 992px) {
  .blog-card-inner { grid-template-columns: 1.1fr 0.9fr; align-items: stretch; }
}
.blog-media { position: relative; min-height: 280px; background: #0f0f0f; }
.blog-media img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.blog-content { padding: 24px; }
.blog-tags { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.blog-tags.stacked { flex-direction: column; align-items: flex-start; gap: 0; }

/* Blog tag animations for stacking effect */
.blog-card.in-view .blog-tags.stacked .blog-tag { 
  opacity: 1; 
  transform: translateY(0); 
}
.blog-tags.stacked .blog-tag { 
  transition-delay: calc(var(--i, 0) * 70ms);
  opacity: 0;
  transform: translateY(10px);
  transition: transform 400ms var(--spring), opacity 400ms ease;
}
.blog-title { font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif; font-weight: 600; font-size: clamp(22px, 3vw, 36px); margin-bottom: 10px; }
.blog-desc { font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif; font-size: 15px; color: var(--text-secondary); }

/* Mobile-specific adjustments: disable sticky stacking and use vertical cards with media ratio 0.65 */
@media (max-width: 991.98px) {
  .blogs-grid.stacked .blog-card { position: static; top: auto; z-index: auto; margin-top: 0; }
  .blogs-grid { margin-left: 0; margin-right: 0; display: flex; flex-direction: column; align-items: stretch; gap: 40px; padding: 0 16px; }
  .blog-card { min-height: unset; width: 100%; max-width: none; aspect-ratio: 39 / 59; margin: 0; }
  .blog-card-link, .blog-card-inner { width: 100%; height: 100%; }
  .blog-card-inner { display: flex; flex-direction: column; }
  .blog-content { padding: 16px; flex: 0 0 auto; }
  .blog-media { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
  .blog-title { font-size: clamp(18px, 6vw, 24px); line-height: 1.25; }
  .blog-desc { font-size: 14px; line-height: 1.55; }

}
