*,
*::before,
*::after {
  box-sizing: border-box;
}

/* White navbar variant - nested under a parent class */
.white-nav {
  .nav-flex {
    width: 100%;
    font-weight: 300;
    top: 0;
    left: 0;
    color: white;
    padding-bottom: 56px;

    .home-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 18px;
      padding: 32px 64px 8px 64px;
      font-family: "Inter";
      height: 14vh;

      .colored {
        margin-top: 40px;
      }

      .left-top {
        display: flex;
        gap: 14px;

        .language-select {
          padding: 0 6px 0 8px;
          border: 1px solid white;
          display: flex;
          align-items: center;
          gap: 4px;

          img {
            width: 34px;
          }

          .selecticon {
            width: 20px;
          }
        }

        .menu {
          display: flex;
          align-items: center;
          gap: 16px;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.2s ease-in-out;

          &:hover {
            opacity: 0.7;
          }
        }
      }

      .logo {
        width: 254px;
        justify-self: center;
        position: absolute;
        top: 24px;
        right: 50%;
        left: 50%;
      }

      .right-top {
        display: flex;
        align-items: center;
        gap: 14px;

        .contact-button {
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 10px 24px;
          border: 1px solid white;
          font-size: 14px;
          transition: all 0.1s ease-in-out;

          &:hover {
            background-color: white;
            color: #002147;
            cursor: pointer;
          }
        }

        .user-account {
          display: flex;
          border-bottom: 1px solid white;
          font-size: 14px;
          align-items: center;
          gap: 12px;
          padding: 0 16px;
          height: 36px;
          transition: all 0.1s ease-in-out;

          &:hover {
            background-color: rgba(255, 255, 255, 0.2);
            cursor: pointer;
          }
        }

        .gift-button {
          display: flex;
          align-items: center;
          justify-content: center;
          border: 1px solid white;
          width: 36px;
          height: 36px;
          transition: all 0.1s ease-in-out;

          img {
            width: 24px;
          }

          &:hover {
            background-color: white;
            color: #002147;
            cursor: pointer;

            img {
              filter: brightness(0);
            }
          }
        }
      }
    }
  }

  /* Modal Styles for white nav */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    font-family: "Inter", sans-serif;
    color: white;

    &.active {
      opacity: 1;
      visibility: visible;
    }

    .modal-content {
      position: relative;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      padding: 64px;
      box-sizing: border-box;
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 80px;
    }

    .modal-logo {
      width: 254px;
    }

    .close-button {
      background: none;
      border: none;
      cursor: pointer;
      padding: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s ease-in-out;

      &:hover {
        opacity: 0.7;
        transform: scale(1.1);
      }

      img {
        width: 32px;
        height: 32px;
      }

      /* If you don't have a close icon, use this CSS-only close button */
      &:not(:has(img))::before {
        content: "✕";
        font-size: 32px;
        color: white;
        font-weight: 300;
      }
    }

    .modal-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
    }

    .modal-menu-section {
      h2 {
        font-size: 48px;
        font-weight: 400;
        margin-bottom: 60px;
        color: #B8860B;
      }
    }

    .modal-nav-links {
      display: flex;
      flex-direction: column;
      gap: 40px;
      align-items: center;
    }

    .modal-nav-link {
      font-size: 32px;
      font-weight: 300;
      color: white;
      text-decoration: none;
      transition: all 0.2s ease-in-out;
      padding: 16px 32px;
      border-radius: 4px;

      &:hover {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateX(10px);
      }
    }

    .modal-footer {
      margin-top: auto;
      padding-top: 40px;
    }

    .modal-contact-info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 24px;
    }

    .social-icons {
      display: flex;
      gap: 16px;

      a {
        display: block;
        width: 32px;
        height: 32px;
        transition: all 0.2s ease-in-out;

        &:hover {
          transform: scale(1.1);
        }

        img {
          width: 100%;
          height: 100%;
        }
      }
    }

    .contact-details {
      display: flex;
      gap: 32px;
      font-size: 16px;
      font-weight: 300;

      span {
        color: white;
      }
    }

    .footer-links {
      display: flex;
      gap: 24px;
      font-size: 14px;
      font-weight: 300;

      span,
      a {
        color: white;
        text-decoration: none;

        &:hover {
          opacity: 0.7;
        }
      }
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      .modal-content {
        padding: 32px 24px;
      }

      .modal-menu-section h2 {
        font-size: 36px;
        margin-bottom: 40px;
      }

      .modal-nav-link {
        font-size: 24px;
      }

      .modal-contact-info {
        flex-direction: column;
        text-align: center;
        gap: 16px;
      }

      .contact-details {
        flex-direction: column;
        gap: 8px;
      }
    }
  }
}

