@import url("global.css");

.svg-wave {
  height: 30px;
  display: none;

  path {
    fill: var(--primary-color-dark);
  }

  &.-top {
    margin-bottom: -8px;
  }

  &.-bottom {
    margin-top: -3px;
  }
}

@media only screen and (min-width: 1024px) {
  .svg-wave {
    height: 50px;
  }
}

/* HERO */
.hero {
  margin-bottom: 4rem;

  .image-container {
    display: flex;
    justify-content: center;
    overflow-x: hidden;

    .hero-img {
      margin: 2rem 0;
      width: 100%;
      height: auto;
    }
  }

  .hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;

    .discover-girona {
      width: 100%;
      color: var(--secondary-color-light);
      font-size: var(--font-size-xxxl);
      font-weight: 600;
      line-height: var(--font-size-xxxxl);
      padding: 0 2rem;
    }

    p {
      text-align: center;
      width: 75%;
      margin-bottom: 1.5rem;
      color: var(--primary-color-dark);
      font-size: var(--font-size-l);
      font-weight: 200;

      span {
        color: var(--secondary-color-light);
        font-weight: 500;
      }
    }

    .hero-claim span {
      display: block;
    }

    .hero-subclaim {
      font-size: var(--font-size-s);
      text-align: center;
      text-wrap: balance;
      max-width: 340px;
    }
  }
}

@media only screen and (min-width: 430px) {
  .hero .hero-container .hero-claim span {
    display: inline;
  }
}

@media only screen and (min-width: 481px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 4rem 2rem 2rem 2rem;

    .image-container {
      .hero-img {
        width: 100%;
        max-width: 600px;
        margin: 0;
      }
    }
  }
}

@media only screen and (min-width: 1024px) {
  .hero {
    max-width: 1200px;
    display: flex;
    flex-direction: row-reverse;
    margin: 0 auto;
    gap: 3rem;
    padding: 8rem 0;

    .image-container {
      width: 800px;
    }

    .hero-container {
      .discover-girona {
        font-size: 4.5rem;
        line-height: 5.5rem;
        font-weight: 900;
        padding: 0;
      }

      .hero-claim {
        font-size: var(--font-size-l);
        color: var(--primary-color-dark);
      }
    }
  }
}

/* BENEFITS */
.benefits {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-left: 15%;
  padding-right: 15%;

  .benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* min-width: 300px; */

    .big-icon {
      width: 120px;
      height: 120px;
    }

    h3 {
      font-size: var(--font-size-xl);
      font-weight: 500;
      margin: 1rem 0;
    }

    p {
      text-align: center;
      text-wrap: balance;
      font-size: var(--font-size-m);
    }
  }
}

@media only screen and (min-width: 481px) {
  .benefits {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5rem;

    .benefit {
      width: 300px;

      h2 {
        text-align: center;
      }
    }
  }
}

/* PRODUCT */
.product {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  min-height: 100vh;

  .section-title {
    width: 85%;
    margin: auto;
  }

  h3 {
    text-align: center;
  }
}

@media (min-width: 1024px) {
  .section.product {
    .section-title,
    .swiper {
      margin-top: 0;
      margin-bottom: 0;
    }
  }

  .card-list .card-item {
    padding-bottom: 2rem;
  }
}

/* PRODUCT SWIPER */
.swiper {
  max-width: 900px;
  width: 100%;
}

.card-wrapper {
  max-width: 1100px;
  overflow: hidden;
  padding: 0 2rem;
}

.card-list .card-item {
  list-style: none;
}

.card-list .card-item .card-link {
  padding: 18px;
  user-select: none;
  border-radius: 12px;
  text-decoration: none;
  transition: 0.2s ease;
}

.card-list .card-item .card-link:active {
  cursor: grabbing;
}

.card-list .card-link {
  display: flex;
  flex-direction: column;
  align-items: center;

  p {
    text-align: center;
    text-wrap: pretty;
  }
}

.card-list .card-link .card-image {
  width: 100%;
  max-width: 450px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid black;
  padding: 3px;
}

.card-list .card-link .card-title {
  color: #000;
  font-size: var(--font-size-m);
  margin: 2rem 0 1rem 0;
  font-weight: 600;
  text-align: center;
}

.card-wrapper .swiper-pagination-bullet {
  height: 13px;
  width: 13px;
  opacity: 0.5;
  background: var(--primary-color-light);
}
.card-wrapper .swiper-pagination-bullet-active {
  opacity: 1;
}
.card-wrapper .swiper-slide-button {
  color: var(--primary-color-light);
  margin-top: -100px;
}

@media (max-width: 768px) {
  .card-wrapper {
    margin: 0 10px 25px;
  }
  .card-wrapper .swiper-slide-button {
    /* display: none; */
  }
}

