/* The page is NOT responsive. You can implement responsiveness yourself if you wanna have some fun 😃 */

:root {
  --color-primary: rgb(20, 157, 217);
  --color-secondary: rgb(20, 157, 217);
  --color-tertiary: rgb(20, 157, 217);
  --color-primary-darker: rgb(0, 137, 197);
  --color-secondary-darker: rgb(0, 137, 197);
  --color-tertiary-darker: rgb(0, 137, 197);
  --color-primary-opacity: #5ec5763a;
  --color-secondary-opacity: #ffcd0331;
  --color-tertiary-opacity: #ff58602d;
  --gradient-primary: linear-gradient(
    to top left,
    rgb(20, 157, 217),
    rgb(0, 137, 197)
  );
  --gradient-secondary: linear-gradient(
    to top left,
    rgb(0, 137, 197),
    rgb(20, 157, 217)
  );
}

* {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  font-size: 62.5%;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  color: #444;
  line-height: 1.9;
  background-color: rgb(0, 0, 0s);
}

/* GENERAL ELEMENTS */

/* GENERAL ELEMENTS */
.section {
  padding: 3rem 3rem;
  border-top: 1px solid #ddd;

  transition: transform 1s, opacity 1s;
}

.section--hidden {
  opacity: 0;
  transform: translateY(8rem);
}

.section__title {
  max-width: 80rem;
  margin: 0 auto 8rem auto;
}

.section__description {
  font-size: 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.section__header {
  font-size: 4rem;
  line-height: 1.3;
  font-weight: 500;
}

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  font-size: 1.6rem;
  font-family: inherit;
  font-weight: 500;
  border: none;
  padding: 1.25rem 4.5rem;
  border-radius: 10rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn:hover {
  background-color: var(--color-primary-darker);
}

.btn--text {
  display: inline-block;
  background: none;
  font-size: 1.7rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--color-primary);
  border: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  cursor: pointer;
  transition: all 0.3s;
}

p {
  color: #666;
  font-size: 1.7rem;
}

/* This is BAD for accessibility! Don't do in the real world! */
button:focus {
  outline: none;
}

img {
  transition: filter 0.5s;
}

.lazy-img {
  filter: blur(20px);
}

/* NAVIGATION */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 9rem;
  width: 100%;
  padding: 0 4rem;
  z-index: 100;
  color: rgb(255, 255, 255);
  background-color: rgba(20, 157, 217, 0.95);
}

/* nav and stickly class at the same time */
.nav.sticky {
  position: fixed;
  background-color: rgba(255, 255, 255, 0.95);
}

.nav__logo {
  height: 4.5rem;
  transition: all 0.3s;
}

.nav__links {
  display: flex;
  align-items: center;
  list-style: none;
}

.nav__link--btn img {
  height: 3rem;
}

.nav__item {
  margin-left: 5rem;
  display: flex;
  align-items: center;
}

.nav__link {
  text-decoration: none;
  text-align: center;
  color: black; /* Adjust the color as needed */
  margin-left: 0.5rem; /* Adjust the spacing between the image and text as needed */
  font-size: 1.7rem;
  font-weight: 400;
  color: inherit;
  text-decoration: none;
  display: block;
  transition: all 0.3s;
}

.nav__link--btn {
  padding: 0.8rem 2.5rem;
  border-radius: 3rem;
  background-color: rgb(255, 255, 255);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center; /* Center content horizontally */
}

.nav__link img {
  height: 3rem;
  margin-right: 0.5rem; /* Adjust as needed for spacing between image and text */
}

.linkname {
  display: flex;
  align-items: center;
}

.nav__link--btn:hover,
.nav__link--btn:active {
  color: inherit;
  background-color: var(--color-primary-darker);
  color: #333;
}

/* HEADER */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.header__title {
  flex: 1;

  max-width: 115rem;
  display: grid;
  grid-template-columns: 3fr 2fr;
  row-gap: 3rem;
  align-content: center;
  justify-content: center;

  align-items: start;
  justify-items: start;

  padding: 2rem;
}

h1 {
  font-size: 5.5rem;
  line-height: 1.35;
}

h4 {
  font-size: 2.4rem;
  font-weight: 500;
}

.highlight {
  position: relative;
  color: white;
  margin-left: 5rem;
}

.highlight::after {
  display: block;
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: -1;
  opacity: 0.7;
  transform: scale(1.07, 1.05) skewX(-15deg);
  background-image: var(--gradient-primary);
}

/* NEWS */

.boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start; /* Align items to the top of each grid cell */
  justify-content: center;
  gap: 20px;
  flex-direction: column; /* Each box in its own row */
}

.box {
  border: 5px solid white;
  background-color: var(--color-primary);
  background-image: url(image/greypen.png);
  background-repeat: no-repeat;
  background-position: center;
  width: 50%;
  padding-top: 60%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align items to the left */
  justify-content: flex-start; /* Align content to the top */
  position: relative;
  color: white;
}

.news__header {
  margin: 10px; /* Adjust margin as needed */
  align-self: flex-start; /* Align text to the start (top) of the box */
}

.news__header {
  margin: 10px; /* Adjust margin as needed */
}

.box a {
  text-decoration: none;
  color: white;
}

.news__header {
  padding: 0 1rem 0 1rem; /* Push to the bottom */
  font-size: 1.6rem;
}

