/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* VARIABLES */
:root {
  --blue: #2f80ed;
  --blue-soft: #eaf2ff;
  --green: #27ae60;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbeafe;
  --border-what: #25D366;
}

body {
  background:
    radial-gradient(circle at 20% 30%, rgba(47, 128, 237, .12), transparent 55%),
    radial-gradient(circle at 80% 40%, rgba(39, 174, 96, .10), transparent 60%),
    linear-gradient(180deg, #ffffff, #f7faff);
  color: var(--text);
}


/* ================= HERO ================= */
.hero {
  padding: calc(5px + 52px) 0 20px;
}


.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-left {
  max-width: 640px;
}

/* PILL EN VIVO */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  background: var(--blue-soft);
  color: #e53935;
  border: 1px solid var(--border);
  box-shadow:
    0 0 12px rgba(229,57,53,.25),
    0 0 24px rgba(229,57,53,.15);
}

.live-icon {
  color: #e53935;
  font-size: 13px;
  animation: livePulse 1.6s ease-in-out infinite;
}

@keyframes livePulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

/* ================= TYPING EFFECT ================= */
.hero-typing {
  font-weight: 900;
  color: var(--text);
}

.hero-typing .static-text {
  display: block;
  font-size: 70px;
  margin-bottom: 6px;
}

.hero-typing .dynamic-text {
  font-size: 40px;
  color: var(--blue);
}

#typingText {
  position: relative;
}

#typingText::after {
  content: "|";
  margin-left: 3px;
  animation: blink 1s infinite;
  color: var(--orange);
}

#typingText {
  transition: color .35s ease;
  font-weight: 900;
}

.hero-desc {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 38px;
}

/* ================= BOTONES ================= */
.buttons {
  display: flex;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: .25s;
}

/* Botón principal */
.btn.primary {
  background: linear-gradient(135deg, var(--orange), #f9c27b);
  color: #fff;
  box-shadow: 0 10px 30px rgba(242,153,74,.35);
  transition:
    background .25s ease,
    color .25s ease,
    border .25s ease;
}

/* Hover: fondo blanco + letra naranja */
.btn.primary:hover {
  background: #fff;
  color: var(--orange);
  border: 1px solid var(--orange);
}

/* Botón WhatsApp */
.btn.outline {
  border: 1px solid var(--border-what);
  color: #25D366;
  background: #fff;
}

.btn.outline i {
  transition: transform .25s ease;
}

.btn.outline:hover {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
  box-shadow:
    0 8px 24px rgba(37,211,102,.45),
    0 0 36px rgba(37,211,102,.35);
  transform: translateY(-2px);
}

.btn.outline:hover i {
  color: #fff;
  transform: scale(1.15);
}
/* ===== Cursor ===== */
.typing-wrapper {
  display: inline-flex;
  align-items: center;
  min-width: 105px;
}

.cursor {
  margin-left: 2px;
  animation: blink 1s infinite;
  font-weight: 600;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}
/* ================= SLIDER CURSO (VIDEO STYLE) ================= */
.course-slider {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 340px;
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(47,128,237,.18);
}

/* Imagen / video */
.course-media {
  position: absolute;
  inset: 0;
}

.course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay */
.course-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background:
    linear-gradient(
      to top,
      rgba(255,255,255,.95),
      rgba(255,255,255,.65),
      rgba(255,255,255,.15)
    );
}

.course-title {
  margin-top: 14px;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  line-height: 1.25;
  color: var(--blue);
}

#courseLink {
  position: absolute;
  inset: 0;
  display: block;
}

#courseImage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.course-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-meta {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

.course-meta i {
  color: var(--green);
}

/* ================= FEATURES ================= */
.feature-card {
  max-width: 1050px;
  margin: 80px auto 90px;
  padding: 34px 42px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 40px;
  position: relative;
  z-index: 2;
  box-shadow: 0 20px 40px rgba(47,128,237,.12);
}

.feature {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex: 1;
}

.feature i {
  font-size: 28px;
  color: var(--blue);
  margin-top: 4px;
}

