/* ================= ROOT ================= */
:root {
  --color-white: #ffffff;
  --color-black: #000000;
  --color-yellow-light: #f3d64e;
  --color-yellow-dark: #fcb50f;
  --color-blue-dark: #5182cd;
  --color-blue-light: #54c4fc;
  --color-blue-pale: #88d8ff;
}

/* ================= GENERAL ================= */
.beasiswa-lomba {
  color: var(--color-black);
}

/* ================= HEADER ================= */
.beasiswa-lomba .beasiswa-lomba-header {
  background-color: var(--color-black);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../images/abstract-coloured-background-with-variety-transparent-raindrops.jpeg");
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  text-align: center;
  padding: 100px 10px;
}

.beasiswa-lomba .beasiswa-lomba-header h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--color-yellow-light);
}

/* ================= SECTION TITLE ================= */
.title-beasiswa h2,
.title-lomba h2 {
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--color-blue-dark);
  border-bottom: 3px solid var(--color-yellow-light);
  width: fit-content;
  margin: auto;
  margin-top: 10px;
}

/* ================= CONTAINER ================= */
.container-beasiswa,
.container-lomba {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  margin: 1rem auto;
  width: 85%;
}

/* ================= CARD ================= */
.box-beasiswa,
.box-lomba {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  width: 45%;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  border-top: 4px solid transparent;
  background-image: linear-gradient(white, white),
    linear-gradient(to right, var(--color-blue-light), var(--color-blue-dark));
  background-origin: border-box;
  background-clip: padding-box, border-box;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.box-beasiswa:hover,
.box-lomba:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ================= DATE BADGE ================= */
.date-box {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.date-box span {
  font-size: 11px;
  border-radius: 50px;
  padding: 3px 10px;
  font-weight: 500;
}

.date-box #open {
  background: #e8f5e9;
  color: #2e7d32;
}

.date-box #close {
  background: #fff3e0;
  color: #e65100;
}

/* ================= TITLE ================= */
.title-box {
  font-weight: 700;
  font-size: 1.4rem;
  margin: 10px 0;
  color: #2b2b2b;
}

/* ================= DESCRIPTION ================= */
.description-beasiswa,
.description-lomba {
  font-size: 0.9rem;
  color: #555;
  margin: 8px 0 14px;
  line-height: 1.6;
  text-align: justify;
}

/* ================= DATE SECTION ================= */
.date-section {
  display: flex;
  justify-content: space-between;
  background: linear-gradient(
    to right,
    rgba(84, 196, 252, 0.1),
    rgba(81, 130, 205, 0.1)
  );
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.date-status {
  display: flex;
  flex-direction: column;
}

.date-status #title {
  font-size: 9px;
  font-weight: 600;
  color: #5b8fb9;
}

.date-status #date {
  font-weight: 500;
}

.date-status:last-child {
  border-left: 1px solid #c2deff;
  padding-left: 20px;
}

/* ================= BUTTON ================= */
.link,
.box-link-lomba {
  margin-top: auto;
  text-align: center;
  background: #4caef5;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s ease;
  font-weight: 600;
}

.box-link-lomba {
  display: block;
  text-decoration: none;
  color: var(--color-white);
}

.link .box-link {
  text-decoration: none;
  color: var(--color-white);
}

.link:hover,
.box-link-lomba:hover {
  background: #2b9ee8;
  transform: scale(1.03);
}

/* ================= EMPTY STATE ================= */
.not-found {
  display: flex;
  flex-direction: column;
  background: #f3f3f3;
  border-radius: 20px;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

/* ================= IMAGE CARD ================= */
.img-card-wrapper {
  /* Wrapper dengan tinggi fix — gambar di dalamnya tidak akan terpotong */
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: #f8f9fb;          /* background netral jika gambar tidak kotak */
  border-radius: 10px;
  overflow: hidden;
}

.img-card {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;          /* TIDAK memotong — gambar muat penuh di dalam wrapper */
  border-radius: 8px;
  transition: transform 0.3s ease;
}



/* ================= TABLET ================= */
@media (max-width: 1024px) {
  .container-beasiswa,
  .container-lomba {
    width: 95%;
  }

  .box-beasiswa,
  .box-lomba {
    width: 100%;
    padding: 1.3rem;
  }
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .beasiswa-lomba-header h1 {
    font-size: 2rem;
  }

  .title-box {
    font-size: 1.2rem;
  }

  .description-beasiswa,
  .description-lomba {
    font-size: 0.85rem;
  }

  .date-section {
    flex-direction: column;
    gap: 10px;
  }

  .date-status:last-child {
    border-left: none;
    padding-left: 0;
  }

  .date-status:first-child {
    border-bottom: 1px solid #c2deff;
    padding-bottom: 8px;
  }

  .img-card-wrapper {
    height: 110px;
  }
}

/* ================= SMALL MOBILE ================= */
@media (max-width: 480px) {
  .box-beasiswa,
  .box-lomba {
    padding: 1rem;
  }

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

  .box-link-lomba,
  .link {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .img-card-wrapper {
    height: 90px;
  }
}

/* ================= DATE BOX DI LOMBA ================= */
.box-lomba .date-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;       /* memberi jarak dari gambar */
}

/* Kalau mau lebih aman: pastikan .img-card-wrapper punya margin-bottom */
.box-lomba .img-card-wrapper {
  margin-bottom: 12px;    /* jarak gambar ke date-box */
}