/* =========================================================
   materi.css — EduSpace Materi Page
   Sinkron dengan index.css
========================================================= */

/* =========================================================
   GLOBAL
========================================================= */
.materi-wrap,
.m-hero,
.footer,
.popup-overlay {
  position: relative;
  z-index: 1;
}

.read-progress{
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  z-index: 99999;
  background: linear-gradient(90deg,var(--clr-cyan),var(--clr-purple),var(--clr-gold));
  box-shadow:
    0 0 12px rgba(0,229,255,.8),
    0 0 24px rgba(156,77,255,.6);
}

/* =========================================================
   HERO
========================================================= */
.m-hero{
  position: relative;
  min-height: 92vh;
  padding: 120px 7% 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.m-hero::before{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0,229,255,.08), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(156,77,255,.12), transparent 40%);
  pointer-events:none;
}

.m-hero-content{
  flex:1;
  max-width:700px;
  animation: heroUp .9s ease both;
}

@keyframes heroUp{
  from{
    opacity:0;
    transform:translateY(40px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.hero-title{
  font-family: var(--font-display);
  font-size: clamp(44px,6vw,82px);
  line-height: 1.05;
  margin-bottom: 24px;
  color:#fff;
  text-shadow: 0 0 30px rgba(255,255,255,.08);
}

.hero-sub{
  max-width: 600px;
  font-size: 17px;
  line-height: 1.9;
  color: var(--clr-muted);
  margin-bottom: 36px;
}

/* =========================================================
   TAB
========================================================= */
.m-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.m-tab{
  border:none;
  outline:none;
  cursor:pointer;
  padding:13px 24px;
  border-radius: 50px;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.75);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  font-family: var(--font-body);
  font-weight: 700;
  transition: all .35s ease;
}

.m-tab:hover{
  transform: translateY(-4px);
  color:white;
  border-color: rgba(0,229,255,.35);
  background: rgba(0,229,255,.08);
  box-shadow: 0 0 25px rgba(0,229,255,.15);
}

.m-tab.active{
  background: linear-gradient(135deg,
      rgba(0,229,255,.18),
      rgba(156,77,255,.18));
  border-color: rgba(0,229,255,.35);
  color: var(--clr-cyan);
  box-shadow:
    0 0 25px rgba(0,229,255,.22),
    inset 0 0 20px rgba(255,255,255,.02);
}

/* =========================================================
   HERO DECO
========================================================= */
.m-hero-deco{
  position: relative;
  width: 360px;
  height: 360px;
  flex-shrink:0;
}

.deco-sun{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.deco-sun-core{
  position:relative;
  z-index:2;
  font-size:90px;
  animation: floatSun 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(255,190,0,.6));
}

.deco-sun-glow{
  position:absolute;
  width:180px;
  height:180px;
  border-radius:50%;
  background: radial-gradient(circle,
      rgba(255,200,0,.45),
      transparent 70%);
  animation:pulseGlow 4s ease infinite;
}

@keyframes pulseGlow{
  0%,100%{
    transform:scale(1);
    opacity:.8;
  }
  50%{
    transform:scale(1.15);
    opacity:1;
  }
}

@keyframes floatSun{
  0%,100%{
    transform:translateY(0);
  }
  50%{
    transform:translateY(-12px);
  }
}

.deco-orb{
  position:absolute;
  inset:0;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.08);
  animation: orbitSpin linear infinite;
}

.do1{
  animation-duration: 10s;
}

.do2{
  inset: 30px;
  animation-duration: 16s;
}

.do3{
  inset: 70px;
  animation-duration: 22s;
}

.do-dot{
  position:absolute;
  width:16px;
  height:16px;
  border-radius:50%;
  top:-8px;
  left:50%;
  transform:translateX(-50%);
}

.dd-cyan{
  background:var(--clr-cyan);
  box-shadow:0 0 18px var(--clr-cyan);
}

.dd-orange{
  background:var(--clr-orange);
  box-shadow:0 0 18px var(--clr-orange);
}

.dd-gold{
  background:var(--clr-gold);
  box-shadow:0 0 18px var(--clr-gold);
}

/* =========================================================
   SECTION
========================================================= */
.m-section{
  position: relative;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items:center;
  padding: 110px 7%;
}

.m-section.reverse{
  grid-template-columns: .9fr 1.1fr;
}

.m-section.reverse .ms-text{
  order:2;
}

.m-section.reverse .ms-visual{
  order:1;
}

.m-section::after{
  content:'';
  position:absolute;
  left:50%;
  top:15%;
  bottom:15%;
  width:1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0,229,255,.12),
    transparent
  );
}