.feature-content h4 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.feature-content p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.divider {
  width: 1px;
  background: var(--border);
}

/* ================= CONTADORES PRO ================= */
.hero-counters {
  display: flex;
  gap: 36px;
  margin-top: 30px;
}

.counter-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 26px;
  min-width: 200px;
  box-shadow: 0 16px 36px rgba(47,128,237,.18);
  position: relative;
  overflow: hidden;
}

.counter-icon {
  font-size: 28px;
  color: var(--green);
  margin-bottom: 6px;
  display: inline-block;
}

.counter-value {
  display: flex;
  align-items: flex-end;
}

.counter-number {
  font-size: 42px;
  font-weight: 900;
  color: var(--blue);
}

.counter-plus,
.counter-percent {
  font-size: 26px;
  font-weight: 800;
  color: var(--orange);
  margin-left: 4px;
}

.counter-box p {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}

/* =========================
   TEACHERS – FINAL PRO
========================= */

.teacher-card {
  padding: 90px 0;

}

.teacher-grid {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.teacher-item {
  min-width: 340px;
  background: #ffffff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .35s ease, box-shadow .35s ease;
  scroll-snap-align: start;
  border: 1px solid var(--border);
}

.teacher-item:hover {
  transform: translateY(-8px);
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}

/* FOTO */
.teacher-photo {
  width: 100%;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  background: #eef4ff;
}

.teacher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.teacher-item:hover .teacher-photo img {
  transform: scale(1.06);
}

/* HEADER */
.teacher-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.teacher-header span {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
}

/* ESPECIALIDAD */
.teacher-specialty {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}

/* DESCRIPCIÓN */
.teacher-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 30px;
  position: relative;
}

.section-title::after {
  content: "";
  width: 48px;
  height: 3px;
  background: var(--blue);
  display: block;
  margin-top: 10px;
  border-radius: 2px;
}

.courses-grid {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  justify-content: space-between;
}

.course-mini {
  min-width: 260px;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  text-decoration: none;
  color: #111;
  border: 1px solid var(--border);
  scroll-snap-align: start;
  box-shadow: 0 5px 14px rgba(0,0,0,.08);
  transition: .3s ease;
}

.course-mini:hover {
  transform: translateY(-6px);
}

.course-mini-img {
  height: 140px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  margin-bottom: 12px;
}

.course-mini h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.course-mini-price {
  display: block;
  margin-top: 8px;
  font-weight: 900;
  color: rgb(223, 0, 0);
}

.course-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* Base chip */
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

/* ⏱ Duración */
.meta-duration {
  color: #166534;
  background: rgba(34,197,94,.14);
}

.meta-duration i {
  color: #16a34a;
  font-size: 13px;
}

/* 🎥 Modalidad (default) */
.meta-modalidad {
  color: #1f2937;
  background: rgba(0,0,0,.06);
}

.meta-modalidad i {
  color: #374151;
  font-size: 13px;
}

/* 🔴 Modalidad VIRTUAL (destacada) */
.meta-modalidad.is-virtual {
  color: #991b1b;
  background: rgba(239,68,68,.14);
}

.meta-modalidad.is-virtual i {
  color: #dc2626;
}

.course-mini-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.course-mini-meta i {
  font-size: 13px;
  color: var(--green);
}

.course-mini-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  color: #1e3a8a;
  background: rgba(59,130,246,.12);
}

.course-mini-date i {
  color: #2563eb;
  font-size: 13px;
}

/* =========================
   ANNOUNCEMENTS
========================= */

.announcements {
  padding: 10px 0;
}

.announcements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

/* Card base */
.announcement {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #0f172a;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 18px 45px rgba(15,23,42,.12);
  transition: transform .3s ease, box-shadow .3s ease;
}

.announcement:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(15,23,42,.18);
}

/* IMAGEN SUPERIOR */
.announcement-media {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f1f5f9;
}

.announcement-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.announcement:hover .announcement-media img {
  transform: scale(1.06);
}

