/* ==========================
   FONTS
   ========================== */

@font-face {
    font-family: "Bungee";
    src: url("../resources/fonts/Bungee-Regular.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.font-bungee {
  font-family: 'Bungee' !important;
}

/* ==========================
   GENERAL
   ========================== */

html {
  scroll-behavior: smooth;
}

body {
  background-image: url(../resources/bg_space.png);
  background-repeat: repeat;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
}


/* ==========================
   NAVBAR
   ========================== */

.navbar {
  background-color: rgba(152, 184, 234, 1);
}

.nav-link {
  color: white !important;
  font-size: clamp(20px, 2.2vw, 32px);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-link:hover {
  color: black !important;
}


/* ==========================
   JUMBOTRON / HERO SECTIONS
   ========================== */

.shaded {
  background-color: rgba(0, 0, 0, 0.5);
}

.shaded-jumbotron {
  margin-bottom: 0;
  min-height: calc(100vh - 55px);
  height: auto;
}

.shaded-jumbotron p {
  padding: 0 10%;
}

.shaded-jumbotron h1 {
  margin-top: 22vh;
}

.shaded-mumbotron {
  margin-bottom: 0;
  min-height: 100vh;
  height: auto;
  color: white;
}

.shaded-mumbotron h5 {
  font-family: 'Bungee';
}


/* ==========================
   BUTTONS
   ========================== */

.button {
  background-color: #98B8EA;
  border-color: #98B8EA;
  color: white;
  font-family: 'Bungee';
  transition: background-color 0.3s, color 0.3s;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.button:hover {
  background-color: #98B8EA;
  border-color: #98B8EA;
  color: black;
}


/* ==========================
   NEWS ROWS
   ========================== */

/* Bootstrap already makes .row a flex container. */
.news-row {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  align-items: stretch;
}

.news-row.top-row,
.news-row.middle-row {
  justify-content: center;
}

.news-row > [class*="col-"] {
  display: flex;
  min-width: 0;
}


/* ==========================
   CARDS
   ========================== */

.card {
  border: 0;
  border-radius: 5px;
  transition: background-color 0.2s;
  width: 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card:hover {
  background-color: rgb(150, 150, 150);
  opacity: 1;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: clamp(12px, 2vw, 24px);
}

.card-body .button {
  margin-top: auto;
  align-self: flex-start;
}

.card img {
  display: block;
  width: 100%;
  height: clamp(160px, 24vw, 270px);
  object-fit: cover;
  object-position: top center;
  border-radius: inherit;
}

.card-title {
  font-family: 'Bungee';
  font-size: clamp(1.1rem, 1.6vw, 1.5rem);
  overflow-wrap: anywhere;
}

.card-text {
  overflow-wrap: anywhere;
}


/* ==========================
   SPACING
   ========================== */

.spacer {
  height: 25px;
}

.spacer.big {
  height: 50px;
}


/* ==========================
   HORIZONTAL SCROLL ROWS
   ========================== */

.row-horizontal {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}


/* ==========================
   TABLETS
   768px - 991px
   ========================== */

@media (min-width: 768px) and (max-width: 991.98px) {

  .card img {
    height: 200px;
  }

  .card-body {
    padding: 14px;
  }

  .card-title {
    font-size: 1.15rem;
  }

  .spacer.big {
    height: 35px;
  }

  .shaded-jumbotron p {
    padding-left: 8%;
    padding-right: 8%;
  }

  .shaded-jumbotron h1 {
    margin-top: 15vh;
  }
}


/* ==========================
   PHONES
   Below 768px
   ========================== */

@media (max-width: 767.98px) {

  /* Page spacing */

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .spacer.big {
    height: 25px;
  }

  /* Navigation */

  .nav-link {
    font-size: 24px;
  }

  /* Hero sections */

  .shaded-jumbotron {
    min-height: calc(100svh - 55px);
  }

  .shaded-jumbotron h1 {
    margin-top: 12vh;
  }

  .shaded-jumbotron p {
    padding: 0 5%;
  }

  .shaded-mumbotron {
    min-height: 100svh;
  }

  /* Cards */

  .news-row > [class*="col-"] {
    margin-bottom: 20px;
  }

  .card img {
    height: clamp(180px, 55vw, 300px);
  }

  .card-body {
    padding: 18px;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-text {
    font-size: 1rem;
  }

  /* Main headings */

  .display-4 {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  /* Buttons */

  .button {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}


/* ==========================
   SMALL PHONES
   Below 400px
   ========================== */

@media (max-width: 399.98px) {

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .nav-link {
    font-size: 20px;
  }

  .card img {
    height: 180px;
  }

  .card-body {
    padding: 14px;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-text {
    font-size: 0.95rem;
  }

  .spacer.big {
    height: 18px;
  }

  .shaded-jumbotron h1 {
    margin-top: 8vh;
  }
}


/* ==========================
   REDUCED MOTION
   ========================== */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}