@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.article {
  padding-bottom: 40px;
  color: #122348;
  text-align: justify;
  background: url(/res/img/backgrounds/bg9.png) no-repeat center center / cover;
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  margin-top: -25px;
}

.container {
  padding-left: 10%;
  padding-right: 10%;
  background-color: #f2f2f2b9;
  background-clip: content-box;
}

.news-container {
  padding-left: 5%;
  padding-right: 5%;
}

#article-title {
  font-size: 2.5rem;
  text-align: left;
  animation: fadeIn 1s ease-in forwards 0.5s;
  padding-left: 5%;
  padding-right: 5%;
  padding-top: 3%;
  line-height: 120%;
}

#article-date {
  font-size: 1.3rem;
  margin-bottom: 20px;
  animation: fadeIn 1s ease-in forwards 0.5s;
  padding-left: 5%;
  padding-right: 5%;
}

.content {
  display: block;
  justify-content: center;
  width: 100%;
  animation: fadeIn 1s ease-in forwards 0.5s;
  text-align: center;
  padding-bottom: 3%;
}

.media-container {
  max-width: 900px;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: auto;
  background: #97979770;
  overflow: hidden;
  position: relative;
}

.carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-slides {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slides img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: none;
  cursor: zoom-in;
}

.carousel-slides img {
  transition: opacity 0.3s ease;
}

.carousel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 100;
  width: 30px;
  font-size: 1.3rem;
  animation: fadeIn 1s ease-in forwards 0.5s;
}

.prevButton {
  left: 0;
}

.nextButton {
  right: 0;
}

#article-content {
  margin-top: 20px;
  font-size: 1.2rem;
  padding-left: 5%;
  padding-right: 5%;
  animation: fadeIn 1s ease-in forwards 0.5s;
  text-align: justify;
}

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.image-modal img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
}

/* ================= VIDEO HANDLING ================= */

.video-container {
  max-width: 720px;
  margin: 30px auto;
  display: flex;
  justify-content: center;
}

.video-container video {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  background: #000;
  border-radius: 4px;
}

.video-container video[video-orientation="portrait"] {
  max-width: 420px;
}

/*__________NEWS_________*/

#news {
  padding: 0;
  min-height: 70vh;
}

.news-media {
  position: relative;
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 220px;
}

#news h2 {
  padding-left: 5%;
  padding-top: 20px;
  font-size: 2rem;
  font-family: 'Titillium Web', sans-serif;
  color: #122348;
  text-align: left;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
  margin-left: 50px;
}

.news-list .news-item .news-media {
  height: 150px;
  width: 280px;
  background-color: white;
}

.news-item:hover {
  transform: translateY(-7px);
}

.news-content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  line-height: 20px;
}

.news-content-overlay span {
  font-size: 0.8rem;
}

#news .news-content-overlay {
  position: absolute;
  top: 150px;
  display: flex;
  flex-direction: column;
  justify-content: left;
  text-align: justify;
  background: #122348;
  padding: 20px;
  width: 280px;
  height: 230px;
}

.news-content-overlay h3,
.news-content-overlay p,
.news-content-overlay span {
  margin: 5px 0;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  color: white;
}

@media screen and (min-width: 1650px) {

  /*__________NEWS_________*/
  #news {
    padding: 0;
    min-height: 50vh;
  }

  #news h2 {
    font-size: 2rem;
    text-align: left;
    margin: 0;
  }

  .news-list .news-item .news-media {
    width: 350px;
  }

  #news .news-content-overlay {
    width: 350px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }
}


@media screen and (max-width: 1300px) {
  .article {
    margin-top: -25px;
  }

  #article-title {
    padding-top: 10px;
    font-size: 2rem;
    line-height: 2.3rem;
  }

  /*__________NEWS_________*/
  #news {
    padding: 0;
    min-height: 150vh;
  }

  #news h2 {
    font-size: 2rem;
    text-align: left;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(2, 320px);
    justify-content: center;
    margin: 0;
    gap: 110px;
    grid-auto-rows: minmax(270px, auto);
  }

  .news-list .news-item .news-media {
    width: 380px;
  }

  #news .news-content-overlay {
    width: 380px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }
}

@media screen and (max-width: 1024px) {
  .article {
    margin-top: -25px;
  }

  #article-title {
    padding-top: 40px;
    font-size: 2rem;
    line-height: 2.3rem;
  }

  #article-date {
    font-size: 0.6rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in forwards 0.5s;
  }

  /*__________NEWS_________*/
  #news {
    padding: 0;
    min-height: 280vh;
  }

  #news h2 {
    font-size: 2rem;
    text-align: left;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(1, 380px);
    justify-content: center;
    margin: 0;
    gap: 180px;
    grid-auto-rows: minmax(200px, auto);
  }

  .news-list .news-item .news-media {
    width: 380px;
  }

  #news .news-content-overlay {
    width: 380px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }
}

@media screen and (max-width: 768px) {
  .article {
    margin-top: -25px;
  }

  #article-title {
    padding-top: 30px;
    font-size: 2rem;
    line-height: 2.3rem;
  }

  #article-date {
    font-size: 0.6rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in forwards 0.5s;
  }

  /*__________NEWS_________*/
  #news {
    padding: 0;
    min-height: 280vh;
  }

  #news h2 {
    font-size: 2rem;
    text-align: left;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(1, 380px);
    justify-content: center;
    margin: 0;
    gap: 180px;
  }

  .news-list .news-item .news-media {
    width: 380px;
  }

  #news .news-content-overlay {
    width: 380px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }
}

@media screen and (max-width: 480px) {
  .article {
    margin-top: -25px;
  }

  #article-title {
    padding-top: 30px;
    font-size: 1.5rem;
    line-height: 2.3rem;
  }

  #article-date {
    font-size: 0.6rem;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in forwards 0.5s;
  }

  /*__________NEWS_________*/
  #news {
    padding: 0;
    min-height: 280vh;
  }

  #news h2 {
    font-size: 2rem;
    text-align: left;
    margin: 0;
  }

  .news-list {
    display: grid;
    grid-template-columns: repeat(1, 300px);
    justify-content: center;
    margin: 0;
    gap: 180px;
  }

  .news-list .news-item .news-media {
    width: 300px;

  }

  #news .news-content-overlay {
    width: 300px;
  }

  .news-list>* {
    width: 280px;
    height: 200px;
    display: flex;
    justify-content: center;
    margin: auto;
  }

  .head {
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .news-content {
    margin-top: -50px;
  }
}


@media (max-width: 768px) {
  .media-container {
    max-width: 100%;
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 480px) {
  .media-container {
    aspect-ratio: 1 / 1;
  }
}

#article-content ul,
#article-content ol {
  padding-left: 2em;
  margin-top: 0;
  margin-bottom: 0;
}

#article-content li {
  margin-bottom: 0;
  line-height: 1.6;
}

#article-content li > br {
  display: none;
}

#article-content ul > br,
#article-content ol > br {
  display: none;
}
