/* ================= PAGE LAYOUT ================= */

body {
  font-family: "Outfit", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  background: #f4f6fb;
  margin: 0;
  padding: 0;
}

.main-content {
  padding: 30px;
}

/* ================= KULIAH BANNER ================= */

.kuliah-banner-section {
  width: 100%;
  height: 70vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(41, 110, 86, 0.95),
    rgba(22, 60, 48, 0.95)
  );
}

.kuliah-banner-section::before,
.kuliah-banner-section::after {
  content: "";
  position: absolute;
  width: 550px;
  height: 550px;
  background: url("img/islamic-pattern2.png") center/contain no-repeat;
  opacity: 0.06;
  animation: kuliahRotate 60s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.kuliah-banner-section::before {
  top: -200px;
  left: -200px;
}

.kuliah-banner-section::after {
  bottom: -200px;
  right: -200px;
  animation-direction: reverse;
}

@keyframes kuliahRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.kuliah-banner-content {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 5;
}

.kuliah-banner-title {
  font-size: clamp(32px, 5vw, 60px);
  font-family: "Playfair Display", serif;
  margin-bottom: 15px;
  font-weight: 600;
}

.kuliah-banner-subtext {
  font-size: clamp(16px, 2vw, 22px);
  margin-bottom: 20px;
  color: #c9c9c9;
}

/* ================= MOBILE OPTIMIZATION ================= */

@media (max-width: 768px) {
  .main-content {
    padding: 20px;
  }

  .kuliah-banner-section {
    height: 60vh;
    padding: 20px;
  }

  .kuliah-banner-section::before,
  .kuliah-banner-section::after {
    width: 300px;
    height: 300px;
    opacity: 0.04;
  }

  .kuliah-banner-section::before {
    top: -120px;
    left: -120px;
  }

  .kuliah-banner-section::after {
    bottom: -120px;
    right: -120px;
  }

  .kuliah-banner-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
  }

  .kuliah-banner-subtext {
    font-size: 15px;
    line-height: 1.6;
    padding: 0 10px;
  }
}

/* ================= FILTERS ================= */

.filter-bar {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  min-width: 200px;
  font-size: 15px;
}

/* ================= LECTURE GRID ================= */

.lectures-wrapper {
  width: min(1400px, 92%);
  margin: 40px auto 100px auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 320px));
  gap: 35px 28px;
  justify-content: center;
  align-items: start;
}

/* ================= CARD ================= */

.lecture-card {
  position: relative;

  background: white;
  border-radius: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: 0.3s ease;

  display: flex;
  flex-direction: column;
  height: 100%;
}

.lecture-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.15);
}

/* ================= FADE IN ================= */

.fade-in {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.9s ease;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= POSTER IMAGE ================= */

.lecture-poster {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  transition: 0.3s ease;
}

.lecture-card:hover .lecture-poster {
  transform: scale(1.04);
}

.no-poster {
  background: #ecf0f1;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #757575;
  font-size: 14px;
}

/* ================= LECTURE CONTENT ================= */

.lecture-content {
  padding: 18px 18px 20px;

  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.lecture-topic {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: bold;
  color: #333;

  line-height: 1.4;

  min-height: 54px;
}

.lecture-content p {
  margin: 4px 0;
  font-size: 15px;
  color: #555;
}

.past {
  opacity: 0.5;
}

.empty-message {
  font-size: 18px;
  text-align: center;
  width: 100%;
  margin-top: 20px;
}

.lecture-card.today {
  border: 2px solid #e6f2ff;
  background-color: #e6f2ff;
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #ffffff;
  margin: auto;
  padding: 20px 25px;
  border-radius: 20px;
  width: 70%;
  max-width: 600px;
  text-align: left;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  font-family: "Outfit", sans-serif;
}

/* ================= POSTER STYLING ================= */

.modal-poster {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 60vh;
  display: block;
  margin: 0 auto 15px auto;
  border-radius: 20px;
  border: 1px solid #ccc;
  object-fit: contain;
}

.modal-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

/* ================= MOBILE OPTIMIZATION ================= */

.modal-content p {
  margin: 6px 0;
  font-size: 15px;
  color: #333;
}

.modal-content p strong {
  color: #0077cc;
  font-weight: 500;
}

/* ================= BIODATE SECTION ================= */

#modalBiodata {
  background-color: #f0f8ff;
  padding: 12px 15px;
  border-radius: 20px;
  border: 1px solid #b3d4fc;
  line-height: 1.6;
  margin-top: 12px;
  font-size: 14px;
  white-space: pre-wrap;
  color: #111;
}

.lecture-topic,
#modalUstaz {
  text-transform: capitalize;
}

#modalTopic {
  text-transform: capitalize;
}

h3 {
  margin-top: 15px;
  margin-bottom: 6px;
  color: #0077cc;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px dashed #eee;
  padding-bottom: 4px;
}

/* ================= NEW LECTURE BADGE ================= */

.new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #ff6b6b;
  color: white;
  font-size: 13px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.8);
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  0% {
    box-shadow:
      0 0 5px rgba(255, 107, 107, 0.6),
      0 0 10px rgba(255, 107, 107, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 12px rgba(255, 107, 107, 1),
      0 0 20px rgba(255, 107, 107, 0.7);
    transform: scale(1.05);
  }
  100% {
    box-shadow:
      0 0 8px rgba(255, 107, 107, 0.8),
      0 0 15px rgba(255, 107, 107, 0.5);
    transform: scale(1);
  }
}

/* ================= ANIMATION ================= */

.new-badge.animate {
  animation: slideFadeIn 0.8s forwards;
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.lecture-card {
  position: relative;
}

/* ================= MOBILE OPTIMIZATION ================= */

@media (max-width: 768px) {
  .main-content {
    padding: 20px 15px;
  }

  .filter-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
    min-width: unset;
    font-size: 14px;
  }

  .lectures-wrapper {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0 15px;
  }

  .lecture-card {
    border-radius: 20px;
  }

  .lecture-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .lecture-poster {
    max-height: 280px;
  }

  .no-poster {
    height: 280px;
    font-size: 13px;
  }

  .lecture-content {
    padding: 14px;
  }

  .lecture-topic {
    font-size: 17px;
  }

  .lecture-content p {
    font-size: 14px;
  }

  .new-badge {
    font-size: 11px;
    padding: 3px 6px;
  }

  .modal-content {
    width: 92%;
    padding: 18px;
  }

  .modal-content h2 {
    font-size: 18px;
  }

  .modal-content p {
    font-size: 14px;
  }

  .modal-poster {
    max-height: 45vh;
  }

  #modalBiodata {
    font-size: 13px;
  }
}