body {
  font-family: "Poppins";
  background-image: url("../assets/images/lucern-bg.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  transition: background-image 0.5s ease-in-out;
  overflow-x: hidden;

  .list-container {
    display: flex;
    align-items: center;
    justify-content: end;

    .list {
      /* position: absolute; */
      top: 24%;
      right: 10%;
      font-size: large;
      display: flex;
      justify-content: center;
      flex-direction: column;
      align-items: center;
      font-weight: 200;
      z-index: 10;
      font-family: "Inter";

      .city-option {
        cursor: pointer;
        transition: all 0.1s ease;
        padding: 4px 16px;
        margin: 4px 0;
        margin-right: 124px;

        &:hover {
          scale: 1.1;
          background-color: rgba(255, 255, 255, 0.1);
        }

        &.selected {
          font-size: xx-large;
          font-weight: 700;
          display: flex;
          align-items: center;
          justify-content: center;
          position: relative;
          margin: 0;

          &:hover {
            font-size: xx-large;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            scale: 1;
            background-color: transparent;
          }

          div {
            height: 2px;
            width: 100px;
            background-color: white;
            margin-left: 16px;
            margin-top: 5px;
            animation: slideIn 0.3s ease-out;
          }
        }
      }
    }
  }

  a {
    text-decoration: none;
    color: white;
  }

  main {
    padding: 14.2% 5% 100px 5%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;

    p {
      width: 60%;
      transition: opacity 0.3s ease;
    }

    #attractions-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 24px;

      .first {
        background-image: url("../assets/images/le-pont-de-la-chapelle.png");
      }

      .second {
        background-image: url("../assets/images/mont-pilatus.png");
      }

      .third {
        background-image: url("../assets/images/vielle-ville-de-lucerne.png");
      }

      .forth {
        background-image: url("../assets/images/le-lion-de-lucerne.png");
      }

      .item {
        background-size: cover;
        background-position: center;
        height: 433px;
        display: flex;
        flex-direction: column;
        cursor: pointer;
        transition: all 0.3s ease;
        overflow: hidden;
        position: relative;

        &:hover {
          scale: 1.05;
          box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
          z-index: 1;
        }

        .description {
          padding: 20px;
          margin-top: auto;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          text-align: center;
          position: relative;
          z-index: 2;

          img {
            margin-bottom: 16px;
            width: 48px;
            height: 48px;
          }

          .attraction-name {
            font-weight: 500;
            font-size: 16px;
            line-height: 1.5;
          }
        }
      }
    }
  }

  .title {
    font-family: "New York";
    font-size: 100px;
    transition: opacity 0.3s ease;
  }
}

@keyframes slideIn {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    width: 100px;
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  body {
    .list {
      top: 15%;
      right: 5%;
      font-size: medium;

      .city-option.selected {
        font-size: x-large;

        div {
          width: 200px;
          margin-left: 250px;
        }
      }
    }

    main {
      padding: 40% 5% 100px 5%;

      .title {
        font-size: 60px;
      }

      p {
        width: 90%;
      }

      #attractions-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;

        .item {
          height: 300px;

          .description {
            padding: 15px;

            .attraction-name {
              font-size: 14px;
            }
          }
        }
      }
    }
  }
}