/* CTA BUY */
.cta-buy-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;

  h2 {
    font-size: var(--font-size-l);
    text-align: center;
    padding: 0 2rem;
  }

  .audio-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;

    .audio-button {
      display: flex; /* Enable flexbox */
      align-items: center;
      justify-content: center;
      background-color: var(--primary-color-light);
      color: var(--primary-color-dark);
      border: none;
      padding: 1rem 1rem;
      border-radius: 50%;
      cursor: pointer;
      font-size: var(--font-size-m);

      svg {
        width: 24px;
        height: 24px;

        &.hidden {
          display: none;
        }
      }
    }
  }
}

/* TOUR */
.tour {
  .gallery-container {
    position: relative;
  }

  .tour-photos {
    position: relative;
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    margin-top: 2rem;
    padding: 0 15%;

    .tour-photo-wrapper {
      flex-shrink: 0;
      width: 300px;
      height: 400px;
      border-radius: var(--img-border-radius);
      overflow: hidden;

      img {
        height: 100%;
        width: 100%;
        object-fit: cover;
      }
    }
  }

  .scroll-arrow {
    visibility: hidden;
    z-index: 10;
    top: 50%;
    position: absolute;
    width: 48px;
    transform: translateY(-50%);
    cursor: pointer;
    transition: opacity 0.3s ease;

    rect {
      fill: var(--primary-color-dark);
    }

    path {
      fill: var(--primary-color-light);
    }

    &.-left {
      left: 1px;
    }

    &.-right {
      right: 1px;
    }
  }

  .tour-photos::-webkit-scrollbar {
    display: none;
  }

  .tour-fold-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;

    .tour-fold-section {
      .title {
        display: flex;
        justify-content: space-between;
        border-bottom: 2px solid var(--primary-color-light);
        cursor: pointer;

        h3 {
          color: var(--primary-color-dark);
          text-transform: uppercase;
          font-size: var(--font-size-l);
          margin: 0;
          font-weight: 400;
        }

        .openimg {
          width: 32px;
          fill: var(--primary-color-dark);
        }
      }

      .body {
        padding: 1.5rem 0;
        display: none;
        opacity: 0;
        height: 0;
        overflow: hidden;
        /* TODO: Fix transition not working. Same for FAQs */
        transition: opacity 1s ease, height 1s ease;
      }
    }

    .tour-fold-section.open .body {
      display: block;
      opacity: 1;
      height: auto;
    }

    .tour-fold-section.open .openimg {
      transform: rotate(180deg);
    }

    .highlights,
    .landmarks {
      li {
        list-style-type: none;
      }

      li::before {
        content: "•";
        color: var(--primary-color-dark);
        font-size: 28px;
        margin-right: 5px;
        vertical-align: middle;
        line-height: 1.2;
      }
    }

    .basic-info-items {
      display: flex;
      flex-direction: column;
      gap: 0.8rem;

      .basic-info-item {
        display: flex;
        align-items: center;

        svg {
          fill: var(--primary-color-dark);
          width: 18px;
          height: 18px;
          margin-right: 5px;
        }

        svg.svg-negative {
          fill: none;

          path {
            fill: var(--primary-color-dark);
          }
        }

        svg.svg-stroke {
          fill: none;

          path {
            stroke: var(--primary-color-dark);
          }
        }

        strong {
          color: var(--primary-color-dark);
        }
      }
    }

    .tour-description {
      .description {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4; /* Limit to 4 lines */
        overflow: hidden;
        text-overflow: ellipsis;

        strong {
          font-weight: 700;
          color: var(--primary-color-dark);
        }
      }

      .see-more-btn {
        background: none;
        border: none;
        color: blue;
        cursor: pointer;
        text-decoration: underline;
        padding: 0;
        margin-top: 10px;
        font-size: 14px;
      }
    }
  }
}

@media only screen and (min-width: 767px) {
  .tour {
    h3 {
      margin: 3rem 0 1.2rem 0;
    }

    .scroll-arrow {
      visibility: visible;
    }

    .tour-basic-info {
      .basic-info-items {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        gap: 0;

        .basic-info-item {
          flex: 1 0 50%;
          margin-bottom: 0.8rem;
        }
      }
    }

    .landmarks {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      gap: 0.6rem;

      li {
        flex: 1 0 45%;
      }
    }
  }
}

@media only screen and (min-width: 1024px) {
  .highlights {
    column-count: 2;
  }
}

/* PRICING */
.pricing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;

  .pricing-price {
    font-size: 6rem;
    font-weight: 800;

    div {
      color: var(--primary-color-light);
      font-size: var(--font-size-l);
      font-weight: 400;
      text-align: center;
    }
  }

  .pricing-benefits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;

    .pricing-benefit {
      display: flex;
      align-items: center;

      .pricing-benefit-icon {
        width: 18px;
        margin-right: 6px;

        path {
          stroke: white;
        }
      }

      p {
        text-align: center;
        text-wrap: balance;
      }
    }
  }
}

