@supports(animation-timeline: view()) {
  @keyframes fade-out {
    to {
      background-size: 150%;
      opacity: 0;
    }
  }

  @keyframes zoom-out {
    to {
      font-size: 2rem;
      padding-left: .1em;
    }
  }

  @keyframes appear {
    to {
      opacity: 1;
    }
  }

  @keyframes max-out {
    to {
      max-width: 100%;
    }
  }

  .hero {
    animation: fade-out linear both;
    animation-timeline: view();
    animation-range: exit -100px;
  }

  nav {
    animation: max-out linear both;
    animation-timeline: view();
    animation-range-start: 80vh;
    animation-range-end: 100vh;
  }

  nav:after {
    animation: appear linear both;
    animation-timeline: view();
    animation-range-start: 60vh;
    animation-range-end: 100vh;
  }

  .logo {
    animation: zoom-out linear both;
    animation-timeline: view();
    animation-range-start: 10vh;
    animation-range-end: 100vh;
  }
}

@supports(not(animation-timeline: view())) {
  .notice:after {
    content: ' animation-timeline of scroll and view are currently not supported in your browser.';
  }
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100..700&display=swap');

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  margin: 0;
  background-color: #1f2020;
  color: #F9F6EF;
  scroll-behavior: smooth;
}

:root {
  --neon-pink: #ff0080;
  --neon-cyan: #00ffff;
  --neon-green: #39ff14;
  --dark-bg: #1f2020;
  --darker-bg: #2a2b2b;
}

/* Mobile Menu Button for Curso 3D */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  padding: 10px;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--neon-cyan);
  transition: 0.3s;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--dark-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
    z-index: 1050;
    border-left: 2px solid var(--neon-pink);
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.5);
  }

  nav ul.active {
    right: 0;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

/* Fix mask for compatibility */
.card::before {
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
}

/* Contenedor para centrar contenido de las secciones */
.container {
  max-width: 75ch;
  margin: 0 auto;
  padding-inline: 1em;
}

/* El main ya no necesita estos estilos, se aplican a .container */
main {
  padding-inline: 1em;
}

header {
  max-width: 75ch;
  margin: 0 auto;
  padding-inline: 1em;
}

.hero,
nav {
  max-width: 75ch;
  margin: 0 auto;
  padding-inline: 1em;

}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
  line-height: 1.5;
}

nav {
  position: sticky;
  top: 0;
  left: 0;
  min-height: 3rem;
  background-color: #1f2020d0;
  backdrop-filter: blur(.2em);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;

  .mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 1em;

    span {
      display: block;
      width: 25px;
      height: 3px;
      background: var(--neon-cyan, #5EB0E5);
      transition: 0.3s;
    }
  }

  ul {
    padding-right: 1em;
    margin: 0;
    display: inline-flex;
    gap: 1rem;

    li {
      list-style: none;
      display: inline-block;
      cursor: pointer;
      transition: .3s linear;

      &:hover {
        text-decoration: underline #5EB0E5;
      }

      a {
        color: inherit;
        text-decoration: none;
        font-weight: 500;
      }
    }
  }
}

