/* ==========================================================================
   MAAHIR WEB - CUSTOM STYLESHEET (NON-TAILWIND SPECIFIC)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Base & Global Styles
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   2. Background Gradients (Matching Figma)
   -------------------------------------------------------------------------- */
.hero-radial-bg {
  background: radial-gradient(circle at 50% 30%, #152E72 0%, #0B1739 40%, #060D24 80%, #040817 100%);
}

.learning-radial-bg {
  background: radial-gradient(circle at 50% 35%, #18337F 0%, #0B1739 45%, #050B1E 85%);
}

.footer-radial-bg {
  background: radial-gradient(circle at 50% 50%, #142B6B 0%, #08112C 55%, #040817 90%);
}

.faq-card-gradient {
  background: linear-gradient(281.93deg, #0048A2 11.06%, #0A2042 106.39%);
}

/* --------------------------------------------------------------------------
   3. Mobile Navigation Dropdown Animation
   -------------------------------------------------------------------------- */
#mobile-dropdown {
  transform-origin: top center;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    margin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-dropdown.menu-closed {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.97);
  pointer-events: none;
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  overflow: hidden;
}

#mobile-dropdown.menu-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  max-height: 420px;
  margin-top: 0.75rem;
  padding: 1.25rem;
  overflow: visible;
}

/* Staggered entrance animation for mobile nav items */
#mobile-dropdown .mobile-nav-item {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.2s ease,
    color 0.2s ease;
}

#mobile-dropdown.menu-open .mobile-nav-item {
  opacity: 1;
  transform: translateY(0);
}

#mobile-dropdown.menu-open .mobile-nav-item:nth-child(1) {
  transition-delay: 0.04s;
}

#mobile-dropdown.menu-open .mobile-nav-item:nth-child(2) {
  transition-delay: 0.08s;
}

#mobile-dropdown.menu-open .mobile-nav-item:nth-child(3) {
  transition-delay: 0.12s;
}

#mobile-dropdown.menu-open .mobile-nav-item:nth-child(4) {
  transition-delay: 0.16s;
}

#mobile-dropdown.menu-open .mobile-nav-item:nth-child(5) {
  transition-delay: 0.20s;
}

#mobile-menu-toggle {
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#mobile-menu-toggle:active {
  transform: scale(0.92);
}

/* --------------------------------------------------------------------------
   4. Class Detail Modal Component Styles
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

@media (min-width: 640px) {
  .modal-backdrop {
    padding: 1.25rem;
  }
}

@media (min-width: 768px) {
  .modal-backdrop {
    padding: 1.5rem;
  }
}

.modal-backdrop.modal-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content-box {
  position: relative;
  width: 100%;
  max-width: 56rem;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  padding: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: scale(0.94) translateY(16px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-content-box {
    border-radius: 2rem;
    padding: 2.5rem 3em;
  }
}

@media (min-width: 768px) {
  .modal-content-box {
    padding: 3rem 4em;
  }
}

.modal-backdrop.modal-open .modal-content-box {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .modal-header {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }
}

.modal-header-title {
  font-size: 1.125rem;
  color: #2848A7;
  font-weight: 400;
  white-space: nowrap;
  order: 1;
}

@media (min-width: 640px) {
  .modal-header-title {
    font-size: 1.25rem;
  }
}

.modal-header-title strong {
  font-weight: 700;
}

/* Modal Tab Wrapper (for responsive positioning) */
.modal-tab-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  order: 3;
}

@media (min-width: 640px) {
  .modal-tab-wrapper {
    width: auto;
    order: 2;
  }
}

