/* ============================================================
   NEW-FEATURES.CSS  –  Varsha Makeup Artistry
   Theme switcher panel, lightbox, popups, particles, misc UI
   All class/id names match the original HTML.
   ============================================================ */

/* ── THEME PANEL ──────────────────────────────────────────── */
.theme-panel {
  position: fixed;
  right: 78px;
  bottom: 24px;
  top: auto;
  width: 246px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 48px var(--shadow-dark);
  z-index: var(--z-panel);
  /* hidden by default */
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.theme-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.theme-panel-header h4 {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 7px;
}

.theme-panel-header h4 i {
  color: var(--accent);
}

.theme-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.theme-panel-close:hover {
  color: var(--accent);
}

.theme-swatches {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.83rem;
  font-weight: 500;
  transition: border-color 0.22s, background 0.22s;
}

.swatch:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
}

.swatch.active {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

.sw-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sw);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.sw-label {
  font-size: 0.82rem;
}

.theme-panel-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

/* Dark mode toggle */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--text-secondary);
  user-select: none;
}

.dark-mode-toggle input {
  display: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--border-solid);
  border-radius: 11px;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}

.dark-mode-toggle input:checked+.toggle-track {
  background: var(--accent);
}

.toggle-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left 0.3s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.dark-mode-toggle input:checked+.toggle-track .toggle-thumb {
  left: 21px;
}

/* Theme FAB (injected into .floating-buttons by JS) */
.float-btn.theme-fab-btn {
  background: var(--gradient);
  color: #fff;
}

.float-btn.theme-fab-btn:hover {
  transform: rotate(22deg) scale(1.1) !important;
}

/* Mobile theme panel */
@media (max-width: 580px) {
  .theme-panel {
    right: 8px !important;
    bottom: auto !important;
    top: 72px !important;
    width: calc(100vw - 16px) !important;
    max-width: 300px !important;
    max-height: calc(100vh - 88px) !important;
  }
}

/* ── IMAGE LIGHTBOX ───────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: var(--z-light);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--r-md);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.65);
  margin-top: 12px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.22s;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* ── POPUPS ───────────────────────────────────────────────── */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-popup);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s;
  padding: 16px;
}

.popup-overlay.active,
.popup-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.popup-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 42px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  transform: scale(0.92) translateY(18px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: fadeInScale 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.active .popup-content,
.popup-overlay.show .popup-content {
  transform: scale(1) translateY(0);
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 17px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.25s;
}

.popup-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.popup-icon {
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.popup-content h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 800;
}

.popup-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.6;
}

.highlight-text {
  font-family: var(--font-accent);
  color: var(--accent);
  font-size: 1.05rem !important;
  font-weight: 700;
  display: block;
  margin: 18px 0;
}

.urgency-bar {
  width: 100%;
  height: 6px;
  background: var(--border-solid);
  border-radius: 4px;
  margin: 14px 0;
  overflow: hidden;
}

.urgency-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
}

.seats-counter {
  font-weight: 800;
  color: var(--accent);
}

.countdown-box {
  background: rgba(var(--accent-rgb), 0.09);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: var(--r-md);
  padding: 10px 20px;
  margin: 14px 0;
  font-family: var(--font-accent);
  color: var(--accent);
  font-size: 0.95rem;
}

@media (max-width: 380px) {
  .popup-content {
    padding: 28px 18px;
  }

  .popup-content h3 {
    font-size: 1.1rem;
  }
}

/* ── COUNTERS (hero stats) ────────────────────────────────── */
.counter {
  display: inline-block;
}

/* ── HERO PARTICLES CANVAS ────────────────────────────────── */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ── HERO BADGE SHIMMER ───────────────────────────────────── */
.hero-badge {
  position: relative;
  overflow: hidden;
}

.hero-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  animation: badgeShimmer 3.5s ease-in-out infinite 1.5s;
}

@keyframes badgeShimmer {
  to {
    left: 140%;
  }
}

/* ── SKIP LINK ────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -44px;
  left: 14px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ── PORTFOLIO SEARCH CLEAR STATE ─────────────────────────── */
#portfolioSearch::-webkit-search-cancel-button {
  cursor: pointer;
}

/* ── RIPPLE on service-btn ────────────────────────────────── */
.service-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: rippleEffect 0.55s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ── STAGGERED REVEALS ────────────────────────────────────── */
.services-grid .reveal:nth-child(2) {
  transition-delay: 0.08s;
}

.services-grid .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

.services-grid .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

.benefits-grid .reveal:nth-child(2) {
  transition-delay: 0.10s;
}

.benefits-grid .reveal:nth-child(3) {
  transition-delay: 0.20s;
}

.benefits-grid .reveal:nth-child(4) {
  transition-delay: 0.30s;
}

.courses-grid .reveal:nth-child(2) {
  transition-delay: 0.12s;
}

.courses-grid .reveal:nth-child(3) {
  transition-delay: 0.24s;
}