:root {
    --main-dark: #121212;
    --main-blue: #007bff;
    --main-grey-light: #9f9f9f;
    --main-blue-dark: #0067f4;
    --main-grey: #6c6c6c;
    --main-red: #dc3545;
    --main-light-grey: #f4f6f7;
    --main-dark-blue: #2b354f;
    --main-cyan: #17a2b8;
    --main-white: #ffffff;
    --main-light-blue: #3a6fb0;
    --main-black: #000000;
    --main-green: #28a745;
    --bg-transparent: rgba(0, 0, 0, 0);
}

body {
  background: #fafbfc;
}

/* baru */
.article-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

article {
  --img-scale: 1.001;
  --title-color: black;
  --link-icon-translate: -20px;
  --link-icon-opacity: 0;
  position: relative;
  border-radius: 16px;
  background: #fff;
  transform-origin: center;
  transition: all 0.4s ease-in-out;
  overflow: hidden;
  box-shadow: none;
  border: none;
  height: 100%;
}

article a::after {
  position: absolute;
  inset-block: 0;
  inset-inline: 0;
  cursor: pointer;
  content: "";
}

article:hover {
  --img-scale: 1.1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

article h2 {
  margin: 0 0 18px 0;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--title-color);
  transition: color 0.3s ease-out;
}

figure {
  margin: 0;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

article img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transform: scale(var(--img-scale));
  transition: transform 0.4s ease-in-out;
}

.article-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

article a {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* article a:focus {
  outline: 1px dotted #28666e;
}

article a .icon {
  min-width: 24px;
  width: 24px;
  height: 24px;
  margin-left: 5px;
  transform: translateX(var(--link-icon-translate));
  opacity: var(--link-icon-opacity);
  transition: all 0.3s;
}

article:has(:hover, :focus) {
  --img-scale: 1.1;
  --link-icon-translate: 0;
  --link-icon-opacity: 1;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
} */

.articles {
  display: grid;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* End */
/* Content */
.hero-section {
  background-color: #f8f9fa;
}

.hero-section img {
  object-fit: cover;
  height: 400px;
  width: 100%;
}

.hero-section .card {
  height: 400px;
  width: 100%;
}

.article-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(0, 0, 0, 0) 100%);
  color: white;
}

.article-category {
  display: inline-block;
  background-color: #166a9b;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.article-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 0.9rem;
  font-weight: 400;
}

.list-category-blog {
  display: inline-block;
  background: var(--main-light-grey);
  color: var(--main-dark-blue);
  border: 0.5px solid var(--main-dark);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 10px;
  width: fit-content;
}

.list-category-blog.active {
    display: inline-block;
    background: var(--main-light-blue);
    color: var(--main-white);
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    width: fit-content;
}

.category-blog {
    display: inline-block;
    background: var(--main-light-blue);
    color: var(--main-white);
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    width: fit-content;
}

.title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}

.meta {
  font-size: 14px;
  color: #666;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eee;
  font-size: 14px;
}

.meta span+span {
  margin-left: 12px;
}

.card {
  border-radius: 12px;
}

.rounded-card img {
  border-radius: 0;
}

.rounded-card {
  border-radius: 10px;
  overflow: hidden;
}

.pagination {
  display: flex;
  list-style-type: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.pagination li {
  margin: 0 5px;
  font-weight: 600;
}

.pagination a {
  text-decoration: none;
  color: #333;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.pagination .active a {
  background-color: #166a9b;
  color: white;
}

.pagination .disabled a {
  color: #cccccc;
  font-weight: 600;
}

.pagination .ellipsis {
  color: #333;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.Category {
  display: inline-block;
  padding: 4px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: center;
  color: #666;
}

.Category.active {
  background-color: #333;
  color: white;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px 15px;
  background-color: white;
}

.search-box input {
  border: none;
  outline: none;
  padding: 5px;
  font-size: 14px;
  width: 150px;
}

.search-icon {
  color: #777e90;
  margin-right: 5px;
}

/* End */

/* Responsive */

/* Styling khusus untuk tablet (maksimum lebar layar 1024px) */
@media (max-width: 1024px) {
  .category-list .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .search-box {
    width: 100% !important;
  }
}

@media screen and (max-width: 768px) {
    .articles {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-inline: 16px;
  }
}
@media screen and (max-width: 960px) {
  article {
    container: card/inline-size;
  }

  .article-body p {
    display: none;
  }
}

@container card (min-width: 380px) {
  .article-wrapper {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }

  .article-body {
    padding-left: 0;
  }

  figure {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  figure img {
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
  }
}
