
/* =====================================================
   EDUCA DIGITAL
   HOJA DE ESTILOS PRINCIPAL
   ===================================================== */


/* =====================================================
   1. VARIABLES Y CONFIGURACIÓN GENERAL
   ===================================================== */

:root {
  --navy: #07152f;
  --navy-2: #0b2045;
  --cyan: #27d9f2;
  --blue: #2589ff;
  --pink: #ec4bbd;
  --white: #f7fbff;
  --muted: #bdcce0;

  --panel: rgba(17, 42, 82, .72);
  --line: rgba(160, 205, 255, .18);

  --radius: 22px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 8%, rgba(236, 75, 189, .16), transparent 28rem),
    radial-gradient(circle at 8% 30%, rgba(39, 217, 242, .12), transparent 30rem),
    var(--navy);
  line-height: 1.65;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}


/* =====================================================
   2. ENCABEZADO COMPARTIDO
   ===================================================== */

.topbar {
  position: relative;
  top: 0;
  z-index: 2000;
  width: 100%;

  background: rgba(7, 21, 47, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid var(--line);
}

/* Encabezado que acompaña el desplazamiento */

#site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  width: 100%;
}

.topbar .nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Marca y grupo de navegación */

.topbar .brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .3px;
  transition: opacity .25s ease;
}

.topbar .brand:hover {
  opacity: .85;
}

.topbar .brand img {
  width: 48px;
  height: 48px;
  max-width: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border-radius: 12px;
}

.topbar .brand span {
  font-size: 1.08rem;
  white-space: nowrap;
}


/* =====================================================
   3. BOTÓN Y MENÚ DE SECCIONES
   ===================================================== */

.topbar .nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.topbar .nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-height: 40px;
  padding: 0 17px;

  color: var(--muted);
  background: rgba(37, 137, 255, .09);
  border: 1px solid rgba(37, 137, 255, .35);
  border-radius: 11px;

  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;

  cursor: pointer;
  list-style: none;
  user-select: none;

  transition: all .25s ease;
}

.topbar .nav-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.topbar .nav-dropdown-toggle::marker {
  content: "";
}

/* Indicador de puntos, si se utiliza en el HTML */

.topbar .menu-dots {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1;
  transform: translateY(-3px);
}

/* Efectos del botón */

.topbar .nav-dropdown-toggle:hover,
.topbar .nav-dropdown[open] .nav-dropdown-toggle {
  color: var(--cyan);
  background: rgba(39, 217, 242, .13);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(39, 217, 242, .16);
  transform: translateY(-2px) scale(1.04);
}

/* Panel desplegable */

.topbar .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1000;

  min-width: 220px;
  padding: 8px;

  flex-direction: column;
  gap: 4px;

  background: var(--navy-2);
  border: 1px solid rgba(39, 217, 242, .25);
  border-radius: 13px;

  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

/* Apertura por hover en PC */

@media (hover: hover) and (pointer: fine) {
  .topbar .nav-dropdown:hover .dropdown-menu,
  .topbar .nav-dropdown:focus-within .dropdown-menu {
    display: flex;
  }
}

/* Apertura cuando details está activo */

.topbar .nav-dropdown[open] .dropdown-menu {
  display: flex;
}

/* Opciones del menú */

.topbar .dropdown-menu a {
  display: block;
  padding: 11px 12px;

  color: var(--muted);
  background: transparent;
  border-radius: 8px;

  font-size: .9rem;
  text-decoration: none;

  transition: all .2s ease;
}

.topbar .dropdown-menu a:hover {
  color: var(--cyan);
  background: rgba(39, 217, 242, .1);
  padding-left: 17px;
}


/* =====================================================
   4. BOTONES DE NAVEGACIÓN
   ===================================================== */

.topbar .nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 40px;
  padding: 0 17px;

  color: var(--muted);
  background: rgba(37, 137, 255, .09);
  border: 1px solid rgba(37, 137, 255, .35);
  border-radius: 11px;

  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;

  transition: all .25s ease;
}

/* Efecto interactivo */

.topbar .nav-links a:hover {
  color: var(--cyan);
  background: rgba(39, 217, 242, .13);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(39, 217, 242, .16);
  transform: translateY(-2px) scale(1.04);
}

/* Página actual */

