:root {
  --primary: #4371e5;
  --secondary: #ff7d5c;
  --accent: #3df5a7;
  --light: #f9f9fa;
  --dark: #282c34;
  --success: #4cd964;
  --card-radius: 16px;
  --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
  height: 100%;
}

body #heroes {
  height: 100vh;
}

.heroes {
  background-image: url("/bg_op_10.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0;
}

.navbar-toggler {
  color: white;
  border: white 1px solid;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28248, 248, 255, 1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

li.nav-item a.active {
  color: #ffc107 !important;
  border: none;
}

li.garis::after {
  content: "";
  display: flex;
  border-bottom: 0.13rem solid #e0e0e0;
  transform: scaleX(0);
  transition: 0.275s linear;
}

li.garis:hover::after {
  transform: scaleX(0.7);
}

.swiper {
  width: 100%;
  height: 100%;
}

p.intro {
  color: #5a6072;
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.module-card {
  position: relative;
  background: var(--light);
  border-radius: var(--card-radius);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  min-height: 400px;
  width: 275px;
  display: flex;
  flex-direction: column;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(149, 157, 165, 0.15);
  border-color: var(--primary);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-size: 1.2rem;
}

.module-card:nth-child(2) .card-icon {
  background: var(--secondary);
}

.module-card:nth-child(3) .card-icon {
  background: var(--accent);
  color: var(--dark);
}

.module-card:nth-child(4) .card-icon {
  background: #b18cfe;
}

.difficulty {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--light);
  background: var(--dark);
}

.difficulty.beginner {
  background: #4cd964;
}

.difficulty.intermediate {
  background: #ffce3a;
  color: #333;
}

.difficulty.advanced {
  background: #ff3b30;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.card-description {
  font-size: 0.85rem;
  color: #5a6072;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.progress-container {
  margin-top: auto;
  background: #eaedf6;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width 0.5s ease;
  border-radius: 4px;
}

.module-card:nth-child(2) .progress-bar {
  background: var(--secondary);
}

.module-card:nth-child(3) .progress-bar {
  background: var(--accent);
}

.module-card:nth-child(4) .progress-bar {
  background: #b18cfe;
}

.quick-facts {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  padding: 1rem 1.5rem;
  transform: translateY(100%);
  transition: var(--transition);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
}

.module-card:hover .quick-facts {
  transform: translateY(0);
}

.quick-facts h4 {
  font-size: 0.9rem;
  color: var(--dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quick-facts h4 svg {
  width: 16px;
  height: 16px;
}

.fact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.fact-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.module-card:nth-child(2) .fact-icon {
  color: var(--secondary);
}

.module-card:nth-child(3) .fact-icon {
  color: var(--accent);
}

.module-card:nth-child(4) .fact-icon {
  color: #b18cfe;
}

.start-learning {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 1.5rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.start-learning:hover {
  background: #2e5cd5;
  transform: translateY(-2px);
}

.currently-learning {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--success);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 16px;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition);
}

.module-card.active .currently-learning {
  opacity: 1;
  transform: translateY(0);
}

.completion-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
}

.module-card.completed .completion-badge {
  opacity: 1;
  transform: scale(1);
}

.card-time {
  font-size: 0.8rem;
  color: #5a6072;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

#more {
  display: none;
}
#more.show {
  display: block;
}

.pdfobject-container {
  width: 80%;
  height: 800px;
}

/* Foto dan Video */
.card-custom {
  position: relative;
  width: 100%; /* full width agar mengikuti parent */
  max-width: 100%;
  aspect-ratio: 1 / 1; /* menjaga rasio persegi seperti 400x400 */
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  font-family: Arial, sans-serif;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  display: block;
}

/* Efek hover */
.card-custom:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(-4px);
}

/* Gambar utama */
.card-custom img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-custom:hover img {
  transform: scale(1.05);
}

/* Overlay teks */
.overlay-box {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  color: white;
  padding: 20px;
  box-sizing: border-box;
}

.overlay-box h3 {
  font-size: 16px;
  margin: 0 0 8px;
  line-height: 1.3em;
}

.overlay-box p {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon {
  font-size: 28px;
}

/* Ikon panah pojok kanan bawah */
.arrow {
  position: absolute;
  bottom: 15px;
  right: 15px;
  font-size: 22px;
  color: white;
  opacity: 0;
  transform: translate(10px, 10px);
  transition: all 0.3s ease;
}

.card-custom:hover .arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.back-links {
  text-decoration: none;
  display: flex;
  align-items: center;
  color: #212124;
  font-size: 18px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 20px;
}

.df {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.toggle-view {
  position: absolute;
  cursor: pointer;
  top: 0;
  padding-right: 3.5rem;
  left: auto;
  z-index: 104;
}

/* End Foto dan Video */

/* Pattern decorations */
.pattern-dots {
  position: absolute;
  width: 80px;
  height: 80px;
  background-image: radial-gradient(var(--primary) 2px, transparent 2px);
  background-size: 10px 10px;
  opacity: 0.1;
  z-index: 0;
  border-radius: 50%;
  transition: var(--transition);
}

.module-card:nth-child(1) .pattern-dots {
  top: -20px;
  right: -20px;
  background-image: radial-gradient(var(--primary) 2px, transparent 2px);
}

.module-card:nth-child(2) .pattern-dots {
  bottom: -20px;
  left: -20px;
  background-image: radial-gradient(var(--secondary) 2px, transparent 2px);
}

.module-card:nth-child(3) .pattern-dots {
  top: -20px;
  left: 40%;
  background-image: radial-gradient(var(--accent) 2px, transparent 2px);
}

.module-card:nth-child(4) .pattern-dots {
  bottom: 30px;
  right: -20px;
  background-image: radial-gradient(#b18cfe 2px, transparent 2px);
}

.module-card:hover .pattern-dots {
  opacity: 0.2;
  transform: scale(1.2);
}

/* Wave animation */
.wave-animation {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary),
    var(--accent),
    var(--primary)
  );
  background-size: 300% 100%;
  border-bottom-left-radius: var(--card-radius);
  border-bottom-right-radius: var(--card-radius);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: waveMove 6s linear infinite;
}

@keyframes waveMove {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 300% 0;
  }
}

