/* =========================================================
   home-dashboard.css — the full dashboard content shown after
   the welcome video: second header, tabs, category carousels,
   "Lihat Semua" popup, and the bottom music player bar.
   ========================================================= */

/* ---- Dashboard content becomes the scrollable area ---- */
.dash-content {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px; /* room for the fixed music bar */
  scrollbar-width: none; /* Firefox */
}

.dash-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

/* =========================================================
   Second header: animated looping text (left) + video (right),
   blended together, spanning the full screen width edge-to-edge.
   ========================================================= */
.hero2 {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 260px;
  overflow: hidden;
  background: #000;
}

.hero2__text {
  position: relative;
  z-index: 2;
  flex: 0 0 46%;
  display: flex;
  align-items: center;
  padding: 28px 6vw 28px 24px;
  overflow: hidden;
}

.hero2__text-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero2__text-dark {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35); /* darker overlay for text readability */
  pointer-events: none;
}

.hero2__heading {
  position: relative;
  z-index: 2;
}

.hero2__heading {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-white);
  font-size: clamp(20px, 3.4vw, 34px);
  line-height: 1.3;
  margin: 0;
}

.hero2__heading.is-looping {
  animation: hero2TextLoop 3.6s ease-in-out infinite;
}

.hero2__heading {
  transition: opacity 0.4s ease;
}

.hero2__heading.is-fading-out {
  opacity: 0;
}

.hero2__heading-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 2px;
  background: var(--color-neon-green);
  vertical-align: -0.1em;
  animation: hero2CursorBlink 0.8s step-end infinite;
}

.hero2__heading.is-looping .hero2__heading-cursor {
  display: none; /* cursor only shows while actively typing */
}

@keyframes hero2CursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes hero2TextLoop {
  0%, 100% { opacity: 0.88; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.hero2__video {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

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

/* The "mix" blend: fades the video's left edge into the same dark
   background the text sits on, so there's no hard seam between them */
.hero2__blend {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #0a0714 0%, rgba(10, 7, 20, 0.65) 18%, rgba(10, 7, 20, 0) 55%);
  pointer-events: none;
}

/* Compact on narrower / rotated phone screens: stack instead of side-by-side */
@media (max-width: 760px) {
  .hero2 {
    flex-direction: column;
    min-height: 0;
  }
  .hero2__text {
    flex: none;
    padding: 20px 20px 10px;
  }
  .hero2__video {
    flex: none;
    height: 34vh;
    min-height: 160px;
  }
  .hero2__blend {
    background: linear-gradient(180deg, #0a0714 0%, rgba(10, 7, 20, 0.55) 16%, rgba(10, 7, 20, 0) 45%);
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .hero2__video {
    height: 60vh;
  }
}

/* =========================================================
   Filter tabs
   ========================================================= */
.dash-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 18px 20px 6px;
  scrollbar-width: none;
}

.dash-tabs::-webkit-scrollbar {
  display: none;
}

.dash-tab {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.08);
  padding: 9px 18px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-tab.is-active {
  background: var(--color-neon-green);
  color: #06331c;
}

/* =========================================================
   Category rows + carousel
   ========================================================= */
.dash-rows {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 10px 0 20px;
}

.dash-row[hidden] {
  display: none !important;
}

.dash-rows-extra {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dash-rows-extra[hidden] {
  display: none !important;
}

.dash-rows-toggle-wrap {
  display: flex;
  justify-content: center;
  padding: 2px 0 16px;
}

.dash-rows-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  color: var(--color-white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

.dash-rows-toggle:hover {
  background: rgba(0, 0, 0, 0.28);
}

.dash-rows-toggle:active {
  transform: scale(0.92);
}

.dash-rows-toggle__icon {
  display: inline-block;
  transition: transform 0.25s ease;
}

.dash-rows-toggle.is-expanded .dash-rows-toggle__icon {
  transform: rotate(180deg);
}

.dash-row__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 8px;
}

.dash-row__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-white);
  font-size: clamp(16px, 2.6vw, 19px);
  margin: 0;
}

.dash-row__seeall {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--color-neon-green);
  white-space: nowrap;
}

.dash-row__carousel-wrap {
  position: relative;
}

.dash-row__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 20px 8px;
  scrollbar-width: none;
}

.dash-row__track::-webkit-scrollbar {
  display: none;
}

.dash-card {
  flex: 0 0 calc(25% - 8px); /* ~4 cards visible per view */
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #14101f;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 900px) {
  .dash-card {
    flex-basis: calc(42% - 8px); /* ~2.3 cards visible on tablets/phones */
  }
}

@media (max-width: 480px) {
  .dash-card {
    flex-basis: calc(62% - 8px); /* ~1.6 cards visible on small phones */
  }
}

.dash-card:hover,
.dash-card:focus-within {
  border-color: var(--color-neon-green);
  transform: scale(1.06);
  box-shadow: 0 10px 26px rgba(57, 255, 136, 0.3);
  z-index: 3;
}

.dash-card__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: #14101f;
}

