@import "./styles.css";

/* ? Tablet styles */
@media (max-aspect-ratio: 3/4), (max-aspect-ratio: 2/3) {
  /* Navbar Section */
  .navbar-brindemos-x {
    & ul.desktop-menu {
      display: none;
    }
    & .mobile_navbar {
      all: unset;
      display: flex;
      flex-direction: column;
      gap: 4px;
      cursor: pointer;
      justify-content: center;
      font-size: var(--text-section-title);
      color: var(--primary-text);
    }
    & .mobile-menu.active {
      display: flex;
      position: fixed;
      width: 100svw;
      height: fit-content;
      overflow: auto;
      top: 0;
      left: 0;
      background: white;
      flex-direction: column;
      & .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 32px;
        & .navbar__logo {
          height: 80px;
        }
        & button {
          all: unset;
          width: fit-content;
          height: fit-content;
          font-size: var(--text-section-title);
          color: var(--primary-text);
        }
      }
      & ul {
        flex: 1; /* ocupa todo el alto restante del menú */
        margin: 0;
        padding: 8px 24px calc(24px + env(safe-area-inset-bottom));
        text-align: center;
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 16px;
        & li {
          color: var(--primary-text);
        }
        /* CTA hasta abajo de la lista */
        & li.contact_button {
          margin-top: auto;
          background: var(--accent);
          padding: 12px 16px;
          text-align: center;
          color: white;
          border-radius: 25px;
          display: flex;
          gap: 16px;
          justify-content: center;
          align-items: center;
          margin-top: 30px;
        }
      }
    }
  }

  /* Hero Section */
  .header-brindemos-x {
    flex-direction: column-reverse;
    padding-top: 0px;
    justify-content: end;
    padding: 24px;
    padding-bottom: 64px;
    & .content {
      width: 100%;
      padding: 18px 24px;
      min-width: 75%;
      position: relative;
      z-index: 1;
      backdrop-filter: blur(5px);
      background: color-mix(white, 50% transparent);
      border-radius: 16px;
      box-shadow: 0 0 15px var(--primary-text);
      & .buttons {
        display: flex;
        gap: 16px;
      }
    }
    & .image {
      margin: 0 auto;
      position: absolute;
      left: 0;
      right: 0;
      top: 64px;
      width: 100%;

      & img {
        max-width: 100%;
        max-height: 70dvh;
        margin: 0 auto;
      }
    }
  }

  /* Beneficios Section */
  .beneficios-brindemos-x {
    & .beneficios {
      flex-wrap: wrap;
      & .beneficios-card {
        width: calc((100% / 3) - 16px);
      }
    }
  }

  /* Panel Section */
  .panel-brindemos-x {
    flex-direction: column;
    padding: 32px;
    & :is(.content, .cards, .image) {
      width: 100%;
      max-width: 100%;
    }
    & .content {
      text-align: center;
      & h2 {
        text-align: center;
        margin: 0 auto;
        margin-bottom: 48px;
      }
      & p {
        max-width: 400px;
        margin: 15px auto;
        margin-bottom: 24px;
      }
      & a {
        margin: 0 auto;
      }
    }
    & .cards {
      padding: 0 56px;
      & .panel-cards {
        padding: 16px 32px;
      }
    }
    & .image {
      margin-inline: -32px;
      padding-inline: 0;
      width: calc(100% + 64px);
      max-width: none;
    }
  }

  /* Paquetes section */
  .paquetes-brindemos-x {
    & .paquetes {
      gap: 48px 24px;
      & .package-card {
        flex-basis: calc(50% - 12px);
        &.featured {
          scale: 1;
        }
      }
    }
  }

  /* Muestras section */
  .muestras-brindemos-x {
    flex-direction: column;
    padding: 64px 48px;
    & .content {
      flex-basis: auto;
      text-align: center;
      & .eyebrow {
        margin: 0 auto;
        &::after {
          width: 50px;
          right: -70px;
        }
      }
      & .description {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
      }
    }
    & .gallery {
      width: 100%;
      &::after {
        display: none;
      }
    }
    & .waves-bg {
      height: 20%;
    }
  }

  /* Cta Section */
  .cta-brindemos-x {
    margin: 15px;
    & .image {
      display: none;
    }
    & .content {
      padding: 24px 24px 24px 48px;
    }
  }

  /* FAQs section */
  .faqs-brindemos-x {
    & .decor {
      height: 160px;
      opacity: 0.5;
    }
  }

  /* Contacto section */
  .contacto-brindemos-x {
    flex-direction: column;
    padding: 64px 48px 96px;
    & .decor {
      height: 160px;
      opacity: 0.5;
      top: 24px;
      left: auto;
      right: 2%;
    }
    & .info-side {
      border-left: none;
    }
  }
}