/* BODY */
.announcement-body {
  position: relative;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* TAG */
.announcement-tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .4px;
}

.announcement-tag.event {
  background: rgba(34,197,94,.14);
  color: #15803d;
}

.announcement-tag.news {
  background: rgba(59,130,246,.14);
  color: #1d4ed8;
}

/* TITULO */
.announcement-title {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
  color: #0f172a;
}

/* META */
.announcement-meta {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.announcement-meta i {
  color: #22c55e;
}

/* GRATIS BADGE */
.announcement-badge {
  position: absolute;
  top: -12px;
  right: 14px;
  background: #22c55e;
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  box-shadow: 0 10px 25px rgba(34,197,94,.35);
}

/* EVENT / NEWS BORDER */
.announcement.event {
  border-top: 5px solid #22c55e;
}

.announcement.news {
  border-top: 5px solid #3b82f6;
}

/* ================= RESPONSIVE ================= */

/* ≈ 1200px y menos (tablets grandes y laptops pequeñas) */
@media (max-width: 1200px) {
  .hero-grid {
    gap: 50px;
  }
  .course-slider {
    max-width: 480px;
    height: 320px;
  }
  .feature-card {
    padding: 28px 32px;
  }
  .teacher-item {
    min-width: 320px;
  }
  .course-mini {
    min-width: 240px;
  }
}

/* ≈ 992px y menos (tablets / landscape mobile) */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .hero-typing .static-text {
    font-size: 58px;
  }
  .hero-typing .dynamic-text {
    font-size: 34px;
  }
  .course-slider {
    max-width: 100%;
    height: 300px;
  }
  .feature-card {
    flex-direction: column;
    gap: 32px;
    padding: 28px;
  }
  .divider {
    width: 100%;
    height: 1px;
  }
  .hero-counters {
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
  }
  .counter-box {
    min-width: 160px;
    flex: 1;
  }
  .teacher-item {
    min-width: 300px;
  }
}

/* ≈ 768px y menos (móviles grandes / tablets pequeñas) */
@media (max-width: 768px) {
  .hero {
    padding: calc(5px + 32px) 0 16px;
  }
  .hero-typing .static-text {
    font-size: 48px;
  }
  .hero-typing .dynamic-text {
    font-size: 28px;
  }
  .buttons {
    flex-direction: column;
    gap: 16px;
  }
  .btn {
    justify-content: center;
    padding: 14px 32px;
  }
  .course-slider {
    height: 260px;
    border-radius: 20px;
  }
  .course-overlay {
    padding: 24px;
  }
  .course-title {
    font-size: clamp(22px, 4.5vw, 32px);
  }
  .feature-card {
    margin: -60px auto 70px;
    padding: 24px;
  }
  .teacher-card {
    padding: 60px 0;
  }
  .teacher-item {
    min-width: 280px;
  }
  .teacher-photo {
    height: 180px;
  }
  .announcements {
    padding: 60px 0;
  }
  .announcement-media {
    height: 140px;
  }
}

/* ≈ 480px y menos (móviles pequeños) */
@media (max-width: 480px) {
  .hero {
    padding: 80px 0 16px;
  }
  .hero-typing .static-text {
    font-size: 42px;
  }
  .hero-typing .dynamic-text {
    font-size: 26px;
  }
  .pill {
    font-size: 11px;
    padding: 8px 14px;
  }
  .course-slider {
    height: 220px;
    border-radius: 16px;
  }
  .course-overlay {
    padding: 20px;
  }
  .course-title {
    font-size: clamp(20px, 5vw, 28px);
  }
  .feature-card {
    margin: -50px auto 60px;
    padding: 20px;
  }
  .hero-counters {
    flex-direction: column;
    align-items: center;
  }
  .counter-box {
    width: 100%;
    min-width: unset;
  }
  .teacher-item {
    min-width: 85vw;
  }
  .teacher-photo {
    height: 160px;
  }
  .course-mini {
    min-width: 85vw;
  }
  .course-mini-img {
    height: 120px;
  }
  .announcement-media {
    height: 120px;
  }
}