/* ---- Hover overlay: "Masuk Kelas" or "Very Soon Launching" ---- */
.dash-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 10px;
  background: rgba(10, 7, 20, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dash-card:hover .dash-card__overlay,
.dash-card:focus-within .dash-card__overlay {
  opacity: 1;
}

.dash-card__overlay-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.dash-card__overlay-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: #06331c;
  background: var(--color-neon-green);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(57, 255, 136, 0.4);
}

.dash-card__overlay-badge {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11.5px;
  color: #ffd166;
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.5);
  padding: 8px 14px;
  border-radius: 999px;
}

.dash-row__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(10, 7, 20, 0.75);
  color: var(--color-white);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-row__arrow--left {
  left: 4px;
}

.dash-row__arrow--right {
  right: 4px;
}

@media (max-width: 760px) {
  .dash-row__arrow {
    display: none; /* swipe/scroll is the natural interaction on touch */
  }
}

/* =========================================================
   "Lihat Semua / See All" popup
   ========================================================= */
.row-popup {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #0a0714;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 40px;
  scrollbar-width: none;
}

.row-popup::-webkit-scrollbar {
  display: none;
}

.row-popup[hidden] {
  display: none !important;
}

.row-popup__close {
  position: sticky;
  top: 0;
  float: right;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  font-size: 22px;
  z-index: 2;
}

.row-popup__title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-white);
  font-size: clamp(20px, 4vw, 28px);
  clear: both;
  margin: 10px 0 20px;
}

.row-popup__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.row-popup__grid .dash-card {
  flex-basis: auto;
}

/* =========================================================
   Bottom music player bar
   ========================================================= */
.music-player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px calc(16px + var(--safe-left)) calc(10px + var(--safe-bottom)) 16px;
  background: rgba(10, 7, 20, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

/* CRITICAL: without this, "display: flex" above wins over the browser's
   own [hidden] { display: none } rule — same recurring bug fixed on
   several other elements throughout this project. */
.music-player[hidden] {
  display: none !important;
}

/* Both the transient "hidden while scrolling" state and the manual
   "user hid it" state use the same slide-away visual */
.music-player--hidden-state {
  transform: translateY(120%);
  pointer-events: none;
}

.music-player__btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-neon-green);
  color: #06331c;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-player__info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.music-player__track {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-player__toggle {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}

/* ---- Two stacked floating buttons, bottom-right corner ---- */
.corner-fabs {
  position: fixed;
  right: calc(16px + var(--safe-right));
  bottom: calc(16px + var(--safe-bottom));
  z-index: 960;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.corner-fab {
  position: relative;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.corner-fab[hidden] {
  display: none !important;
}

.corner-fab__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-neon-green);
  opacity: 0.55;
  animation: cornerFabPulse 2s ease-in-out infinite;
}

.corner-fab__core {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-neon-green);
  color: #06331c;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(57, 255, 136, 0.4);
}

/* AI button uses a distinct color while it's just a placeholder */
.corner-fab--ai .corner-fab__ring {
  border-color: #c6a8ff;
}

.corner-fab--ai .corner-fab__core {
  background: #c6a8ff;
  color: #2f1a5c;
  box-shadow: 0 6px 16px rgba(198, 168, 255, 0.4);
}

@keyframes cornerFabPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.18); opacity: 0.15; }
}
