/* ========================================
   Solusi Page Styling - RESPONSIVE READY
======================================== */

/* Reset & Base */
html, body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* CTA FULLSCREEN WRAPPER */
.cta-fullscreen-wrapper {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.solusi-content {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-top: 60px;
  padding-bottom: 40px;
}

/* ========================================
   GRID - FLEXIBLE & RESPONSIVE
======================================== */
.modul-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 42px 32px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   CARD BASE
======================================== */
.modul-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 525px;
  padding: 32px 20px;
  border: 4px solid transparent;
  border-radius: 20px;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  opacity: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modul-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-content {
  padding: 0;
}

.card-badge {
  margin-bottom: 10px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.1;
  color: #475569;
}

.card-title {
  margin: 0 0 12px 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.15;
  color: #0f172a;
}

.card-paragraph {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.7;
  color: #334155;
}

.card-preview {
  width: 100%;
  height: 200px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 12px;
  background: #f5f5f5;
}

.card-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.card-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 65px;
  height: 65px;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* BACKGROUND PER CARD */
.card-bg-pmb1 {
  background-image: url('../img/akademis/Card.svg');
}

.card-bg-pmb2,
.card-bg-pmb3,
.card-bg-pmb4,
.card-bg-pmb5,
.card-bg-pmb6,
.card-bg-pmb7,
.card-bg-pmb8 {
  background-image: url('../img/akademis/card2.svg');
}

/* CLICKABLE */
.js-modul-card {
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.js-modul-card:hover {
  transform: translateY(-4px);
}

.js-modul-card:focus {
  outline: 2px solid #0b7fab;
  outline-offset: 4px;
}

/* ========================================
   SIDE MODAL / RIGHT SIDEBAR
======================================== */
.modul-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
}

.modul-modal.is-active {
  pointer-events: auto;
}

.modul-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.modul-modal.is-active .modul-modal__overlay {
  opacity: 1;
}

.modul-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 650px;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.16);
  transform: translateX(100%);
  transition: transform 0.32s ease;
  z-index: 2;
}

.modul-modal.is-active .modul-modal__dialog {
  transform: translateX(0);
}

/* ✅ Close Button - FIXED: Tambah titik (.) di depan selector */
.modul-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
  
  /* Ukuran jelas */
  width: 30px;
  height: 30px;
  padding: 0;
  
  border: none !important;
  outline: none !important;
  outline-width: 0 !important;
  outline-style: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  
  /* Reset semua styling */
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  
  /* Text X */
  color: #475569;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  
  /* Center X */
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Reset appearance */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.modul-modal__close:hover,
.modul-modal__close:focus {
  color: #0f172a;
  background: transparent;
  outline: none;
}

.modul-modal__close:active {
  transform: scale(0.95);
}

.modul-modal__close span {
  display: block;
  line-height: 1;
}

.modul-modal__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8fafc;
  height: 100%;
}

/* ✅ Header: padding-right disesuaikan agar tidak tertutup close button */
.modul-modal__header {
  position: relative;
  padding: 24px 70px 24px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  z-index: 5;
}

.modul-modal__title {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  color: #0f172a;
}

/* Category Icon - Bottom Right (RAW SVG, no background box) */
.modul-modal__category-icon-wrapper {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 80px;
  height: 80px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.modul-modal__category-icon-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modul-modal__preview {
  width: 100% !important;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 4px solid #dbe4ee;
  position: relative;
  z-index: 5;
  overflow: hidden;
  max-width: 100%;
}

.modul-modal__preview img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block !important;
  background: #ffffff;
  object-fit: fill !important;
}

.modul-modal__preview img[src$=".svg"] {
  width: 100% !important;
  height: auto !important;
}

.modul-modal__content {
  padding: 24px;
  background: #f8fafc;
  overflow-y: auto;
  flex: 1;
}

.modul-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.modul-modal__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
  white-space: nowrap;
}

.badge-blue {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #7dd3fc;
}

.badge-orange {
  background: #fff7ed;
  color: #ea580c;
  border-color: #fdba74;
}