.topbar .nav-links a[aria-current="page"] {
  color: var(--cyan);
  background: rgba(39, 217, 242, .12);
  border-color: rgba(39, 217, 242, .65);
  box-shadow: inset 0 0 12px rgba(39, 217, 242, .06);
}

/* Accesibilidad */

.topbar a:focus-visible,
.topbar summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}


/* =====================================================
   5. BOTONES GENERALES
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 13px 21px;
  border-radius: 999px;

  text-decoration: none;
  font-weight: 800;

  border: 1px solid transparent;
  transition: .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-primary {
  color: #041629;
  background: linear-gradient(100deg, var(--cyan), #8cecff);
  box-shadow: 0 8px 28px rgba(39, 217, 242, .2);
}

.btn-outline {
  border-color: rgba(39, 217, 242, .55);
  color: var(--white);
  background: rgba(39, 217, 242, .06);
}


/* =====================================================
   6. PORTADA PRINCIPAL
   ===================================================== */

.hero {
  padding: 82px 0 74px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 52px;
}

.eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: .78rem;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 17px 0 22px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan), #83aaff 55%, #f18bd7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 610px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 28px;
}

.hero-art {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 32px;

  background: linear-gradient(
    145deg,
    rgba(30, 76, 135, .65),
    rgba(12, 29, 62, .8)
  );

  box-shadow: var(--shadow);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 34px;

  background: linear-gradient(
    135deg,
    rgba(39, 217, 242, .55),
    transparent 40%,
    rgba(236, 75, 189, .42)
  );

  z-index: -1;
  filter: blur(16px);
}

.hero-art img {
  width: 100%;
  max-width: 390px;
  margin: auto;
  border-radius: 20px;
}

.floating-note {
  position: absolute;
  right: -15px;
  bottom: 28px;

  background: #102b56;
  border: 1px solid var(--line);
  border-radius: 16px;

  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: .9rem;
}


/* =====================================================
   7. SECCIONES Y TÍTULOS
   ===================================================== */

section {
  padding: 76px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 10px 0 13px;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
}


/* =====================================================
   8. TARJETAS
   ===================================================== */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border-radius: 15px;
  font-size: 1.4rem;

  background: linear-gradient(
    135deg,
    rgba(39, 217, 242, .2),
    rgba(236, 75, 189, .18)
  );

  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card p {
  color: var(--muted);
  margin: 0;
}


/* =====================================================
   9. CURSO Y PRECIOS
   ===================================================== */

.course-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.course-panel {
  padding: 30px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.course-panel h3 {
  margin-top: 0;
  font-size: 1.45rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.check-list li {
  padding: 9px 0 9px 30px;
  position: relative;
  color: var(--muted);
}

.check-list li::before {
  content: "✓";
  color: var(--cyan);
  font-weight: 900;
  position: absolute;
  left: 0;
}

.price {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 8px 0 0;
}

.price small {
  font-size: .95rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
}

.highlight {
  border-color: rgba(39, 217, 242, .42);
  background: linear-gradient(
    145deg,
    rgba(25, 75, 119, .75),
    rgba(24, 35, 78, .82)
  );
}

.bonus {
  margin-top: 18px;
  padding: 16px;
  border-radius: 15px;
  background: rgba(236, 75, 189, .1);
  border: 1px solid rgba(236, 75, 189, .3);
}

.bonus strong {
  color: #ff9cde;
}

.schedule-image {
  max-height: 570px;
  width: auto;
  margin: 20px auto 0;
  border-radius: 14px;
  border: 1px solid var(--line);
}


/* =====================================================
   10. VIDEOS
   ===================================================== */

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.video-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.video-frame {
  aspect-ratio: 9 / 16;
  max-height: 520px;
  background: #020916;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  padding: 18px 20px;
}

.video-caption h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.video-caption p {
  color: var(--muted);
  margin: 0;
  font-size: .92rem;
}


/* =====================================================
   11. BLOQUE DE CONFIANZA
   ===================================================== */

.trust-box {
  text-align: center;
  padding: 38px;
  border-radius: 28px;
  border: 1px solid rgba(39, 217, 242, .25);

  background: linear-gradient(
    120deg,
    rgba(39, 217, 242, .1),
    rgba(236, 75, 189, .1)
  );
}

.trust-box h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin: 8px 0 12px;
}

.trust-box p {
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 23px;
}


/* =====================================================
   12. REDES SOCIALES
   ===================================================== */

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.socials a {
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}

.socials a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}


