/* ==========================================================================
   CourseFlow Redesigned Brand Stylesheet (Warm Healing Theme)
   ========================================================================== */

/* CRT Screen Scanline Texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(47, 36, 56, 0.02) 2px, rgba(47, 36, 56, 0.02) 4px);
  pointer-events: none;
  z-index: 9999;
}

/* Ambient Radial Glows */
.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.glow-top-right {
  top: 0%;
  right: -100px;
  background: radial-gradient(circle, rgba(201, 164, 92, 0.09) 0%, rgba(243, 234, 251, 0.1) 50%, transparent 70%);
}

.glow-bottom-left {
  bottom: 5%;
  left: -200px;
  background: radial-gradient(circle, rgba(123, 91, 190, 0.07) 0%, rgba(217, 167, 176, 0.07) 50%, transparent 70%);
}

/* Navigation Scrolled State overrides */
nav.scrolled {
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1.5px solid rgba(201, 164, 92, 0.2);
  box-shadow: 0 10px 30px rgba(47, 36, 56, 0.04);
}

/* Category Tabs Custom Scrollbar Track/Thumb style for scrolling */
.custom-scroll-bar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding-bottom: 8px; /* Give room so scrollbar is not directly touching the text buttons */
}
.custom-scroll-bar::-webkit-scrollbar {
  height: 6px;
}
.custom-scroll-bar::-webkit-scrollbar-track {
  background: rgba(123, 91, 190, 0.05);
  border-radius: 10px;
}
.custom-scroll-bar::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #7B5BBE, #C9A45C);
  border-radius: 10px;
}
.custom-scroll-bar::-webkit-scrollbar-thumb:hover {
  background: #7B5BBE;
}



/* ==========================================================================
   HERO VIDEO PLACEMENT
   ========================================================================== */
#bg-video {
  position: absolute;
  top: 4%;
  left: 3%;
  right: 3%;
  bottom: 4%;
  border-radius: 22px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

#bg-video iframe,
#bg-video .video-foreground {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh;
  height: 100%;
  min-width: 100%;
  min-height: 56.25vw;
  transform: translate(-50%, -50%);
  border: none;
}

/* Gradient Mask overlaying bg video */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(250, 247, 242, 0.95) 0%, rgba(250, 247, 242, 0.88) 45%, rgba(250, 247, 242, 0.5) 100%),
              linear-gradient(180deg, rgba(250, 247, 242, 0.4) 0%, transparent 40%, transparent 60%, rgba(250, 247, 242, 0.9) 100%);
}

/* Cursor style for typewriter */
.typewriter-cursor::after {
  content: '|';
  color: #7B5BBE;
  margin-left: 2px;
  animation: blinkCursor 0.8s infinite;
}

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

/* Floating volume controller bottom right */
#mute-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(250, 247, 242, 0.9);
  border: 1.5px solid rgba(201, 164, 92, 0.3);
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: #C9A45C;
  font-size: 1.15rem;
  box-shadow: 0 4px 15px rgba(47, 36, 56, 0.1);
}

#mute-btn:hover {
  border-color: #C9A45C;
  box-shadow: 0 0 16px rgba(201, 164, 92, 0.45);
}

.scroll-hint {
  animation: floatHint 2s infinite ease-in-out;
}

@keyframes floatHint {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -8px); }
}

.scroll-mouse::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 6px;
  background: #C9A45C;
  border-radius: 2px;
  animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { opacity: 1; top: 4px; }
  100% { opacity: 0; top: 16px; }
}

/* Click Blocker Layer */
.video-overlay-shield {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

/* ==========================================================================
   PORTFOLIO SECTION & PASSCODE LOCK OVERLAYS
   ========================================================================== */
.portfolio-lock-container {
  position: absolute;
  top: 250px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 500px;
  background: rgba(243, 234, 251, 0.9);
  border: 1.5px solid rgba(201, 164, 92, 0.35);
  backdrop-filter: blur(24px);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 25px 50px rgba(47, 36, 56, 0.15), 0 0 35px rgba(123, 91, 190, 0.1);
  z-index: 50;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.portfolio-lock-container.fade-out {
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  visibility: hidden;
}

.lock-icon {
  animation: lockPulse 2s infinite alternate;
}

@keyframes lockPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(123, 91, 190, 0.2)); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(123, 91, 190, 0.5)); }
}