.badge-indigo {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.badge-emerald {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.badge-pink {
  background: #fdf2f8;
  color: #be185d;
  border-color: #fbcfe8;
}

.badge-violet {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}

.badge-teal {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}

.badge-amber {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.modul-modal__content-heading {
  margin: 0 0 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
  color: #334155;
}

.modul-modal__text p,
.modul-modal__section p,
.modul-modal__section li {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  line-height: 1.7;
  color: #475569;
}

.modul-modal__text p + p {
  margin-top: 14px;
}

.modul-modal__section {
  margin-top: 18px;
}

.modul-modal__section h3 {
  margin: 0 0 8px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
  color: #334155;
}

/* ========================================
   LIST UMUM (MANFAAT)
======================================== */
.modul-modal__section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modul-modal__section li {
  position: relative;
  min-height: 24px;
  padding-left: 28px;
}

.modul-modal__section li + li {
  margin-top: 6px;
}

.modul-modal__section li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  width: 16px;
  height: 16px;
  background-image: url('../img/akademis/bullet.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ========================================
   FEATURES / DROPDOWN BOX
======================================== */
.modul-modal__features {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.modul-modal__features-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 0;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.modul-modal__features-toggle:hover,
.modul-modal__features-toggle:focus,
.modul-modal__features-toggle:active,
.modul-modal__features-toggle[aria-expanded="true"],
.modul-modal__features.is-open .modul-modal__features-toggle {
  background: #ffffff;
  box-shadow: none;
  outline: none;
}

.modul-modal__features-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  color: #334155;
}

.modul-modal__features-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.modul-modal__features-arrow {
  font-size: 14px;
  line-height: 1;
  color: #64748b;
  transition: transform 0.2s ease;
}

.modul-modal__features.is-open .modul-modal__features-arrow {
  transform: rotate(180deg);
}

.modul-modal__features-content {
  padding: 0 12px 12px;
}

.modul-modal__features-content[hidden] {
  display: none;
}

.modul-modal__features ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.modul-modal__features li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px 10px 40px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.modul-modal__features li + li {
  margin-top: 10px;
}

.modul-modal__features li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-image: url('../img/akademis/bullet.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.modul-modal__features li .modul-bullet,
.modul-modal__section li .modul-bullet {
  display: none !important;
}

.modul-list-item {
  display: block;
  width: 100%;
}

.modul-bullet {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}

.feature-dropdown {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.feature-dropdown-toggle {
  padding: 6px 0;
  border: none;
  background: none;
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.feature-dropdown-list {
  display: none;
  margin-top: 8px;
}

.feature-dropdown.open .feature-dropdown-list {
  display: block;
}

body.modal-open {
  overflow: hidden;
}

#modulBenefits {
  list-style: disc;
  margin: 0;
  padding-left: 22px;
}

#modulBenefits li {
  display: list-item;
  padding-left: 0;
  min-height: auto;
  color: #475569;
  font-family: 'Roboto', sans-serif;
  font-size: 12px;
  line-height: 1.7;
}

#modulBenefits li + li {
  margin-top: 2px;
}

#modulBenefits li::before {
  content: none !important;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
======================================== */

/* Large Desktop (1600px+) */
@media (min-width: 1600px) {
  .modul-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1400px;
    gap: 48px 40px;
  }
  
  .modul-card {
    height: 550px;
  }
  
  .card-title {
    font-size: 32px;
  }
}

/* Desktop Medium (1280px - 1599px) */
@media (min-width: 1280px) and (max-width: 1599px) {
  .modul-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    gap: 42px 32px;
    padding: 0 32px;
  }
  
  .modul-card {
    height: 500px;
  }
  
  .card-title {
    font-size: 28px;
  }
  
  .card-paragraph {
    font-size: 18px;
  }
  
  .modul-modal__dialog {
    max-width: 650px;
  }
}

/* Desktop Small / Large Tablet (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .modul-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    gap: 32px 24px;
    padding: 0 40px;
  }
  
  .modul-card {
    height: 480px;
    padding: 28px 20px;
  }
  
  .card-title {
    font-size: 26px;
  }
  
  .card-paragraph {
    font-size: 17px;
  }
  
  .card-icon {
    width: 60px;
    height: 60px;
  }
  
  .modul-modal__dialog {
    max-width: 600px;
  }
}

/* Tablet Portrait (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .solusi-content {
    padding-top: 40px;
    padding-bottom: 30px;
  }
  
  .modul-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
    padding: 0 24px;
  }
  
  .modul-card {
    height: auto;
    min-height: 420px;
    padding: 24px 16px;
  }
  
  .card-badge {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  .card-title {
    font-size: 22px;
    margin-bottom: 10px;
  }
  
  .card-paragraph {
    font-size: 15px;
    line-height: 1.6;
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    top: 12px;
    right: 12px;
  }
  
  .card-preview {
    height: 140px;
  }
  
  .modul-modal {
    padding: 16px;
    align-items: flex-end;
  }
  
  .modul-modal__dialog {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 0;
  }
  
  .modul-modal__header {
    padding: 20px 60px 20px 20px;
  }
  
  .modul-modal__title {
    font-size: 18px;
  }
  
  .modul-modal__category-icon-wrapper {
    bottom: 20px;
    right: 20px;
    width: 65px;
    height: 65px;
  }
  
  .modul-modal__preview img {
    height: 200px;
  }
  
  .modul-modal__content {
    padding: 20px;
  }
  
  /* ✅ Close Button - Tablet */
  .modul-modal__close {
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    font-size: 24px;
  }
}

/* Mobile Landscape & Large Mobile (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .solusi-content {
    padding-top: 30px;
    padding-bottom: 24px;
  }
  
  .modul-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 20px;
  }
  
  .modul-card {
    height: auto;
    min-height: 380px;
    padding: 24px 18px;
  }
  
  .card-badge {
    font-size: 13px;
  }
  
  .card-title {
    font-size: 24px;
    margin-bottom: 10px;
  }
  
  .card-paragraph {
    font-size: 15px;
    line-height: 1.6;
  }
  
  .card-icon {
    width: 55px;
    height: 55px;
  }
  
  .card-preview {
    height: 160px;
  }
  
  .modul-modal {
    padding: 0;
    align-items: flex-end;
  }
  
  .modul-modal__dialog {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 0;
  }
  
  .modul-modal__category-icon-wrapper {
    bottom: 20px;
    right: 20px;
    width: 65px;
    height: 65px;
  }
  
  .modul-modal__preview img {
    height: 180px;
  }
  
  /* ✅ Close Button - Mobile Large */
  .modul-modal__close {
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    font-size: 22px;
  }
  
  .modul-modal__header {
    padding: 18px 58px 18px 18px;
  }
}

