/* Variables for easy access color scheme */
:root {
  --bg-color: #899878;
  --txt-color: #121113;
  --title-bg-color: #e4e6c3;
  --box-bg-color: #f7f7f2;
  --nav-underline-color: #57d6a3;
}

/* Custom font for site-name */
@font-face {
  font-family: Seagram;
  src: url(./Seagram.ttf);
}

html {
  background: var(--bg-color);
  color: var(--txt-color);
  font-family: Arial, Helvetica, sans-serif;
}

a,
a:visited {
  text-decoration: none;
  color: var(--txt-color);
}

/* Content box properties */
header,
.big-news,
.small-news-card,
.footer {
  background-color: var(--box-bg-color);
  border-radius: 10px;
  padding: 10px;
  /* Polaroid(?) boxshadow */
  -webkit-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

header,
.footer {
  margin: 20px 20px;
  text-align: center;
}

.logo {
  max-block-size: 10vw;
  margin: 0 10px 0 10px;
  object-fit: cover;
}

.site-name {
  font-family: Seagram;
  font-size: 5vw;
  margin: 0 3vw 0 3vw;
  white-space: nowrap;
}

ul {
  padding-inline-start: 0px;
}

.navigation ul li {
  list-style: none;
  display: inline-block;
  padding: 8px 12px;
  position: relative;
}

/* Underline animation for navigation links */
.navigation ul li::after {
  content: "";
  width: 0%;
  height: 5px;
  background: var(--nav-underline-color);
  display: block;
  margin: auto;
  transition: 0.5s;
}

.navigation ul li:hover::after {
  width: 100%;
}

.big-news {
  display: flex;
  flex-direction: column;
  margin: 10px 20px;
  max-height: 600px;
}

.big-news-picture {
  margin: 0 auto;
  object-fit: contain;
  width: 100%;
  max-height: 400px;
}

.big-news-text-block {
  text-align: center;
  margin: 20px;
}

.big-news-title,
.small-news-title,
.read-more {
  background-color: var(--title-bg-color);
  display: block;
  padding: 10px;
  border-radius: 10px;
}

.small-news {
  display: grid;
  justify-items: center;
}

.small-news-card {
  margin: 10px 20px;
  display: flex;
  flex-direction: column;
  max-width: 200px;
  text-align: center;
}

.small-news-card:hover {
  transform: scale(1.05);
}

.small-news-picture {
  display: block;
  margin: 0 auto;
  object-fit: contain;
  width: 100%;
  height: 200px;
}

footer {
  font-size: 0.7rem;
}

.technigo-logo {
  max-width: 50px;
}

/* Hides navigation links for mobile */
@media (max-width: 767px) {
  #navigation-id {
    display: none;
  }
  /* Big news text goes one line, hides the rest with ellipsis*/
  .big-news-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Tablet+> boxtexts becomes rows, grid 2 columns */
@media (min-width: 768px) {
  header {
    flex-direction: row;
    text-align: center;
  }
  .big-news {
    flex-direction: row;
  }
  .big-news-text-block {
    text-align: left;
  }
  .read-more {
    display: none;
  }
  .small-news {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop goes 4 grid columns*/
@media (min-width: 992px) {
  .small-news {
    grid-template-columns: repeat(4, 1fr);
  }
  nav {
    display: flex;
    align-items: center;
  }
}