@media (max-width: 480px) {
  body {
    .list {
      top: 10%;
      right: 50%;
      transform: translateX(50%);
      align-items: center;

      .city-option.selected {
        font-size: large;

        div {
          width: 150px;
          margin-left: 180px;
        }
      }
    }

    main {
      .title {
        font-size: 40px;
      }

      #attractions-grid {
        grid-template-columns: 1fr;

        .item {
          height: 250px;
        }
      }
    }
  }
}/* Tablet styles */
@media (max-width: 1024px) {
  .white-nav {
    .nav-flex {
      .home-top {
        padding: 24px 32px 8px 32px;
        font-size: 16px;
        height: 12vh;

        .logo {
          width: 200px;
          top: 18px;
        }

        .left-top {
          gap: 12px;

          .language-select {
            padding: 0 4px 0 6px;

            img {
              width: 28px;
            }

            .selecticon {
              width: 16px;
            }
          }

          .menu {
            gap: 12px;
            font-size: 12px;
          }
        }

        .right-top {
          gap: 12px;

          .contact-button {
            padding: 8px 16px;
            font-size: 12px;
          }

          .user-account {
            font-size: 12px;
            gap: 8px;
            padding: 0 12px;
            height: 32px;
          }

          .gift-button {
            width: 32px;
            height: 32px;

            img {
              width: 20px;
            }
          }
        }
      }
    }
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .white-nav {
    .nav-flex {
      .home-top {
        padding: 16px 20px 8px 20px;
        font-size: 14px;
        height: 10vh;

        .logo {
          width: 160px;
          top: 12px;
        }

        .left-top {
          gap: 8px;

          .language-select {
            padding: 0 3px 0 4px;

            img {
              width: 24px;
            }

            .selecticon {
              width: 14px;
            }
          }

          .menu {
            gap: 8px;
            font-size: 11px;

            img {
              width: 16px;
            }
          }
        }

        .right-top {
          gap: 8px;

          .contact-button {
            padding: 6px 12px;
            font-size: 11px;
          }

          .user-account {
            font-size: 11px;
            gap: 6px;
            padding: 0 8px;
            height: 28px;

            img {
              width: 16px;
            }
          }

          .gift-button {
            width: 28px;
            height: 28px;

            img {
              width: 16px;
            }
          }
        }
      }
    }

    /* Mobile modal adjustments */
    .modal-overlay {
      .modal-content {
        padding: 32px 20px;
      }

      .modal-header {
        margin-bottom: 40px;
      }

      .close-button {
        img {
          width: 24px;
          height: 24px;
        }
      }

      .modal-nav-link {
        font-size: 24px;
        padding: 12px 24px;
      }

      .modal-bottom {
        .bottom-left {
          flex-direction: column;
          gap: 16px;
          text-align: center;

          a {
            font-size: 14px;
          }

          img {
            width: 24px;
            height: 24px;
          }
        }

        .bottom-right {
          flex-direction: column;
          gap: 8px;
          text-align: center;
          font-size: 12px;
        }
      }
    }
  }
}

/* Small mobile styles */
@media (max-width: 480px) {
  .white-nav {
    .nav-flex {
      .home-top {
        padding: 12px 16px 6px 16px;
        font-size: 12px;
        height: 8vh;

        .colored {
          margin-top: 20px;
        }

        .logo {
          width: 120px;
          top: 8px;
        }

        .left-top {
          gap: 6px;

          .language-select {
            padding: 0 2px 0 3px;

            img {
              width: 20px;
            }

            .selecticon {
              width: 12px;
            }
          }

          .menu {
            gap: 6px;
            font-size: 10px;

            img {
              width: 14px;
            }
          }
        }

        .right-top {
          gap: 6px;

          .contact-button {
            padding: 4px 8px;
            font-size: 10px;
          }

          .user-account {
            font-size: 10px;
            gap: 4px;
            padding: 0 6px;
            height: 24px;

            div {
              display: none; /* Hide text on very small screens */
            }

            img {
              width: 14px;
            }
          }

          .gift-button {
            width: 24px;
            height: 24px;

            img {
              width: 14px;
            }
          }
        }
      }
    }

    /* Very small mobile modal adjustments */
    .modal-overlay {
      .modal-content {
        padding: 24px 16px;
      }

      .modal-header {
        margin-bottom: 30px;
      }

      .modal-nav-link {
        font-size: 20px;
        padding: 10px 20px;
      }

      .modal-bottom {
        flex-direction: column;
        gap: 20px;

        .bottom-left {
          order: 2;
        }

        .bottom-right {
          order: 1;
        }
      }
    }
  }
}

/* Language dropdown responsive styles */
@media (max-width: 768px) {
  .white-nav {
    .language-select {
      .language-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(0, 33, 71, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: 8px 0;
        min-width: 120px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;

        .language-option {
          display: flex;
          align-items: center;
          padding: 8px 12px;
          gap: 8px;
          transition: background-color 0.2s ease;

          &:hover {
            background-color: rgba(255, 255, 255, 0.1);
          }

          img {
            width: 20px;
          }
        }
      }

      &.active .language-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
      }
    }
  }
}