@import "variables.css";

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
  -webkit-transition: color 0.4s;
  transition: color 0.4s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

body {
  font-family: "Poppins";
}

header nav, footer {
  box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,
    rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
}

section {
  scroll-margin: 4rem;
}

.hero-section {
  position: relative;
  height: 100vh;
  background-image: url(../img/index/hero-banner.jpg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: rgba(0, 0, 0, 0.5);
  background-blend-mode: overlay;
}

.hero-section .content {
  height: 800px;
}

.w-fit-content {
  width: fit-content;
}

.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background-color: var(--secondary) !important;
  border-color: var(--secondary) !important;
}

.text-primary {
  color: var(--primary) !important;
}

.articles-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-block: 32px;
  gap: 16px;
}

.articles-container .card {
  border: 0;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,
    rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  transition: 0.4s;
}

.articles-container .card:hover {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

.articles-container .card img {
  object-fit: cover !important;
}

.articles-container .card .card-title {
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.articles-container .card .date {
  font-size: 13px;
  margin-bottom: 8px;
  color: #aaa;
  display: flex;
  flex-direction: column;
}

.articles-container .card .card-text {
  height: 75px;
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-details-container {
  font-size: 18px;
}

.article-details-container .content {
  padding-top: 24px;
}

.article-details-container .date {
  font-size: 13px;
  margin-bottom: 8px;
  color: #aaa;
}

.article-details-container img {
  object-fit: cover;
  border-radius: 8px;
}

.article-details-container .img-container {
  position: relative;
  border-radius: 8px;
}

.article-details-container .img-container::before {
  position: absolute;
  content: "";
  border-radius: 8px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.latest-article-card {
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,
    rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
  transition: 0.4s;
  padding: 8px;
}

.latest-article-card:hover {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

.latest-article-card img {
  border-radius: 8px;
  object-fit: cover;
}

.latest-article-card .img-container {
  position: relative;
  border-radius: 8px;
  display: flex;
  align-items: center;
  height: 100%;
}

.latest-article-card .img-container::before {
  position: absolute;
  content: "";
  border-radius: 8px;
  top: 50%;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: rgba(0, 0, 0, 0.4);
  transform: translateY(-50%);
}

.latest-article-card .content {
  padding: 12px;
}

.latest-article-card .content h3 {
  font-size: 20px;
}

.latest-article-card .content h3 a {
  color: #149ddd;
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: 0.4s;
}

.latest-article-card .content h3 a:hover {
  color: #094868;
}

.latest-article-card .content .date {
  font-size: 13px;
  margin-bottom: 8px;
  color: #aaa;
}

.latest-article-card .content p {
  height: 42px;
  font-size: 14px;
  text-overflow: ellipsis;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.latest-article-card .content .read-more {
  color: #149ddd;
  border-radius: 8px;
  border: 1px solid #149ddd;
  transition: 0.4s;
  padding: 8px;
}

.latest-article-card .content .read-more:hover {
  color: #094868;
  border-color: #094868;
}

.cursor-pointer {
  cursor: pointer;
}

#like .filled-like {
  display: none;
}

#like.liked .filled-like {
  display: inline;
}

#like.liked .empty-like {
  display: none;
}

footer {
  padding-block: 16px;
  background-color: #f6f6f6;
}

@media only screen and (max-width: 1400px) {
  .articles-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .articles-container .card {
    width: calc(95% / 3);
  }
}

@media only screen and (max-width: 992px) {
  .articles-container .card {
    width: calc(95% / 2);
  }

  .hero-section .content {
    height: 500px;
  }
}

@media only screen and (max-width: 575px) {
  .articles-container .card {
    width: 100%;
  }
}
