/* Estilos específicos de la home */

.hero {
  position: relative;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 5rem 0 6rem;
  overflow: hidden;
}

/* Círculos que flotan despacio en el fondo (están en index.html, dentro de .hero-shapes) */
.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-shapes span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  animation: hero-float 14s ease-in-out infinite;
}

/* tamaño y posición de cada círculo; "animation-delay" y la duración los desfasan entre sí */
.hero-shapes .c1 { width: 220px; height: 220px; left: -50px; top: 8%;  animation-duration: 16s; }
.hero-shapes .c2 { width: 380px; height: 380px; left: 3%;   top: 18%;  background: rgba(255, 255, 255, 0.05); animation-duration: 20s; animation-delay: -4s; }
.hero-shapes .c3 { width: 280px; height: 280px; right: -60px; bottom: -40px; animation-duration: 18s; animation-delay: -8s; }
.hero-shapes .c4 { width: 480px; height: 480px; right: 2%;  bottom: -150px; background: rgba(255, 255, 255, 0.05); animation-duration: 24s; animation-delay: -2s; }
.hero-shapes .c5 { width: 100px; height: 100px; left: 68%;  top: 6%;    animation-duration: 12s; animation-delay: -6s; }

@keyframes hero-float {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(18px, -22px); }
  66%      { transform: translate(-14px, 16px); }
}


@media (prefers-reduced-motion: reduce) {
  .hero-shapes span { animation: none; }
}

.hero .container {
  position: relative;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.cta-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto 3rem;
}

@media (max-width: 680px) {
  .cta-cards {
    grid-template-columns: 1fr;
  }
}

.cta-card {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 2.75rem 1.75rem;
  text-align: center;
}

.cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.cta-icon.primary { background: var(--primary); }
.cta-icon.secondary { background: var(--secondary); }

.cta-card h3 {
  margin-bottom: 2.1rem;
  font-size: 1.15rem;
}

.cta-card p {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

.cta-card .btn {
  width: 100%;
  margin-bottom: 0.9rem;
}

.search-bar {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.search-bar input {
  flex: 1;
  border: none;
  background: var(--muted);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  font-size: 1rem;
  outline: none;
  color: var(--foreground);
}

.search-bar button {
  white-space: nowrap;
}

/* Stats */
.stats {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

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

@media (max-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-number.secondary { color: var(--secondary); }

.stat-label {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* ¿Cómo funciona? */
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 780px) {
  .how-grid {
    grid-template-columns: 1fr;
  }
}

.how-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
}

.how-card.theme-persona {
  border-color: rgba(170, 52, 139, 0.25);
}

.how-card.theme-empresa {
  border-color: rgba(16, 185, 129, 0.3);
}

.how-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.how-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: none;
}

.how-card.theme-persona .how-icon {
  background: var(--primary);
}

.how-card.theme-empresa .how-icon {
  background: var(--secondary);
}

.how-card-header h3 {
  font-size: 1.4rem;
}

.how-card.theme-persona h3 {
  color: var(--primary);
}

.how-card.theme-empresa h3 {
  color: var(--secondary);
}

.how-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.how-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-secondary);
  flex: none;
}

.how-card.theme-persona .step-num {
  background: var(--primary-light);
  color: var(--primary);
}

.how-card.theme-empresa .step-num {
  background: var(--secondary-light);
  color: var(--secondary);
}

.how-steps strong {
  display: block;
  margin-bottom: 0.2rem;
}

.how-steps p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  margin: 0;
}

/* Secciones generales */
.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

.section-header p {
  color: var(--muted-foreground);
  font-size: 1.05rem;
}

/* Carrusel de servicios */
.carousel {
  position: relative;
}

.carousel-track-wrap {
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  gap: 0;
}

.service-card {
  flex: 0 0 calc(33.333% - 1rem);
  margin-right: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: box-shadow 0.2s ease;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .service-card { flex: 0 0 calc(50% - 1rem); }
}
@media (max-width: 600px) {
  .service-card { flex: 0 0 100%; }
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.service-card p.desc {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.service-providers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}

.service-providers .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 5;
}

.carousel-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.carousel-arrow.prev { left: -22px; }
.carousel-arrow.next { right: -22px; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dots button.active {
  width: 28px;
  background: var(--secondary);
}

/* Cursos preview cards en la home */
.course-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .course-preview-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .course-preview-grid { grid-template-columns: 1fr; }
}

.course-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.course-card .badge { margin-bottom: 0.75rem; }
.course-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.course-card p { color: var(--muted-foreground); font-size: 0.9rem; margin-bottom: 1rem; }

/* Recursos (consejos) */
.resource-strip {
  background: var(--muted);
  padding: 3rem 0;
}

.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 680px) {
  .resource-grid { grid-template-columns: 1fr; }
}

.resource-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.resource-card .icon-badge {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.resource-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.resource-card p {
  font-size: 0.88rem;
  color: var(--muted-foreground);
}

/* Servicios profesionales (grilla debajo del carrusel) */
.prof-header { margin-top: 3rem; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.service-grid .service-card {
  flex: none;
  margin-right: 0;
}

/* Pestañas de Servicios (Oficios / Profesionales) */
.svc-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--muted);
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.svc-tab {
  font-family: var(--font-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}

.svc-tab.active {
  background: var(--primary);
  color: #fff;
}

.svc-panel[hidden] { display: none; }