.shake {
  animation: errorShake 0.4s ease;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.portfolio-grid-container {
  transition: filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-grid-container.locked {
  filter: blur(20px);
  pointer-events: none;
  user-select: none;
}

.portfolio-grid-container.unlocked {
  filter: blur(0);
  pointer-events: auto;
}

/* ==========================================================================
   CATEGORY TABS STYLING
   ========================================================================== */
.tab-btn {
  border: 1px solid rgba(123, 91, 190, 0.2);
  background: rgba(250, 247, 242, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: rgba(243, 234, 251, 0.85);
  border-color: rgba(123, 91, 190, 0.5);
}

.tab-btn.active {
  background: #7B5BBE;
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 6px 15px rgba(123, 91, 190, 0.25);
  transform: translateY(-1px);
}

/* Hide scrollbars on lists */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Card Zooming Hover */
.course-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-card:hover .card-thumbnail {
  transform: scale(1.04);
}

.card-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(47, 36, 56, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.course-card:hover .card-play-overlay {
  opacity: 1;
}

.card-play-overlay i {
  font-size: 3.5rem;
  color: #C9A45C;
  filter: drop-shadow(0 0 12px rgba(201, 164, 92, 0.85));
}

.view-tag {
  transition: all 0.3s ease;
}

.course-card:hover .view-tag {
  background: #7B5BBE;
  color: #ffffff !important;
  border-color: transparent;
}

/* ==========================================================================
   INTERACTIVE LIGHTBOX POPUP MODALS
   ========================================================================== */
.lightbox-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(47, 36, 56, 0.82); /* Deep purple translucent */
  backdrop-filter: blur(18px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.4s ease;
}

.lightbox-modal-container {
  width: 90%;
  max-width: 850px;
  animation: zoomInPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Lightbox close button — at overlay level, always on top */
#lightbox-close-btn {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 10050;
  width: 44px;
  height: 44px;
  background: rgba(59, 36, 92, 0.92);
  border: 1.5px solid rgba(201, 164, 92, 0.55);
  border-radius: 50%;
  color: #C9A45C;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 4px 18px rgba(59,36,92,0.55);
}

#lightbox-close-btn:hover {
  background: #3B245C;
  color: #fff;
  transform: scale(1.1) rotate(90deg);
}

/* Lightbox fullscreen button — fixed at overlay level */
#lightbox-fullscreen-btn {
  position: fixed;
  top: 18px;
  right: 72px;
  z-index: 10050;
  width: 44px;
  height: 44px;
  background: rgba(59, 36, 92, 0.92);
  border: 1.5px solid rgba(201, 164, 92, 0.35);
  border-radius: 50%;
  color: #C9A45C;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 18px rgba(59,36,92,0.45);
}

#lightbox-fullscreen-btn:hover {
  background: #7B5BBE;
  color: #fff;
  transform: scale(1.1);
}

@keyframes zoomInPop {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   MOCK BOOKING MODAL FORM STYLES
   ========================================================================== */
.booking-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(47, 36, 56, 0.65);
  backdrop-filter: blur(15px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.booking-modal-container {
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   MEDITATION PAGE MODAL PLAYERS
   ========================================================================== */
.player-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(47, 36, 56, 0.85);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.4s ease;
}

.player-modal-container {
  width: 85%;
  max-width: 1100px;
  height: 85%;
  max-height: 750px;
  border: 1.5px solid rgba(201, 164, 92, 0.25);
  box-shadow: 0 30px 60px rgba(47, 36, 56, 0.4), 0 0 40px rgba(123, 91, 190, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.video-zoom-wrapper iframe {
  transform-origin: center;
  transition: transform 0.15s ease-out;
}

.custom-slider {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  height: 6px;
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #C9A45C;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(201, 164, 92, 0.6);
  transition: transform 0.2s;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.progress-slider::-webkit-slider-thumb {
  background: #D9A7B0;
  box-shadow: 0 0 8px #D9A7B0;
}

/* Player Modal Inner Layouts */
.player-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  flex-shrink: 0;
}

.player-modal-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 50px);
}

.player-modal-close {
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  flex-shrink: 0;
  transition: color 0.2s;
}

.player-video-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.video-zoom-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-video-overlay-shield {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

#modal-iframe-target {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

#modal-iframe-target iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

.player-controls-bar {
  flex-shrink: 0;
  padding: 12px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.controls-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.controls-progress-row .custom-slider {
  flex: 1;
}

.time-label {
  font-size: 0.7rem;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-width: 38px;
}

.controls-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.control-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ctrl-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.play-main-btn {
  padding: 9px 16px;
  font-size: 0.9rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  justify-content: center;
}

.ctrl-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  transition: opacity 0.2s;
}

.control-slider-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.slider-title {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.control-value-label {
  font-size: 0.68rem;
  font-family: 'Rajdhani', sans-serif;
  min-width: 36px;
  text-align: right;
}

/* Fullscreen Zoom Mode */
.player-modal-container {
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.player-modal-container.fullscreen-mode {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.player-modal-container.fullscreen-mode .player-modal-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: linear-gradient(to bottom, rgba(18, 13, 26, 0.85) 0%, rgba(18, 13, 26, 0) 100%);
  border-bottom: none;
  padding: 20px 40px;
}

.player-modal-container.fullscreen-mode .player-video-viewport {
  width: 100%;
  height: 100%;
  flex: 1;
}

.player-modal-container.fullscreen-mode .player-controls-bar {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 850px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 13, 26, 0.85);
  backdrop-filter: blur(24px);
  z-index: 100;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(123, 91, 190, 0.15);
}

/* ==========================================================================
   SCROLL REVEAL OBSERVER ANIMATIONS
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* Subpage Glow Placement */
.subpage-glow {
  position: absolute;
  top: 0;
  left: 15%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(123, 91, 190, 0.05) 0%, rgba(201, 164, 92, 0.05) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.subpage-main {
  position: relative;
  z-index: 10;
}

/* Mobile Menu Drawer Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 290px;
  height: 100vh;
  background: rgba(250, 247, 242, 0.98);
  border-left: 1.5px solid rgba(201, 164, 92, 0.25);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 100px 30px 40px;
  gap: 25px;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(47, 36, 56, 0.08);
}

.mobile-menu-overlay.active {
  right: 0;
}

@media (min-width: 1024px) {
  .mobile-menu-overlay {
    display: none !important;
  }
}
