:root {
  --color-principal: #24B273;
  --color-principal-hover: #1e9a62;
  --color-fondo-claro: #F2F2F2;
  --color-texto-oscuro: #333333;
  --color-texto-suave: #666666;
  --color-negro: #000000;
  --color-blanco: #FFFFFF;
  --color-borde: #CCCCCC;
  --fuente-principal: 'Montserrat', sans-serif;
  --ancho-maximo: 1200px;
  --ancho-texto: 800px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--fuente-principal);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-texto-oscuro);
}

h1, h2 {
  font-weight: 100;
  letter-spacing: 1px;
  text-transform: uppercase;
}

h3 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.hidden {
  display: none;
}

.texto-centrado {
  text-align: center;
}

.texto-verde {
  color: var(--color-principal);
}

.subtitulo {
  color: var(--color-principal);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.subtitulo-blanco {
  color: var(--color-blanco);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.seccion {
  padding: 80px 20px;
  max-width: var(--ancho-maximo);
  margin: 0 auto;
}

.boton {
  display: inline-block;
  padding: 15px 40px;
  background-color: var(--color-principal);
  color: var(--color-blanco);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s;
  border: 2px solid var(--color-principal);

  &:hover {
    background-color: var(--color-principal-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(36, 178, 115, 0.3);
  }
}

.boton-blanco {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--color-blanco);
  border: 2px solid rgba(255, 255, 255, 0.6);
  padding: 10px 30px;
  font-size: 12px;
  letter-spacing: 1px;
  font-weight: 600;
  display: inline-block;

  &:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: var(--color-blanco);
    color: var(--color-blanco);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
  }
}


header {
  background-color: transparent;
  padding: 20px 40px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;

  .header-left {
    display: flex;
    align-items: center;
    gap: 100px;
    flex: 1;
  }

  .icono-menu {
    cursor: pointer;
    display: none;
    z-index: 2100;

    img {
      width: 30px;
      height: 30px;
      filter: brightness(0) invert(1);
    }
  }

  .header-logo {
    display: flex;
    align-items: center;
    z-index: 2100;

    img {
      width: 50px;
      height: 50px;
      filter: brightness(0) invert(1);
    }
  }

  nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;

    ul {
      display: flex;
      align-items: center;
      list-style: none;
      gap: 30px;

      li {
        position: relative;

        a {
          text-decoration: none;
          color: var(--color-blanco);
          font-weight: 600;
          text-transform: uppercase;
          font-size: 15px;
          transition: color 0.3s;
          display: block;
          padding: 5px 0;

          &:hover {
            color: var(--color-principal);
          }

          &::after {
            content: '';
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-bottom: 8px solid var(--color-blanco);
            opacity: 0;
            transition: opacity 0.3s;
          }

          &:hover::after {
            opacity: 1;
          }
        }
      }
    }
  }
}


.hero {
  background-image: url('../../public/imagenes/header.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 150px 20px 80px;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;

  .contenedor {
    max-width: var(--ancho-maximo);
    margin: 0 auto;
  }

  h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 900;
    color: var(--color-blanco);
    line-height: 1.2;
  }

  p {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-blanco);
  }

  form {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 75%;
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 15px 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    input {
      flex: 1;
      padding: 12px 18px;
      border: none;
      background: transparent;
      font-size: 14px;
      min-width: 0;
      font-family: var(--fuente-principal);

      &:focus {
        outline: none;
      }
    }

    button {
      padding: 12px 28px;
      background-color: var(--color-principal);
      color: var(--color-blanco);
      border: none;
      border-radius: 50px;
      font-weight: 700;
      cursor: pointer;
      text-transform: uppercase;
      transition: background-color 0.3s;
      white-space: nowrap;
      font-size: 13px;

      &:hover {
        background-color: var(--color-principal-hover);
      }
    }
  }

  .social-media {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);

    ul {
      display: flex;
      flex-direction: column;
      gap: 15px;
      list-style: none;

      li {
        img {
          width: 30px;
          height: 30px;
          transition: transform 0.3s;
          filter: brightness(0) invert(1);

          &:hover {
            transform: scale(1.2);
          }
        }
      }
    }
  }
}