.module-card:hover .wave-animation {
  opacity: 1;
}

/* Pulse animation for active module */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(67, 113, 229, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(67, 113, 229, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(67, 113, 229, 0);
  }
}

.module-card.active {
  animation: pulse 2s infinite;
}

.kontaks {
  min-height: 660px;
}
.besar {
  transition: transform 0.3s ease;
  padding-right: 2px;
  padding-left: 2px;
  border-radius: 10px;
}
.besar:hover {
  transform: scale(1.2);
  cursor: pointer;
  padding-right: 5px;
  padding-left: 5px;
}
.gde {
  transition: transform 0.3s ease;
  transform: scale(1.2);
  padding-right: 5px;
  padding-left: 5px;
}
.posisiprev {
  padding: 0px;
}
.posisiprev button {
  padding-left: 50px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1280px) {
  .toggle-view {
    padding-right: 1.5rem;
    top: 0;
  }
  .posisiprev button {
    padding-left: 25px;
  }
}

@media screen and (min-width: 1200px) {
  .kontaks {
    min-height: 530px;
    overflow-y: auto;
  }
  .col-back-links {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .back-links {
    font-size: 16px;
  }
}

@media (min-width: 992px) {
  .kontaks {
    min-height: 530px;
    overflow-y: auto;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
  }

  /* Foto dan Video */
  .col-back-links {
    flex: 0 0 35%;
    max-width: 35%;
  }

  .card-custom {
    aspect-ratio: 4 / 3;
  }

  /* End Foto dan Video */
}

@media screen and (max-width: 835px) {
  .container-fluid {
    margin-bottom: 0.5rem !important;
  }
  #hero h1 {
    font-size: 32px;
  }
  #newsletter .container button {
    width: 20% !important;
  }
  nav {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .dropdown-menu {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .gambar-mitra img {
    width: 50% !important;
  }
  .col-back-links {
    flex: 0 0 35%;
    max-width: 35%;
  }
  .back-links {
    font-size: 16px;
    margin-right: 1.5rem !important;
  }
  .toggle-view i {
    display: none;
  }
  .posisiprev {
    padding: 0px;
  }
  .posisiprev button {
    padding-left: 20px;
  }
  .posisi {
    padding: 0;
  }
  .posisi button {
    padding-left: 10px;
  }
}

@media (max-width: 768px) {
  .kontaks {
    min-height: 100%;
    overflow-y: auto;
  }
  .kata {
    margin-top: 45px;
  }

  /* foto dan video */
  .posisi {
    padding: 0;
  }
  .posisi button {
    padding-left: 10px;
  }

  .posisiprev {
    padding: 0px;
  }
  .posisiprev button {
    padding-left: 20px;
  }
  .posisiprev button i {
    padding-left: 0px;
  }
  .col-back-links {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .card-custom {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
  }
  .overlay-box h3 {
    font-size: 14px;
  }
  .overlay-box p {
    font-size: 12px;
  }
  .toggle-view i {
    display: none;
  }
  .back-links {
    font-size: 16px;
    margin-top: 50px;
  }

  /* End Foto dan Video */
}

@media (max-width: 600px) {
  .kontaks {
    min-height: 100%;
    overflow-y: auto;
  }

  .gambar-mitra img {
    width: 50% !important;
  }

  h1 {
    font-size: 1.5rem;
  }

  .coba {
    margin-top: 30px;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 300px;
  }

  nav {
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  li.nav-item:hover {
    background-color: #05649bff !important;
  }

  .ps-4 {
    margin-top: 2rem;
  }

  .img-thumbnail {
    width: 105px;
  }

  .text-gambar h1 {
    font-size: 24px !important;
    text-align: center;
  }

  .module-card {
    width: 90%;
    min-height: 400px;
  }
  .toggle-view i {
    display: none;
  }
  #newsletter .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #newsletter .container h1 {
    font-size: 20px !important;
  }
  #newsletter .container button {
    margin-top: 10px;
    width: 95% !important;
  }
  #kontak h1 {
    margin-top: 80px !important;
    font-size: 24px !important;
  }
  #kontak h3,
  #kontak p {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
  #kontak img {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    border-radius: 5px;
  }

  #kontaks h1 {
    font-size: 24px !important;
  }
  #kontaks h3,
  #kontaks p {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }
  #kontaks img {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    border-radius: 5px;
  }
  #heroes img {
    margin-top: 80px !important;
  }
  .besar {
    height: 28px;
  }
  .posisiprev {
    padding: 0px;
  }
  .posisiprev button {
    padding-left: 10px;
  }
}
@media (max-width: 400px) {
  /* #mpel .row {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  } */
  .posisi {
    padding: 0;
  }
  .posisi button {
    padding: 0 !important;
  }
  .posisi button i {
    margin-left: 0px !important;
  }
  .tampilan {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .col-back-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    border: 1px solid #333;
    border-radius: 15%;
    transition: all 0.5s ease;
  }
  .col-back-links a:hover {
    background-color: #ffce3a;
  }
  .back-links i {
    display: block;
    font-size: 20px;
  }
  .dno {
    display: none !important;
  }
}