/* Mobile Small (≤480px) */
@media (max-width: 480px) {
  .solusi-content {
    padding-top: 24px;
    padding-bottom: 20px;
  }
  
  .modul-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px;
  }
  
  .modul-card {
    height: auto;
    min-height: 360px;
    padding: 20px 16px;
    border-radius: 16px;
  }
  
  .card-badge {
    font-size: 12px;
    margin-bottom: 6px;
  }
  
  .card-title {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  
  .card-paragraph {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .card-icon {
    width: 45px;
    height: 45px;
    top: 12px;
    right: 12px;
  }
  
  .card-preview {
    height: 140px;
    border-radius: 10px;
  }
  
  .modul-modal {
    padding: 0;
    align-items: flex-end;
  }
  
  .modul-modal__dialog {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .modul-modal__header {
    padding: 18px 54px 18px 18px;
  }
  
  .modul-modal__title {
    font-size: 17px;
  }
  
  .modul-modal__category-icon-wrapper {
    bottom: 16px;
    right: 16px;
    width: 55px;
    height: 55px;
  }
  
  .modul-modal__preview img {
    height: 160px;
  }
  
  .modul-modal__content {
    padding: 16px;
  }
  
  /* ✅ Close Button - Mobile Small */
  .modul-modal__close {
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    font-size: 20px;
  }
  
  .modul-modal__badges {
    margin: 12px 0 14px;
    gap: 6px;
  }
  
  .modul-modal__badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  
  .modul-modal__content-heading {
    font-size: 14px;
    margin-bottom: 10px;
  }
  
  .modul-modal__text p,
  .modul-modal__section p,
  .modul-modal__section li {
    font-size: 12px;
    line-height: 1.6;
  }
  
  .modul-modal__section {
    margin-top: 14px;
  }
  
  .modul-modal__section h3 {
    font-size: 12px;
    margin-bottom: 6px;
  }
  
  .modul-modal__section li {
    min-height: 20px;
    padding-left: 24px;
    font-size: 12px;
  }
  
  .modul-modal__section li::before {
    top: 3px;
    width: 14px;
    height: 14px;
  }
  
  .modul-modal__features {
    margin-top: 14px;
    border-radius: 12px;
  }
  
  .modul-modal__features-toggle {
    padding: 12px 14px;
  }
  
  .modul-modal__features-label {
    font-size: 12px;
    gap: 8px;
  }
  
  .modul-modal__features-icon {
    width: 20px;
    height: 20px;
  }
  
  .modul-modal__features-content {
    padding: 0 10px 10px;
  }
  
  .modul-modal__features li {
    min-height: 38px;
    padding: 8px 12px 8px 36px;
    font-size: 11px;
    line-height: 1.4;
    border-radius: 8px;
  }
  
  .modul-modal__features li::before {
    width: 16px;
    height: 16px;
    left: 12px;
  }
  
  .modul-modal__features li + li {
    margin-top: 8px;
  }
  
  #modulBenefits {
    padding-left: 18px;
    font-size: 12px;
  }
  
  #modulBenefits li {
    font-size: 12px;
    line-height: 1.6;
  }
  
  #modulBenefits li + li {
    margin-top: 4px;
  }
}

/* Extra Small Mobile (≤360px) */
@media (max-width: 360px) {
  .modul-grid {
    padding: 0 12px;
    gap: 16px;
  }
  
  .modul-card {
    padding: 18px 14px;
    min-height: 340px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .card-paragraph {
    font-size: 13px;
  }
  
  .card-preview {
    height: 120px;
  }
  
  .modul-modal__preview img {
    height: 140px;
  }
  
  .modul-modal__content {
    padding: 12px 12px 16px;
  }
  
  .modul-modal__category-icon-wrapper {
    width: 50px;
    height: 50px;
  }
  
  /* ✅ Close Button - Extra Small */
  .modul-modal__close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
  
  .modul-modal__header {
    padding: 16px 50px 16px 16px;
  }
}

/* Landscape orientation fix */
@media (max-height: 600px) and (orientation: landscape) {
  .modul-modal__dialog {
    max-height: 100vh;
  }
  
  .modul-modal__preview img {
    height: 120px;
  }
  
  .modul-modal__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Accessibility & Preferences */
@media (prefers-reduced-motion: reduce) {
  .modul-card,
  .modul-modal__overlay,
  .modul-modal__dialog,
  .modul-modal__features-arrow,
  .modul-modal__close {
    transition: none;
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .modul-card {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Utility: Prevent horizontal scroll */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}

.modul-empty-state {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
  background: #fafafa;
  color: #52525b;
  font-size: 14px;
}