.features {
  h2 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 200;
    line-height: 1.4;
    letter-spacing: 1px;
  }

  > p {
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: var(--color-texto-suave);
    line-height: 1.8;
    font-size: 15px;
  }

  .contenedor {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: stretch;
    max-width: var(--ancho-maximo);
    margin: 0 auto 50px;

    article {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 40px 30px;
      background-color: var(--color-blanco);
      border-radius: 10px;
      border: 2px solid transparent;
      transition: all 0.3s;

      &:hover {
        border: 2px solid var(--color-borde);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-5px);
      }

      img {
        width: 60px;
        height: 60px;
        margin-bottom: 25px;
        opacity: 0.7;
      }

      h3 {
        margin-bottom: 20px;
        color: var(--color-texto-oscuro);
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 0.5px;
      }

      div {
        color: var(--color-texto-suave);
        font-size: 14px;
        line-height: 1.7;
      }
    }
  }

  > .boton {
    display: block;
    width: fit-content;
    margin: 0 auto;
    text-align: center;
    padding: 14px 45px;
    border-radius: 50px;
    font-size: 13px;
    letter-spacing: 1px;
  }
}

.skills {
  .contenedor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    max-width: 100%;
    margin: 0;
    min-height: 600px;
  }

  .skills-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 60px 80px;
    text-align: left;
    grid-column: 2;
    grid-row: 1;

    .subtitulo {
      text-align: left;
      margin-bottom: 15px;
    }

    h2 {
      font-size: 32px;
      margin-bottom: 20px;
      font-weight: 200;
      line-height: 1.4;
      text-align: left;
    }

    p {
      max-width: 100%;
      margin: 0 0 40px 0;
      color: var(--color-texto-suave);
      line-height: 1.8;
      text-align: left;
    }
  }

  .skills-right {
    display: contents;

    img {
      width: 100%;
      height: 100%;
      min-height: 600px;
      object-fit: cover;
      object-position: center;
      grid-column: 1;
      grid-row: 1 / 3;
    }

    .skills-content {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      padding: 0 80px 60px 80px;
      grid-column: 2;
      grid-row: 2;

      h3 {
        margin-bottom: 30px;
        text-align: left;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 0.5px;
      }

      ul {
        list-style: none;
        margin-bottom: 40px;

        li {
          margin-bottom: 25px;
          display: flex;
          align-items: center;
          gap: 15px;

          strong {
            min-width: 100px;
            font-weight: 400;
            font-size: 14px;
          }

          progress {
            flex: 1;
            height: 8px;
            accent-color: var(--color-principal);
            border-radius: 4px;
          }

          span {
            min-width: 45px;
            text-align: right;
            font-size: 14px;
            color: var(--color-texto-suave);
            font-weight: 400;
          }
        }
      }
    }
  }
}

.gallery {
  .contenedor-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;

    .gallery-left {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 15px;

      .subtitulo {
        margin-bottom: 0;
      }
    }

    h2 {
      font-size: 32px;
      text-align: left;
      line-height: 1.2;
      font-weight: 700;
      letter-spacing: 0.5px;
    }

    > div {
      display: flex;
      flex-direction: column;
      gap: 20px;

      p {
        text-align: left;
        color: var(--color-texto-suave);
        line-height: 1.8;
        margin: 0;
        font-size: 14px;
      }
    }
  }

  nav {
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;

    ul {
      display: flex;
      justify-content: flex-start;
      gap: 20px;
      list-style: none;

      li {
        a {
          text-decoration: none;
          color: var(--color-texto-oscuro);
          font-weight: 600;
          padding: 10px 20px;
          border-radius: 5px;
          transition: all 0.3s;

          &:hover,
          &:active {
            color: var(--color-principal);
          }
        }
      }
    }
  }

  .gallery-imagen {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: var(--ancho-maximo);
    margin: 0 auto;

    img {
      width: 100%;
      max-width: 900px;
      height: auto;
      object-fit: cover;
      border-radius: 10px;
      transition: transform 0.3s;

      &:hover {
        transform: scale(1.05);
      }
    }
  }
}

.testimonials {
  text-align: center;
  padding: 100px 20px;

  h3 {
    font-size: 28px;
    font-weight: 400;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto 30px auto;
    color: var(--color-texto-oscuro);
  }
}

.testimonial-featured {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  padding: 80px 20px 100px;
  background-image: url('../../public/imagenes/testimony.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 100vh;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  h2 {
    font-size: 18px;
    color: var(--color-blanco);
    font-weight: 100;
    line-height: 1.8;
    margin-bottom: 0;
    max-width: 800px;
    align-self: flex-start;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
  }

  blockquote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 30px;

    div {
      font-weight: 700;
      font-size: 18px;
      color: var(--color-principal);
    }

    span {
      color: #999;
      font-size: 14px;
    }
  }

  nav {
    ul {
      display: flex;
      justify-content: center;
      gap: 20px;
      list-style: none;
      margin-top: 0;

      li {
        img {
          width: 30px;
          height: 30px;
        }
      }
    }
  }
}