/* ? Mobile styles */
@media (max-aspect-ratio: 9/16),
  (max-aspect-ratio: 131/284),
  (max-aspect-ratio: 110/239),
  (max-aspect-ratio: 103/231),
  (max-aspect-ratio: 427/952),
  (max-aspect-ratio: 9/20) {
  /* Navbar Section */
  .navbar-brindemos-x {
    & .mobile-menu.active {
      height: 100svh;
      & ul {
        & li {
          font-size: 24px;
          &.contact_button {
            margin-top: auto;
          }
        }
      }
    }
  }

  /* Hero Section */
  .header-brindemos-x {
    padding-bottom: 24px;
    padding: 16px;
    & .content {
      & .buttons {
        flex-direction: column;
        text-align: center;
        & a {
          padding: 12px 16px;
        }
      }
    }
    & .image {
      margin-top: 5dvh;
      & img {
        max-height: 50dvh;
      }
    }
  }

  /* Beneficios Section */
  .beneficios-brindemos-x {
    margin: 32px 0;
    & .beneficios {
      padding: 0 16px;
      flex-wrap: wrap;
      margin: 0 auto;
      & .beneficios-card {
        width: calc(50% - 12px);
        border-right: none !important;
      }
    }
  }

  /* Panel Section */
  .panel-brindemos-x {
    overflow: hidden;
    & .content {
      & p {
        max-width: 100%;
        margin: 15px auto;
      }
      & a {
        margin: 0 auto;
      }
    }
    & .cards {
      padding: 0;
      & .panel-cards {
        padding: 16px 32px;
        flex-basis: calc(50% - 32px);
        & div {
          flex-direction: row;
          justify-content: left;
          gap: 24px;
          margin-bottom: 16px;
          width: 100%;
          & p {
            text-align: start;
          }
        }
        & p {
          text-align: start;
        }
      }
    }
  }

  /* Paquetes section */
  .paquetes-brindemos-x {
    & .paquetes {
      gap: 48px 24px;
      & .package-card {
        flex-basis: 100%;
        &.featured {
          scale: 1;
        }
      }
    }
  }

  /* Muestras section */
  .muestras-brindemos-x {
    padding: 48px 0;
    gap: 0;
    /* Los hijos de .content pasan a ser hijos directos de la sección
       para poder mandar el botón después de la galería */
    & .content {
      display: contents;
      & :is(.eyebrow, h2, .description) {
        padding: 0 16px;
      }
      & .button {
        order: 1;
        margin-top: 32px;
      }
    }
    & .gallery {
      margin-top: 32px;
      & .models {
        position: relative; /* offsetLeft de los modelos relativo al carrusel */
        justify-content: start;
        gap: 16px;
        padding: 16px 15%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        &::-webkit-scrollbar {
          display: none;
        }
        & .model {
          flex: 0 0 70%;
          max-width: none;
          scroll-snap-align: center;
          &:hover {
            translate: none;
          }
        }
      }
      & .models-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 8px;
        & button {
          width: 8px;
          height: 8px;
          border-radius: 100px;
          background: var(--accent-soft);
          transition:
            width 0.3s ease,
            background 0.3s ease;
          &.active {
            width: 24px;
            background: var(--accent);
          }
        }
      }
      & .categories {
        padding: 0 16px;
        gap: 8px;
        & li {
          padding: 4px 12px;
          &:not(:last-child) {
            border-right: none;
          }
        }
      }
    }
    & .waves-bg {
      height: 10%;
    }
  }

  /* Cta Section */
  .cta-brindemos-x {
    flex-direction: column;
    overflow: hidden;
    & .content {
      padding: 24px;
      text-align: center;
      position: relative;
      z-index: 1;
      & h3 {
        margin: 0 auto;
      }
    }
    & .button {
      margin: 0 auto;
      padding: 0 0 16px 0;
      width: 100%;
      overflow: visible;
      & img {
        height: fill;
        width: auto;
        right: -50px;
      }
    }
  }

  /* FAQs section */
  .faqs-brindemos-x {
    padding: 48px 16px 96px;
    & .decor {
      display: none;
    }
    & .faqs .faq-item {
      & button {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 14px 16px;
        & > i:first-child {
          width: 28px;
        }
        & .question {
          flex-basis: calc(100% - 80px);
        }
        & .badge {
          order: 3;
          margin-left: 40px;
        }
      }
      & .answer p {
        padding: 0 16px 0 56px;
      }
    }
  }

  /* Contacto section */
  .contacto-brindemos-x {
    padding: 48px 16px 80px;
    gap: 32px;
    & .decor {
      display: none;
    }
    & .header {
      text-align: center;
      & .eyebrow {
        margin: 0 auto;
      }
    }
    & .contact-form {
      padding: 20px;
      border-radius: 24px;
      & .row {
        flex-direction: column;
      }
    }
    & .info-side {
      & h3 {
        text-align: center;
      }
      & .contact-card {
        flex-wrap: wrap;
        width: 100%;
        & .icon {
          width: 48px;
          height: 48px;
        }
        & a {
          width: 100%;
          justify-content: center;
        }
      }
      & .socials {
        flex-direction: column;
      }
    }
  }

  /* Footer section */
  .footer-brindemos-x {
    & img {
      width: 75%;
      height: auto;
      margin: 0 auto;
    }
  }
}
