* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --white: #fff;
  --black: #000;
  --black75: #000000bf;
  --black40: #00000066;
  --whiteBlue: #eff1f4;
  --blue: #5588f5;
  --navy: #001a2c;
  --navy90: #001a2ce6;
}

@font-face {
  font-family: "Spectral SC";
  src: url(../fonts/Spectral_SC/SpectralSC-Regular.ttf);
}

@font-face {
  font-family: "Albert Sans";
  src: url(../fonts/Albert_Sans/static/AlbertSans-Regular.ttf);
}
/* Body */

body {
  background: var(--whiteBlue);
}
main {
  min-height: calc(100svh - 375px);
}

.font-title {
  font-family: "Spectral SC", "Times New Roman", Times, serif;
}
.font-text {
  font-family: "Albert Sans", Arial, Helvetica, sans-serif;
}
.loose-heading {
  font-size: 2rem;
  font-weight: 300;
  text-align: center;
  margin-top: 10px;
}
.loose-date {
  text-align: center;
  font-size: 1rem;
  font-weight: 300;
  color: var(--blue);
}
.hidden {
  display: none;
}
/* Buttons */
button {
  width: 200px;
  height: 50px;
  font-size: 1.25rem;
  transition: 0.35s;
  cursor: pointer;
}
button.button-blue {
  background: var(--blue);
  border: none;
  color: var(--white);
}
button.button-blue:hover {
  background: #4058b9;
}
button.white-bordered {
  background: var(--black40);
  border: 2px solid var(--white);
  color: var(--white);
}
button.white-bordered:hover {
  background: var(--white);
  color: var(--black);
}
button.loose-button{
    transform: translateX(-50%);
    left: 50%;
    position: relative;
    margin: 40px 0 20px 0;
}
/* Hero */

section.hero {
  background: url(../img/website/hav.jpg) center, var(--black40);
  background-size: cover, cover;
  background-blend-mode: color;
  height: 80svh;
  min-height: fit-content;
  max-height: 700px;
  width: 100%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
section.hero img.hero-logo {
  object-fit: cover;
  width: 100%;
  max-width: 500px;
  height: 150px;
}
section.hero p{
    font-size: 1.2rem;
    color: var(--white);
    max-width: 400px;
}
section.hero div.button-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* News */

section.news {
  background: var(--white);
  width: calc(100% - 20px);
  max-width: 1400px;
  height: 500px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 4px 8px 0 var(--black40);
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

img.displayed,
article.displayed .heading-container,
article.displayed p {
  animation: changeopacity 0.5s;
}

@keyframes changeopacity {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 100;
  }
}

section.news div.container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
section.news article {
  position: relative;
  padding: 50px 10px;
  background: var(--navy90);
  height: 100%;
  max-width: 650px;
}

section.news h3,
section.news h4,
section.news p {
  color: var(--white);
}
section.news .heading-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
section.news h3 {
  font-size: 2rem;
  font-weight: 300;
  line-height: 100%;
}
section.news h4 {
  font-size: 1rem;
  font-weight: 300;
}
section.news p {
  margin: 40px 10px;
  max-height: 300px;
  overflow: hidden;
}
section.news button {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
}
section.news span.loading-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--blue);
  animation: changewidth 10s linear infinite;
}
section.news i {
  color: var(--white);
  position: absolute;
  bottom: 20px;
  font-size: 24px;
  cursor: pointer;
  &:nth-child(4) {
    left: 10px;
  }
  &:nth-child(5) {
    right: 10px;
  }
}

@keyframes changewidth {
  0% {
    width: 0;
  }
  100% {
    width: 100%;
  }
}

/* Partners */

section.partners {
  width: 100%;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background: var(--white);
  box-shadow: 0 4px 8px 0 var(--black40);
}
img.partner {
  width: 150px;
  object-fit: cover;
}
/* Services */