/* =====================================================
   13. PIE DE PÁGINA
   ===================================================== */

footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}


/* =====================================================
   14. BOTONES FLOTANTES
   ===================================================== */

/* WhatsApp: compatibilidad con páginas que utilicen esta clase */

.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* iMessage */

.imessage-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 80px;
  height: 80px;
  padding: 0;

  background: transparent;
  border: none;
  box-shadow: none;

  transition: transform .3s ease, filter .3s ease;
}

.imessage-float img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  transition: inherit;
}

.imessage-float:hover {
  transform: scale(1.12);
  filter:
    drop-shadow(0 0 5px #27d9f2)
    drop-shadow(0 0 10px #2589ff)
    drop-shadow(0 0 16px #27d9f2);
}


/* =====================================================
   15. ADAPTACIÓN PARA PC
   ===================================================== */

/* iMessage grande exclusivamente en PC */

@media (min-width: 801px) {
  .imessage-float {
    width: 136px;
    height: 136px;
  }

  .imessage-float img {
    width: 128px;
    height: 128px;
  }
}


/* =====================================================
   16. ADAPTACIÓN PARA TABLETAS
   ===================================================== */

@media (min-width: 561px) and (max-width: 800px) {

  .imessage-float {
    width: 96px;
    height: 96px;
    right: 16px;
    bottom: 16px;
  }

  .imessage-float img {
    width: 88px;
    height: 88px;
  }
}


/* =====================================================
   17. ADAPTACIÓN PARA TABLETAS Y PANTALLAS PEQUEÑAS
   ===================================================== */

@media (max-width: 800px) {

  /* Encabezado */

  .topbar .nav {
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar .brand-group {
    gap: 8px;
  }

  .topbar .brand img {
    width: 44px;
    height: 44px;
    max-width: 44px;
    flex-basis: 44px;
  }

  .topbar .brand span {
    font-size: .94rem;
  }

  .topbar .nav-dropdown-toggle {
    min-height: 38px;
    padding: 0 14px;
    font-size: .86rem;
  }

  .topbar .nav-links {
    order: 3;
    width: 100%;
    overflow: visible;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 0;
  }

  .topbar .nav-links a {
    min-height: 38px;
    padding: 0 14px;
    font-size: .86rem;
  }

  .topbar .dropdown-menu {
    top: calc(100% + 8px);
  }

  /* Portada */

  .hero {
    padding: 55px 0;
  }

  .hero-grid,
  .course-layout {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero-art {
    max-width: 520px;
    margin: auto;
  }

  /* Tarjetas */

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  /* Navegación */

  .topbar .nav-links {
    gap: 10px;
  }
}


/* =====================================================
   18. ADAPTACIÓN PARA MÓVILES
   ===================================================== */

@media (max-width: 560px) {

  .container {
    width: min(100% - 30px, 1120px);
  }

  .cards,
  .video-grid {
    grid-template-columns: 1fr;
  }

  section {
    padding: 58px 0;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .floating-note {
    right: -5px;
    bottom: 12px;
  }

  .trust-box {
    padding: 27px 19px;
  }

  /* WhatsApp */

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
  }

  /* iMessage */

  .imessage-float {
    width: 80px;
    height: 80px;
    right: 12px;
    bottom: 12px;
  }

  .imessage-float img {
    width: 72px;
    height: 72px;
  }
}


/* =====================================================
   19. PANTALLAS MUY PEQUEÑAS
   ===================================================== */

@media (max-width: 380px) {

  .topbar .brand {
    gap: 7px;
  }

  .topbar .brand span {
    font-size: .82rem;
  }

  .topbar .brand img {
    width: 38px;
    height: 38px;
    max-width: 38px;
    flex-basis: 38px;
  }

  .topbar .nav-dropdown-toggle {
    gap: 5px;
    padding: 0 8px;
    font-size: .78rem;
  }

  /* iMessage */

  .imessage-float {
    width: 72px;
    height: 72px;
    right: 10px;
    bottom: 10px;
  }

  .imessage-float img {
    width: 64px;
    height: 64px;
  }
}