/* Modal Tab Pills */
.modal-tab-container {
  display: flex;
  align-items: center;
  background-color: #f1f5f9;
  border-radius: 9999px;
  padding: 0.25rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-tab-btn {
  padding: 0.375rem 1.125rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 640px) {
  .modal-tab-btn {
    padding: 0.375rem 1.25rem;
    font-size: 0.875rem;
  }
}

.modal-tab-btn:hover {
  color: #0f172a;
}

.modal-tab-btn.active {
  background-color: #1877F2;
  color: #ffffff;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Modal Close Button */
.modal-close-btn {
  padding: 0.375rem 1.25rem;
  border-radius: 9999px;
  background-color: #1877F2;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  order: 2;
}

@media (min-width: 640px) {
  .modal-close-btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    order: 3;
  }
}

.modal-close-btn:hover {
  background-color: #1565d8;
}

.modal-close-btn:active {
  transform: scale(0.95);
}

/* Modal Body & Custom Scrollbar */
.modal-body {
  flex: 1 1 0%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  margin: 0.75rem 0;
}

@media (min-width: 640px) {
  .modal-body {
    padding-right: 0.5rem;
    margin: 1rem 0;
  }
}

.modal-custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.modal-custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
}

.modal-custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.modal-custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* --------------------------------------------------------------------------
   5. Modal Tab Slide Transitions
   -------------------------------------------------------------------------- */
#modal-slider-wrapper {
  transition: height 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: height;
}