section.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min-content, 400px));
  padding: 0 10px;
  gap: 20px;
  justify-content: center;
}
div.service {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 210px;
  background: var(--white);
  box-shadow: 0 4px 8px 0 var(--black40);
}
div.service h3 {
  height: 50px;
  width: 100%;
  font-size: 1.5rem;
  font-weight: 300;
  align-content: center;
  text-align: center;
}
div.service img {
  width: 100%;
  height: calc(100% - 50px);
  object-fit: cover;
}
div.service button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 15px;
  box-shadow: 0 4px 8px 0 var(--black40);
}
/* Articles */
.about-article,
.preview-article,
.selected-article,
form.contact-form {
  position: relative;
  width: calc(100% - 20px);
  max-width: 1400px;
  margin: 0 10px 20px 10px;
  background: var(--white);
  box-shadow: 0 4px 8px 0 var(--black40);
  display: flex;
  flex-direction: column;
}
.about-article img,
.preview-article img,
.selected-article img {
  height: 330px;
  width: 100%;
  object-fit: cover;
}
.about-article .text-container,
.preview-article .text-container,
.selected-article .text-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about-article h3,
.preview-article h3,
.selected-article h3 {
  font-weight: 300;
  font-size: 1.75rem;
  text-align: center;
}

.preview-article p {
  overflow: hidden;
  max-height: 250px;
}
.preview-article h4 {
  text-align: center;
  color: var(--blue);
  font-weight: 100;
}
.preview-article span {
  position: absolute;
  width: 100%;
  height: 40px;
  background: linear-gradient(rgba(255, 255, 255, 0), var(--white));
  bottom: 20px;
  left: 0;
}
.preview-article button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
}
/* Selected articles */
.back-symbol {
  position: relative;
  left: 10px;
  top: 10px;
  text-decoration: none;
  color: var(--blue);
}
/* form */
form.contact-form {
  position: relative;
  width: calc(100% - 20px);
  max-width: 1400px;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 4px 8px 0 var(--black40);
  display: flex;
  flex-direction: column;

  align-items: center;
  gap: 20px;
  padding: 40px 10px;
}

form.contact-form div.input-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

form.contact-form label {
  font-size: 1.25rem;
  width: 100%;
  max-width: 400px;
  text-align: left;
}

form.contact-form input,
form.contact-form select,
form.contact-form input:active,
form.contact-form input:focus {
  width: 100%;
  max-width: 400px;
  height: 40px;
  border-radius: none;
  border: 1px solid var(--black);
  padding: 0 10px;
  font-size: 1rem;
}

form.contact-form textarea {
  width: 100%;
  height: 400px;
  resize: none;
  padding: 10px;
  font-size: 1rem;
  overflow-y: scroll;
}
/* Overlay */
.overlay img {
  max-height: 30svh;
}
@media screen and (min-width: 700px) {
  .overlay img {
    max-height: none;
  }
}

.overlay {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--black75);
  align-content: center;
}

/* Screen size 700px */
@media screen and (min-width: 700px) {
  p {
    font-size: 20px;
  }
  .loose-heading {
    margin-top: 20px;
    margin-bottom: 10px;
  }
  section.hero div.button-container {
    flex-direction: row;
    gap: 200px;
  }
  /* news */
  section.news article {
    padding: 50px 60px;
  }
  section.news i:nth-child(5) {
    color: var(--navy);
  }
  /*partners */
  img.partner {
    width: 200px;
  }
  /* Articles */
  .selected-article h3 {
    text-align: start;
  }
}
@media screen and (min-width: 1270px) {
  /* Services */
  section.services {
    display: grid;
    grid-template-columns: repeat(3, minmax(min-content, 400px));
  }
  div.service {
    height: 320px;
  }
  /* Articles */
  .about-article:nth-child(odd),
  .preview-article:nth-child(odd) {
    flex-direction: row;
  }
  .about-article:nth-child(even),
  .preview-article:nth-child(even) {
    flex-direction: row-reverse;
  }
  .about-article,
  .preview-article,
  .selected-article {
    margin: 20px auto;
  }
  .about-article {
    min-height: 450px;
  }
  .preview-article {
    height: 450px;
  }
  .about-article img,
  .preview-article img {
    display: block;
    height: 450px;
    flex: 1;
    max-width: 50%;
  }
  .about-article h3,
  .preview-article h3,
  .preview-article h4 {
    text-align: start;
  }
  .about-article .text-container,
  .preview-article .text-container {
    width: 50%;
    padding: 20px 60px;
    height: 100%;
  }
  .preview-article p {
    max-height: 330px;
  }
  .preview-article span {
    width: 50%;
  }
  .preview-article:nth-child(odd) span {
    left: 50%;
  }
  /* Selected articles */
  .back-symbol {
    left: calc(50% - 625px);
  }
}