/* =========================================================
   NUMBER
========================================================= */
.ms-num{
  position:absolute;
  top:40px;
  right:8%;
  font-size: clamp(70px,10vw,140px);
  font-family: var(--font-display);
  font-weight:900;
  color: rgba(255,255,255,.03);
  pointer-events:none;
  user-select:none;
}

/* =========================================================
   TEXT
========================================================= */
.ms-text{
  position:relative;
  padding: 40px;
  border-radius: 28px;
  background: rgba(6,18,50,.48);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(24px);
  overflow:hidden;
}

.ms-text::before{
  content:'';
  position:absolute;
  inset:0;
  background:
    linear-gradient(135deg,
      rgba(255,255,255,.05),
      transparent 40%);
  pointer-events:none;
}

.ms-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 18px;
  border-radius:40px;
  margin-bottom:22px;
  font-size:12px;
  font-weight:700;
  letter-spacing:1px;
  text-transform:uppercase;
}

.badge-cyan{
  background: rgba(0,229,255,.12);
  color: var(--clr-cyan);
  border:1px solid rgba(0,229,255,.25);
}

.badge-gold{
  background: rgba(255,213,79,.12);
  color: var(--clr-gold);
  border:1px solid rgba(255,213,79,.25);
}

.badge-purple{
  background: rgba(156,77,255,.14);
  color: #caa7ff;
  border:1px solid rgba(156,77,255,.25);
}

.badge-teal{
  background: rgba(0,230,180,.12);
  color: #40ffd2;
  border:1px solid rgba(0,230,180,.25);
}

.badge-orange{
  background: rgba(255,112,67,.12);
  color: var(--clr-orange);
  border:1px solid rgba(255,112,67,.25);
}

.ms-title{
  font-family: var(--font-display);
  font-size: clamp(28px,4vw,48px);
  line-height:1.2;
  margin-bottom:20px;
  color:#fff;
}

.accent{
  color: var(--clr-cyan);
}

.accent-gold{
  color: var(--clr-gold);
}

.accent-purple{
  color: #c59dff;
}

.accent-teal{
  color: #38ffd0;
}

.accent-orange{
  color: var(--clr-orange);
}

.ms-divider{
  width:120px;
  height:4px;
  border-radius:20px;
  margin-bottom:32px;
  background: linear-gradient(90deg,
      var(--clr-cyan),
      transparent);
}

.divider-gold{
  background: linear-gradient(90deg,var(--clr-gold),transparent);
}

.divider-purple{
  background: linear-gradient(90deg,var(--clr-purple),transparent);
}