@media (max-width: 768px) {
  nav .mobile-menu-btn {
    display: flex;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: #1f2020;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
    border-left: 1px solid #5EB0E5;
    z-index: 1000;
  }

  nav ul.active {
    right: 0;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

.hero {
  min-height: 60vh;
  background-image:
    url("https://images.unsplash.com/photo-1622849026560-7e723676e3d1?q=80&w=2938&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
  background-size: 50%;
  background-repeat: no-repeat;
  background-position: 100% 50%;
  mix-blend-mode: lighten;
  display: grid;
  align-content: center;
  container-type: inline-size;

  h1 {
    font-size: clamp(2rem, 7cqi, 10rem);
    font-weight: 100;
    max-width: 50%;
    color: hsl(290 85% 75%);
    line-height: .8;
  }

  .action-btns {
    margin-top: 2rem;
  }

  /* Estilo para enlaces dentro de .btn */
  .btn {
    display: inline-block;
    text-decoration: none;
    color: #F9F6EF;
    position: relative;
    padding: .5em 1em;
    cursor: pointer;

    &:before,
    &:after {
      content: '';
      position: absolute;
      inset: 0;
      background:
        linear-gradient(45deg,
          hsl(0, 100%, 70%),
          hsl(30, 100%, 70%),
          hsl(60, 100%, 70%),
          hsl(90, 100%, 70%),
          hsl(120, 100%, 70%),
          hsl(150, 100%, 70%),
          hsl(180, 100%, 70%),
          hsl(210, 100%, 70%),
          hsl(240, 100%, 70%),
          hsl(270, 100%, 70%),
          hsl(300, 100%, 70%),
          hsl(330, 100%, 70%),
          hsl(360, 100%, 70%));
      background: linear-gradient(in hsl longer hue 45deg, #f66 0 0);
      z-index: -1;
      clip-path: polygon(90% 0, 100% 50%, 90% 99%, 0% 100%, 8% 50%, 0% 0%);
    }

    &:after {
      background: #1f2020;
      inset: 3px;
    }
  }
}

nav:after {
  content: '';
  position: absolute;
  opacity: 0;
  height: .05em;
  width: 100%;
  bottom: 0;
  background:
    linear-gradient(90deg,
      hsl(0, 100%, 70%),
      hsl(30, 100%, 70%),
      hsl(60, 100%, 70%),
      hsl(90, 100%, 70%),
      hsl(120, 100%, 70%),
      hsl(150, 100%, 70%),
      hsl(180, 100%, 70%),
      hsl(210, 100%, 70%),
      hsl(240, 100%, 70%),
      hsl(270, 100%, 70%),
      hsl(300, 100%, 70%),
      hsl(330, 100%, 70%),
      hsl(360, 100%, 70%));
  background: linear-gradient(in hsl longer hue 90deg, #f66 0 0);
}

.logo {
  font-weight: 900;
  font-size: 10cqi;
  background:
    linear-gradient(45deg,
      hsl(0, 100%, 70%),
      hsl(30, 100%, 70%),
      hsl(60, 100%, 70%),
      hsl(90, 100%, 70%),
      hsl(120, 100%, 70%),
      hsl(150, 100%, 70%),
      hsl(180, 100%, 70%),
      hsl(210, 100%, 70%),
      hsl(240, 100%, 70%),
      hsl(270, 100%, 70%),
      hsl(300, 100%, 70%),
      hsl(330, 100%, 70%),
      hsl(360, 100%, 70%));
  background: linear-gradient(in hsl longer hue 40deg, #f66 0 0);
  background-clip: text;
  color: #0000;
}

/* --- ESTILOS PARA NUEVAS SECCIONES --- */

section {
  padding: 4rem 0;
  border-bottom: 1px solid #333;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  line-height: 1;
  background: linear-gradient(in hsl longer hue 40deg, #f66 0 0);
  background-clip: text;
  color: #0000;
}

/* Estilos de Tarjetas */
.card {
  background-color: #2a2b2b;
  padding: 2rem;
  border-radius: 10px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  /* Grosor del borde */
  background: linear-gradient(in hsl longer hue 45deg, #f66 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  z-index: -1;
}

/* Sección "About the Course" */
.course-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .course-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.course-features ul {
  list-style: none;
  padding: 0;
}

.course-features li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.course-features .fas {
  color: hsl(290 85% 75%);
  font-size: 1.2rem;
}

/* Sección "Course Curriculum" - Acordeón */
.accordion details {
  background-color: #2a2b2b;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 1px solid #444;
}

.accordion summary {
  padding: 1rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: background-color 0.2s;
}

.accordion summary:hover {
  background-color: #333;
}

.accordion summary::after {
  content: '+';
  position: absolute;
  right: 1rem;
  font-size: 1.5rem;
  transition: transform 0.3s;
  color: hsl(290 85% 75%);
}

.accordion details[open] summary::after {
  transform: rotate(45deg);
}

.accordion details p {
  padding: 0 1rem 1rem 1rem;
  border-top: 1px solid #444;
  margin-top: 0.5rem;
}

/* Sección "Registration Form" */
.registration-form form {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group select {
  padding: 0.8rem;
  background-color: #333;
  border: 1px solid #555;
  border-radius: 5px;
  color: #F9F6EF;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: hsl(290 85% 75%);
}

.registration-form .btn {
  justify-self: start;
  border: none;
  /* El estilo .btn ya tiene el borde falso */
}

/* Sección "Testimonials" */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .testimonial-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.testimonial-card {
  text-align: center;
}

.student-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid hsl(290 85% 75%);
}

.rating {
  color: #ffc107;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.quote {
  font-style: italic;
  color: #ccc;
}

.author {
  font-weight: bold;
  margin-top: 1rem;
}

/* Footer */
footer {
  background-color: #1a1a1a;
  padding: 3rem 1em;
  color: #aaa;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-social a {
  color: #aaa;
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: hsl(290 85% 75%);
}

.footer-menu ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.footer-menu a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-menu a:hover {
  color: #fff;
}

.copyright {
  font-size: 0.9rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: #F9F6EF;
  position: relative;
  padding: .5em 1em;
  cursor: pointer;
}

.btn:before,
.btn:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(in hsl longer hue 45deg, #f66 0 0);
  z-index: -1;
  clip-path: polygon(90% 0, 100% 50%, 90% 99%, 0% 100%, 8% 50%, 0% 0%);
}

.btn:after {
  background: #1f2020;
  inset: 3px;
}

/* ES MUY IMPORTANTE: corregir este selector */
button.btn {
  border: none;
  /* evita borde extra */
  background: none;
  /* deja el estilo .btn funcionar */
  font-family: inherit;
  font-size: inherit;
  padding: .5em 1em;
}