.modal-slide-track {
  display: flex;
  width: 200%;
  align-items: flex-start;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.modal-slide-panel {
  width: 50%;
  flex-shrink: 0;
  align-self: flex-start;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mentor Avatar Card */
.modal-mentor-card {
  width: 100%;
  aspect-ratio: 4 / 3.5;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  background-color: #0B1739;
  border: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
  .modal-mentor-card {
    aspect-ratio: 1 / 1;
  }
}

.modal-mentor-glow-1 {
  position: absolute;
  top: -2.5rem;
  right: -2.5rem;
  width: 8rem;
  height: 8rem;
  background-color: rgba(59, 130, 246, 0.2);
  border-radius: 9999px;
  filter: blur(24px);
  pointer-events: none;
}

.modal-mentor-glow-2 {
  position: absolute;
  bottom: -2.5rem;
  left: -2.5rem;
  width: 8rem;
  height: 8rem;
  background-color: rgba(6, 182, 212, 0.2);
  border-radius: 9999px;
  filter: blur(24px);
  pointer-events: none;
}

.modal-mentor-inner {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.modal-mentor-avatar-box {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1rem;
  background: linear-gradient(to top right, #2563eb, #38bdf8);
  padding: 2px;
  margin-bottom: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@media (min-width: 640px) {
  .modal-mentor-avatar-box {
    width: 6.5rem;
    height: 6.5rem;
  }
}

.modal-mentor-avatar-bg {
  width: 100%;
  height: 100%;
  border-radius: 0.875rem;
  background-color: #0E1F4D;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.modal-mentor-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

@media (min-width: 640px) {
  .modal-mentor-name {
    font-size: 1rem;
  }
}

.modal-mentor-role {
  color: #7dd3fc;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Price & Requirements */
.modal-price-row {
  margin-top: 0.875rem;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.modal-price-original {
  font-size: 1.25rem;
  text-decoration: line-through;
  color: #2848A7;
  font-weight: 600;
}

.modal-price-promo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #2848A7;
}

.modal-requirements-card {
  margin-top: 0.75rem;
  width: 100%;
  grid-column: 1 / -1;
}

.modal-requirements-text {
  font-size: 1rem;
  color: #2848A7;
  line-height: 1.5;
}

/* @media (min-width: 640px) {
  .modal-requirements-text {
    font-size: 0.75rem;
  }
} */

.modal-requirements-text strong {
  font-weight: 600;
  display: block;
  margin-bottom: 0.125rem;
}

/* Class Info Typography */
.modal-batch-tag {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1877F2;
  margin-bottom: 0.375rem;
}

.modal-class-title {
  font-size: 2rem;
  font-weight: 800;
  color: #2848A7;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.modal-class-desc {
  font-size: 1.25rem;
  color: #2848A7;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .modal-class-desc {
    font-size: 1.1rem;
  }
}

.modal-meta-row {
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .modal-meta-row {
    font-size: 1rem;
  }
}

.modal-mentor-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FFFFFF;
  background-color: #3E99F6;
  border: 1px solid #3E99F6;
  padding: 0.375rem 0.95rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(62, 153, 246, 0.25);
  cursor: pointer;
}

@media (min-width: 640px) {
  .modal-mentor-link {
    font-size: 0.875rem;
    padding: 0.4rem 1.125rem;
  }
}

.modal-mentor-link:hover {
  background-color: #2F80ED;
  border-color: #2F80ED;
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(62, 153, 246, 0.35);
  transform: translateY(-1px);
}

.modal-mentor-link:active {
  transform: scale(0.96);
  box-shadow: 0 2px 4px rgba(62, 153, 246, 0.2);
}

.modal-level-text {
  color: #2848A7;
  font-weight: 500;
}

.modal-level-text strong {
  font-weight: 700;
}

/* Materi List & Items */
.modal-materi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.modal-materi-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2848A7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .modal-materi-title {
    font-size: 1.25rem;
  }
}

.modal-materi-title-pill {
  width: 0.375rem;
  height: 1rem;
  background-color: #1877F2;
  border-radius: 9999px;
  display: inline-block;
}

.modal-materi-count {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.modal-materi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .modal-materi-header {
    margin-bottom: 1rem;
  }

  .modal-materi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: column;
    grid-template-rows: repeat(var(--materi-rows, 6), auto);
    column-gap: 2.25rem;
    row-gap: 1.25rem;
  }
}

.modal-materi-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0.625rem;
  align-items: start;
}

.modal-materi-num {
  font-weight: normal;
  color: #2848A7;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.modal-materi-item-title {
  font-weight: 700;
  color: #2848A7;
  line-height: 1.35;
}


.modal-materi-item-desc {
  color: #64748b;
  line-height: 1.35;
  margin-top: 0.125rem;
}

.modal-materi-num {
  font-size: 1.4rem;
}

.modal-materi-item-title, .modal-materi-item-desc { 
  font-size: 1rem;
}


@media (min-width: 640px) {
  .modal-materi-num { 
    font-size: 1.55rem;
  }
  .modal-materi-item-title, .modal-materi-item-desc { 
    font-size: 1.05rem;
  }
}

/* Modal Footer */
.modal-footer {
  padding-top: 0.875rem;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .modal-footer {
    padding-top: 1rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.modal-btn-trial {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  background-color: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
}

@media (min-width: 640px) {
  .modal-btn-trial {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

.modal-btn-trial:hover {
  background-color: #e2e8f0;
}

.modal-btn-trial:active {
  transform: scale(0.98);
}

.modal-btn-enroll {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background-color: #1877F2;
  border: none;
  box-shadow: 0 4px 14px 0 rgba(24, 119, 242, 0.25);
  text-decoration: none;
  transition: all 0.2s ease;
  display: block;
}

@media (min-width: 640px) {
  .modal-btn-enroll {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

.modal-btn-enroll:hover {
  background-color: #1565d8;
}

.modal-btn-enroll:active {
  transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   6. Hero Features Carousel (Mobile/Tablet Slider & Desktop Grid)
   -------------------------------------------------------------------------- */
#hero-features-track {
  will-change: transform;
}

@media (min-width: 1024px) {
  #hero-features-track {
    transform: none !important;
    transition: none !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2.5rem !important;
    width: 100% !important;
  }
}

/* --------------------------------------------------------------------------
   7. Mentor Brands Infinite Marquee Animation (Runs Left Continuously)
   -------------------------------------------------------------------------- */
@-webkit-keyframes brand-marquee-left {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes brand-marquee-left {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  100% {
    -webkit-transform: translate3d(-50%, 0, 0);
    transform: translate3d(-50%, 0, 0);
  }
}

.brand-marquee-track {
  display: flex !important;
  width: max-content !important;
  will-change: transform;
  -webkit-animation: brand-marquee-left 38s linear infinite !important;
  animation: brand-marquee-left 38s linear infinite !important;
}

.brand-marquee-container:hover .brand-marquee-track {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}