.course {
  background-color: var(--color-principal);
  color: var(--color-blanco);
  padding: 0;
  position: relative;

  .contenedor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 100%;
    margin: 0;
    min-height: 600px;
  }

  .course-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 80px;
    text-align: left;

    .subtitulo-blanco {
      margin-bottom: 20px;
    }

    h2 {
      font-size: 32px;
      margin-bottom: 25px;
      font-weight: 200;
      text-align: left;
      line-height: 1.3;
    }

    p {
      text-align: left;
      margin-bottom: 35px;
      line-height: 1.8;
      font-size: 15px;
    }

    .boton-blanco {
      align-self: flex-start;
    }
  }

  .course-image {
    width: 100%;
    height: 100%;
    min-height: 600px;

    img {
      width: 100%;
      height: 100%;
      min-height: 600px;
      object-fit: cover;
      object-position: center;
    }
  }

  .course-navigation {
    position: absolute;
    bottom: 30px;
    left: 30px;
    display: flex;
    gap: 15px;

    .course-arrow {
      background-color: transparent;
      color: var(--color-blanco);
      border: 2px solid rgba(255, 255, 255, 0.3);
      width: 45px;
      height: 45px;
      border-radius: 50%;
      font-size: 18px;
      cursor: pointer;
      transition: all 0.3s;
      display: flex;
      align-items: center;
      justify-content: center;

      &:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-color: var(--color-blanco);
      }
    }
  }
}

.pricing {
  h2 {
    font-size: 36px;
    margin-bottom: 20px;
    line-height: 1.4;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
  }

  > p {
    max-width: var(--ancho-texto);
    margin: 0 auto 50px auto;
    color: var(--color-texto-suave);
  }

  .contenedor {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;

    article {
      border: 2px solid var(--color-borde);
      border-radius: 10px;
      background: #fff;
      padding: 40px 30px;
      text-align: center;
      display: flex;
      flex-direction: column;
      transition: all 0.3s;

      &:hover {
        transform: translateY(-10px);
        box-shadow: 0 4px 24px rgba(36, 178, 115, 0.10);
        border-color: var(--color-principal);
      }

      h3 {
        margin-bottom: 20px;
        color: var(--color-texto-oscuro);
      }

      div {
        font-size: 14px;
        color: #999;
        margin-bottom: 30px;

        strong {
          display: block;
          font-size: 48px;
          color: var(--color-principal);
          font-weight: 700;
          margin-bottom: 5px;
        }
      }

      ul {
        list-style: none;
        margin-bottom: 30px;
        text-align: left;

        li {
          padding: 10px 0;
          color: var(--color-texto-suave);
        }
      }

      .boton {
        margin-top: auto;
      }

      &:first-child,
      &:last-child {
        .boton {
          background-color: transparent;
          color: var(--color-negro);
          border-color: var(--color-negro);

          &:hover {
            background-color: var(--color-negro);
            color: var(--color-blanco);
          }
        }
      }

      &:nth-child(2) {
        .boton {
          background-color: var(--color-principal);
          color: var(--color-blanco);
          border-color: var(--color-principal);

          &:hover {
            background-color: var(--color-principal-hover);
          }
        }
      }
    }
  }
}