/* COMPARISON */
.comparison {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  .overflow-x-container {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
    /* padding-left: 2rem; */

    .comparison-card {
      display: none;
      opacity: 0;
      transition: opacity 0.25s ease;
      border: 3px solid transparent; /* To avoid flicking when toggling cards */

      &.show {
        opacity: 1;
        display: flex;
      }

      position: relative;
      flex-shrink: 0;
      flex-direction: column;
      gap: 2rem;
      width: 370px;
      padding: 2rem 1rem;
      border-radius: 12px;
      box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
      font-size: 1.2rem;

      &.border-highlighted {
        border: 3px solid var(--primary-color-light);
        background-color: rgba(28, 40, 98, 0.02);
      }

      .comparison-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 40px;

        .badge {
          position: absolute;
          top: 10px;
          right: 10px;
          background: var(--primary-color-light);
          color: var(--primary-color-dark);
          border-radius: var(--img-border-radius);
          padding: 5px 10px;
          font-size: var(--font-size-s);
          font-weight: 600;
        }
      }

      .comparison-card-body {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;

        .comparison-price {
          text-align: center;
          margin-bottom: 1.2rem;

          h3 {
            font-size: var(--font-size-xxxl);
            font-weight: 800;
          }

          .per-group {
            color: var(--color-grey);
            font-size: var(--font-size-s);
          }
        }

        .comparison-feature {
          display: flex;
          align-items: start;

          &.--grey {
            color: var(--color-grey);
          }

          .icon-feature {
            flex: 0 1 auto;
            max-width: 30px;
            margin-right: 3px;

            path {
              stroke: var(--primary-color-dark);
            }

            &.-negative {
              path {
                stroke: none;
                fill: var(--color-grey);
              }
            }
          }
        }
      }

      .comparison-card-footer {
        display: flex;
        justify-content: center;
      }
    }
  }

  .overflow-x-container::-webkit-scrollbar {
    display: none;
  }
}

@media only screen and (min-width: 767px) {
  .comparison {
    display: flex;
    flex-direction: column;
    align-items: center;

    .segmented-control {
      visibility: hidden;
      max-height: 0;
    }

    .overflow-x-container {
      .comparison-card {
        padding: 3rem 2.5rem;
      }
    }
  }
}

/* FAQS */
.faqs {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: -60px;

  .section-title {
    margin-bottom: -10px;
  }
  .faq {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    .faq-question-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      border-bottom: 1px solid var(--primary-color-dark);

      h3 {
        color: var(--primary-color-dark);
        font-weight: 400;
      }

      .openimg {
        flex-shrink: 0;
        margin-left: 8px;
        fill: var(--primary-color-dark);
        margin-right: 6px;
        width: 32px;
      }
    }

    p {
      display: none;
      opacity: 0;
      height: 0;
      overflow: hidden;
      transition: opacity 1s ease, height 1s ease;
    }
  }

  .faq.open p {
    display: block;
    opacity: 1;
    height: auto;
  }

  .faq.open .openimg {
    transform: rotate(180deg);
  }
}

/* ABOUT US */
.about {
  .section-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .about-img {
    width: 100%;
    max-width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: var(--img-border-radius);
  }
}

@media only screen and (min-width: 767px) {
  .about {
    .section-body {
      display: flex;
      flex-direction: row;

      .about-img {
        height: 100%;
        width: 300px;
        object-fit: cover;
      }
    }
  }
}

/* FOOTER */
.footer {
  margin-bottom: -3rem;

  .footer-logo {
    height: 45px;
    width: auto;
  }

  .footer-item {
    margin-bottom: 1.2rem;

    .footer-item-title {
      margin-bottom: 0.2rem;
    }

    a {
      text-decoration: none;
      color: var(--primary-color-dark);
    }

    li {
      list-style-type: none;
    }
  }

  .payment-methods {
    display: flex;
    align-items: center;
    gap: 1rem;

    .logo-payment-methods {
      width: 70px;
      height: 100%;
    }
  }
}

.footer-cta {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

@media only screen and (min-width: 767px) {
  .footer {
    display: flex;
    justify-content: space-between;

    .footer-column {
      flex: 1;
      padding-right: 2rem;
    }
  }
}

/* Segmented control container */
.segmented-control {
  display: flex;
  justify-content: center;
  border-radius: 50px;
  overflow: hidden;
  width: 300px;
  background-color: var(--background-color);
  border: 3px solid var(--primary-color-dark);
}

/* Segment labels */
.segmented-control label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;

  label[for="freeTour"] {
    color: red;
  }
}

label[for="freeTour"] {
  /* background-color: var(--secondary-color-pink); */
  border-radius: 50px;
}

.segmented-control input {
  display: none;
}

/* Highlight the selected segment */
.segmented-control input#wanderjoy:checked + label {
  background-color: var(--primary-color-dark);
  color: white;
  border: 3px solid var(--background-color);
  border-radius: 50px;
}

.segmented-control input#freeTour:checked + label {
  background-color: #ccc;
  color: black;
  border: 3px solid var(--background-color);
  border-radius: 50px;
}