.divider-teal{
  background: linear-gradient(90deg,#00ffc3,transparent);
}

.divider-orange{
  background: linear-gradient(90deg,var(--clr-orange),transparent);
}

/* =========================================================
   POINTS
========================================================= */
.ms-points{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.ms-point{
  display:flex;
  align-items:flex-start;
  gap:18px;
  padding:18px 18px;
  border-radius:18px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.05);
  transition: all .35s ease;
}

.ms-point:hover{
  transform: translateX(10px);
  border-color: rgba(0,229,255,.25);
  background: rgba(0,229,255,.05);
}

.ms-point-icon{
  width:54px;
  height:54px;
  flex-shrink:0;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:24px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 25px rgba(0,229,255,.08);
}

.ms-point p{
  color: var(--clr-muted);
  line-height:1.8;
  font-size:15px;
}

.ms-point strong{
  color:white;
}

/* =========================================================
   FACT BOX
========================================================= */
.ms-fact-box{
  margin-top:28px;
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding:22px;
  border-radius:20px;
  background: linear-gradient(135deg,
      rgba(0,229,255,.08),
      rgba(156,77,255,.08));
  border:1px solid rgba(0,229,255,.14);
}

.fact-gold{
  background: linear-gradient(135deg,
      rgba(255,213,79,.08),
      rgba(255,140,0,.08));
}

.fact-teal{
  background: linear-gradient(135deg,
      rgba(0,255,200,.08),
      rgba(0,150,255,.08));
}

.fact-orange{
  background: linear-gradient(135deg,
      rgba(255,112,67,.08),
      rgba(255,180,0,.08));
}

.fact-icon{
  font-size:28px;
}

.ms-fact-box p{
  line-height:1.8;
  color: var(--clr-text);
}

/* =========================================================
   VISUAL
========================================================= */
.ms-visual{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
}

.ms-img-wrap{
  position:relative;
  width:100%;
  max-width:480px;
  padding:22px;
  border-radius:32px;
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  overflow:hidden;
  transition: all .5s ease;
}

.ms-img-wrap:hover{
  transform: translateY(-10px) rotate(-1deg);
  box-shadow:
    0 30px 60px rgba(0,0,0,.45),
    0 0 40px rgba(0,229,255,.15);
}

.ms-img{
  width:100%;
  display:block;
  border-radius:24px;
  object-fit:cover;
}

.ms-img-ring{
  position:absolute;
  inset:-20px;
  border-radius:40px;
  border:1px solid rgba(0,229,255,.12);
  animation: orbitSpin 20s linear infinite;
}

.ring-gold{
  border-color: rgba(255,213,79,.18);
}

.ring-purple{
  border-color: rgba(156,77,255,.18);
}

.ring-teal{
  border-color: rgba(0,255,200,.18);
}

.ring-orange{
  border-color: rgba(255,112,67,.18);
}

.ms-img-dot{
  position:absolute;
  width:14px;
  height:14px;
  border-radius:50%;
}

.dot-a{
  top:16px;
  right:16px;
  background: var(--clr-cyan);
  box-shadow:0 0 18px var(--clr-cyan);
}

.dot-b{
  bottom:20px;
  left:20px;
  background: var(--clr-purple);
  box-shadow:0 0 18px var(--clr-purple);
}

.dot-gold-a,
.dot-gold-b{
  background: var(--clr-gold);
  box-shadow:0 0 18px var(--clr-gold);
}

.dot-gold-a{
  top:18px;
  right:20px;
}

.dot-gold-b{
  bottom:20px;
  left:20px;
}

.dot-purple-a,
.dot-purple-b{
  background: var(--clr-purple);
  box-shadow:0 0 18px var(--clr-purple);
}

.dot-purple-a{
  top:18px;
  right:20px;
}

.dot-purple-b{
  bottom:20px;
  left:20px;
}

.dot-teal-a,
.dot-teal-b{
  background:#00ffd5;
  box-shadow:0 0 18px #00ffd5;
}

.dot-teal-a{
  top:18px;
  right:20px;
}

.dot-teal-b{
  bottom:20px;
  left:20px;
}

.dot-orange-a,
.dot-orange-b{
  background: var(--clr-orange);
  box-shadow:0 0 18px var(--clr-orange);
}

.dot-orange-a{
  top:18px;
  right:20px;
}

.dot-orange-b{
  bottom:20px;
  left:20px;
}

/* =========================================================
   FALLBACK IMAGE
========================================================= */
.ms-img-fallback{
  min-height: 320px;
  border-radius:24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:18px;
  background: linear-gradient(135deg,#081630,#091b46);
  color:white;
}

.ms-img-fallback span{
  font-size:90px;
}

.ms-img-fallback p{
  font-family: var(--font-display);
  font-size:22px;
}

/* =========================================================
   BUTTON POPUP
========================================================= */
.btn-planet-popup{
  margin-top:30px;
  border:none;
  cursor:pointer;
  padding:16px 34px;
  border-radius:50px;
  background: linear-gradient(135deg,#00b8d4,#7b1fff);
  color:white;
  font-family: var(--font-display);
  font-size:13px;
  letter-spacing:1px;
  font-weight:700;
  box-shadow:
    0 0 25px rgba(0,229,255,.25),
    0 0 40px rgba(123,31,255,.2);
  transition: all .35s ease;
}

.btn-planet-popup:hover{
  transform: translateY(-5px) scale(1.03);
  box-shadow:
    0 0 40px rgba(0,229,255,.4),
    0 0 80px rgba(123,31,255,.35);
}

/* =========================================================
   MINI CARD
========================================================= */
.ms-mini-cards{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:20px;
}

.ms-mini{
  padding:24px 20px;
  border-radius:24px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.07);
  text-align:center;
  transition: all .35s ease;
}

.ms-mini:hover{
  transform: translateY(-8px);
  border-color: rgba(255,112,67,.25);
  box-shadow: 0 18px 40px rgba(255,112,67,.12);
}

.mm-icon{
  font-size:42px;
  margin-bottom:16px;
}

.ms-mini h4{
  margin-bottom:12px;
  font-family: var(--font-display);
  color:white;
}

.ms-mini p{
  color: var(--clr-muted);
  line-height:1.7;
  font-size:14px;
}

/* =========================================================
   POPUP
========================================================= */
.popup-box{
  max-width: 1180px !important;
  background:
    linear-gradient(135deg,#06122e,#0b1f52);
  border:1px solid rgba(0,229,255,.18);
  box-shadow:
    0 0 60px rgba(0,229,255,.08),
    0 30px 80px rgba(0,0,0,.5);
}

.popup-header-title{
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:34px;
}

.popup-header-title span{
  font-size:60px;
}

.popup-header-title h2{
  font-family: var(--font-display);
  font-size:32px;
  color:white;
  margin-bottom:8px;
}

.popup-header-title p{
  color: var(--clr-muted);
}

.planet-popup-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap:22px;
}

/* =========================================================
   FLIP CARD
========================================================= */
.pp-card{
  position:relative;
  height:300px;
  transform-style: preserve-3d;
  transition: transform .8s;
  cursor:pointer;
}

.pp-card.flipped{
  transform: rotateY(180deg);
}

.pp-front,
.pp-back{
  position:absolute;
  inset:0;
  border-radius:28px;
  backface-visibility:hidden;
  overflow:hidden;
  padding:28px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
}

.pp-front{
  background:
    linear-gradient(145deg,
      rgba(255,255,255,.08),
      rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.pp-front::before{
  content:'';
  position:absolute;
  width:180px;
  height:180px;
  border-radius:50%;
  background: radial-gradient(circle,
      rgba(0,229,255,.18),
      transparent 70%);
  top:-50px;
  right:-50px;
}

.pp-front img{
  width:110px;
  height:110px;
  object-fit:contain;
  margin-bottom:20px;
  filter: drop-shadow(0 0 25px rgba(0,229,255,.35));
  transition: transform .4s ease;
}

.pp-card:hover .pp-front img{
  transform: scale(1.1) rotate(8deg);
}

.pp-front h3{
  font-family: var(--font-display);
  margin-bottom:10px;
  color:white;
}

.pp-order{
  padding:6px 14px;
  border-radius:30px;
  background: rgba(0,229,255,.08);
  border:1px solid rgba(0,229,255,.2);
  color: var(--clr-cyan);
  font-size:12px;
  font-weight:700;
}

.pp-back{
  transform: rotateY(180deg);
  background:
    linear-gradient(135deg,#07142f,#112962);
  border:1px solid rgba(0,229,255,.18);
}

.pp-back-emoji{
  font-size:56px;
  margin-bottom:16px;
}

.pp-back h4{
  font-family: var(--font-display);
  margin-bottom:18px;
  color:white;
}

.pp-back p{
  margin-bottom:10px;
  color: var(--clr-muted);
  line-height:1.7;
}

.pp-emoji{
  font-size:90px;
}

/* =========================================================
   ANIMATION
========================================================= */
.fade-in{
  opacity:0;
  transform: translateY(40px);
  transition:
    opacity .9s ease,
    transform .9s ease;
}

.fade-in.visible{
  opacity:1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1100px){

  .m-section,
  .m-section.reverse{
    grid-template-columns:1fr;
    gap:40px;
  }

  .m-section.reverse .ms-text,
  .m-section.reverse .ms-visual{
    order:unset;
  }

  .m-section::after{
    display:none;
  }

  .m-hero{
    flex-direction:column;
    text-align:center;
  }

  .hero-sub{
    margin-inline:auto;
  }

  .m-tabs{
    justify-content:center;
  }

  .m-hero-deco{
    width:280px;
    height:280px;
  }

  .ms-mini-cards{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){

  .m-hero{
    padding:100px 6% 70px;
  }

  .m-section{
    padding:80px 6%;
  }

  .ms-text{
    padding:28px;
  }

  .hero-title{
    font-size: clamp(38px,12vw,58px);
  }

  .ms-title{
    font-size:30px;
  }

  .planet-popup-grid{
    grid-template-columns:1fr;
  }

  .pp-card{
    height:280px;
  }

  .ms-num{
    font-size:70px;
    top:20px;
  }
}

@media (max-width: 480px){

  .m-tab{
    width:100%;
  }

  .ms-point{
    flex-direction:column;
  }

  .popup-box{
    padding:24px;
  }

  .popup-header-title{
    flex-direction:column;
    text-align:center;
  }
}