footer {
  background-color: var(--color-blanco);
  color: var(--color-negro);
  padding: 60px 20px 20px 20px;
  border-top: 1px solid var(--color-fondo-claro);

  section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: var(--ancho-maximo);
    margin: 0 auto 40px auto;
    padding: 0 20px;
    align-items: center;

    > div:first-child {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 20px;

      > div:first-child {
        text-align: left;
        margin-bottom: 10px;
      }
    }

    > div:last-child {
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  h2 {
    color: var(--color-negro);
    text-align: left;
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
  }

  address {
    font-style: normal;
    line-height: 1.8;
    text-align: left;
    color: var(--color-negro);

    a {
      color: var(--color-negro);
      text-decoration: none;

      &:hover {
        color: var(--color-principal);
      }
    }
  }

  img {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
  }

  nav {
    width: 100%;

    ul {
      display: flex;
      gap: 15px;
      list-style: none;
      justify-content: flex-start;

      li {
        img {
          width: 30px;
          height: 30px;
        }
      }
    }
  }

  small {
    display: block;
    text-align: center;
    color: var(--color-texto-suave);
    border-top: 1px solid var(--color-fondo-claro);
    padding-top: 20px;
  }
}

@media (max-width: 900px) {
  /* Header responsive */
  header {
    padding: 15px 20px;
    position: fixed;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);

    .header-left {
      gap: 20px;
    }

    .icono-menu {
      display: block !important;
    }

    nav {
      position: fixed;
      top: 0;
      left: -100%;
      width: 80%;
      max-width: 300px;
      height: 100vh;
      background: var(--color-principal);
      padding-top: 80px;
      z-index: 2050;
      transition: left 0.3s ease;
      overflow-y: auto;

      ul {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 24px;
        padding: 20px;

        li {
          a {
            font-size: 18px;
            font-weight: 700;
            padding: 12px 0;
            text-align: center;
            display: block;

            &::after {
              display: none;
            }
          }
        }
      }
    }
  }

  #menu-toggle:checked ~ nav {
    left: 0;
  }

  #menu-toggle:checked ~ .header-left::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2040;
    cursor: pointer;
  }

  /* Hero responsive */
  .hero {
    padding: 120px 20px 40px;
    min-height: 80vh;

    .contenedor {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
    }

    h2 {
      font-size: 28px;
      margin-bottom: 10px;
    }

    p {
      font-size: 16px;
      margin-bottom: 20px;
      max-width: 90%;
    }

    form {
      flex-direction: column;
      width: 90%;
      max-width: 400px;
      gap: 8px;
      padding: 15px;
      border-radius: 25px;
      margin: 0 auto 20px auto;

      input {
        padding: 10px 15px;
        border-radius: 20px;
        width: 100%;
      }

      button {
        padding: 10px 25px;
        width: 100%;
      }
    }

    .social-media {
      position: static;
      margin: 20px auto 0;

      ul {
        flex-direction: row;
        gap: 20px;
        justify-content: center;
      }
    }
  }

  /* Features responsive */
  .features {
    .contenedor {
      grid-template-columns: 1fr;
      gap: 20px;

      article {
        padding: 30px 20px;
      }
    }
  }

  /* Skills responsive */
  .skills {
    .contenedor {
      display: flex;
      flex-direction: column;
    }

    .skills-text {
      padding: 40px 20px;
      text-align: center;
      order: 1;

      .subtitulo,
      h2,
      p {
        text-align: center;
      }
    }

    .skills-right {
      order: 2;
      display: flex;
      flex-direction: column;
      min-height: auto;

      img {
        height: 250px;
        min-height: 250px;
        max-height: 250px;
      }

      .skills-content {
        padding: 30px 20px;
        border-radius: 0;
        margin-bottom: 0;
      }
    }
  }

  /* Gallery responsive */
  .gallery {
    .contenedor-gallery {
      grid-template-columns: 1fr;
      gap: 30px;
      padding: 0 20px;

      .gallery-left {
        .subtitulo {
          text-align: center;
        }
      }

      h2 {
        text-align: center;
      }

      > div {
        p {
          text-align: center;
        }
      }
    }

    nav {
      ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;

        li {
          a {
            font-size: 14px;
            padding: 8px 15px;
          }
        }
      }
    }
  }

  
  .testimonials {
    padding: 60px 20px;

    h3 {
      font-size: 22px;
    }
  }

  .testimonial-featured {
    min-height: 70vh;
    padding: 60px 20px 80px;

    h2 {
      font-size: 16px;
    }
  }

  /* Course responsive */
  .course {
    .contenedor {
      grid-template-columns: 1fr;
      min-height: auto;
    }

    .course-content {
      padding: 40px 20px;
      text-align: center;
      order: 2;

      h2,
      p {
        text-align: center;
      }

      .boton-blanco {
        align-self: center;
      }
    }

    .course-image {
      min-height: 300px;
      order: 1;

      img {
        min-height: 300px;
      }
    }

    .course-navigation {
      bottom: 15px;
      left: 15px;

      .course-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
      }
    }
  }

  /* Pricing responsive */
  .pricing {
    h2 {
      font-size: 28px;
    }

    .contenedor {
      grid-template-columns: 1fr;
      gap: 20px;

      article {
        padding: 30px 20px;
      }
    }
  }

  /* Footer responsive */
  footer {
    padding: 40px 20px 20px 20px;

    section {
      grid-template-columns: 1fr;
      gap: 30px;

      > div:first-child {
        align-items: center;
        text-align: center;

        > div:first-child {
          text-align: center;
        }
      }

      > div:last-child {
        order: -1;
      }
    }

    h2 {
      text-align: center;
    }

    address {
      text-align: center;
    }

    nav {
      ul {
        justify-content: center;
      }
    }

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