.news__text {
  padding: 0 1rem 1rem 1rem;
  font-size: 1.2rem;
}

.background {
  display: none;
}

.page-button {
  display: flex;
  margin-right: 1rem;
  color: white;
  background-color: var(--color-primary);
  border: none;
  padding: 0.4rem;
}

.box img {
  width: 10%;
}

/* FOOTER */
.footer {
  padding: 1rem 0rem;
  background-color: var(--color-primary-darker);
}

.footer__nav {
  list-style: none;
  display: flex;
  justify-content: center;
  margin-bottom: 5rem;
}

.footer__item {
  margin-right: 4rem;
}

.footer__link {
  display: flex;
  align-items: center; /* Align items vertically */
  font-size: 1.7rem;
  color: #eee;
  text-decoration: none;
}

.footer__link img {
  height: 3rem;
  margin-right: 0.5rem; /* Adjust as needed for spacing between image and text */
}

.footer__logo {
  height: 5rem;
  display: block;
  margin: 0 auto;
  margin-bottom: 5rem;
}

.footer__name {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 300;
  transform: translateY(-3rem);
}

.footer__end {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  justify-content: center;
}

.footer__ending {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* RESEARCH */

.researches {
  font-size: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-content: space-between;
  grid-gap: 4rem;
  margin-top: 9rem;
}

.research {
  margin-right: 4rem;
}

/* MODAL WINDOW */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 60rem;
  background-color: #f3f3f3;
  padding: 5rem 6rem;
  box-shadow: 0 4rem 6rem rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.5s;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  transition: all 0.5s;
}

.modal__header {
  font-size: 3.25rem;
  margin-bottom: 4.5rem;
  line-height: 1.5;
}

.modal__form {
  margin: 0 3rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 2.5rem;
}

.modal__form label {
  font-size: 1.7rem;
  font-weight: 500;
}

.modal__form input {
  font-size: 1.7rem;
  padding: 1rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
}

.modal__form button {
  grid-column: 1 / span 2;
  justify-self: center;
  margin-top: 1rem;
}

.btn--close-modal {
  font-family: inherit;
  color: inherit;
  position: absolute;
  top: 0.5rem;
  right: 2rem;
  font-size: 4rem;
  cursor: pointer;
  border: none;
  background: none;
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

/* COOKIE MESSAGE */
.cookie-message {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  width: 100%;
  background-color: white;
  color: #bbb;
  font-size: 1.5rem;
  font-weight: 400;
}

/* RESPONSIVE */

.menu {
  visibility: hidden;
}

@media (max-width: 1184px) {
  .menu {
    visibility: visible;
    cursor: pointer;
    display: flex;
    align-items: center; /* Align vertically centered */
    justify-content: flex-end; /* Align to the right */
    margin-left: auto; /* Push to the right by pushing the left margin to auto */
    margin-right: 20px; /* Add some right margin for spacing */
  }

  .nav__menu ul.nav__links {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--color-primary);
    color: white;
    width: 70%; /* Adjust width as needed */
    height: 100%;
    border-right: #ccc 1px solid;
    opacity: 0.9;
    padding: 30px;
    transform: translateX(-100%);
    transition: transform 0.5s ease-in-out;
    overflow-y: auto; /* Make it scrollable */
  }

  .nav__menu ul.nav__links li {
    padding: 10px;
    border-bottom: #ccc solid 1px;
    font-size: 14px;
  }

  .nav__menu ul.nav__links li:last-child {
    border-bottom: 0;
  }

  .nav__menu ul.nav__links.show {
    transform: translateX(0);
  }

  .slider {
    background-size: contain;
    background-position: center;
  }

  section#section--2 {
    height: auto;
  }

  section#section--2 video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Maintain the video's aspect ratio while covering the container */
  }

  .footer__link {
    font-size: 1.3rem; /* Adjust font size for smaller screens */
  }

  .footer__link img {
    height: 2.8rem; /* Adjust height for smaller screens */
  }

  .footer__logo {
    height: 3.5rem; /* Adjust height for smaller screens */
  }

  .footer__name {
    font-size: 1rem; /* Adjust font size for smaller screens */
    transform: translateY(-1rem); /* Adjust translateY for smaller screens */
  }

  .footer__nav {
    display: grid;
    grid-template-columns: repeat(
      auto-fill,
      minmax(150px, 1fr)
    ); /* Adjust the minmax values as needed */
    gap: 1rem; /* Adjust as needed for spacing between columns */
    justify-content: center; /* Center the columns */
  }

  .footer__item {
    margin-right: 0;
  }
  
  .researches {
    font-size: 1.5rem;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    justify-content: space-between;
    grid-gap: 4rem;
    margin-top: 9rem;
  }

  h1 {
    font-size: 3.5rem;
    line-height: 1.35;
  }
}

@media (max-width: 930px) {
  .features {
    grid-template-columns: 1fr;
    gap: 0; /* Remove the gap */
    margin: 0; /* Remove the margin */
  }

  .features__feature {
    margin-bottom: 0; /* Remove margin-bottom */
  }

  .footer__end {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (max-width: 840px) {
  .boxes {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-template-columns: repeat(1, 1fr);
  }

  .box {
    width: 50%;
    padding-top: 60%;
  }
}
