/* Shared Interactive Components: Service Modal, Before/After Slider, Mobile Nav, Demo Helpers */

/* 1. CLICKABLE DETAIL HINT & SCROLL REVEAL */
.detail-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--feat-link, #8B5E3C);
  margin-top: 8px;
  transition: transform 0.18s ease;
}

[data-detail-trigger]:hover .detail-hint {
  transform: translateX(3px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--feat-cta-bg, linear-gradient(90deg, #FC6400 0%, #E05800 100%));
  z-index: 60;
  pointer-events: none;
  transition: width 0.08s linear;
}

.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-ready.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.nav-links a.is-active {
  color: var(--feat-link, #FC6400) !important;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* 2. DEMO BAR THEME BADGE */
.demo-theme-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

/* 3. MOBILE HAMBURGER MENU & DRAWER */
.mob-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mob-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(128, 128, 128, 0.28);
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}

.mob-menu-btn:hover {
  background: rgba(128, 128, 128, 0.12);
}

.mob-menu-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mob-drawer {
  display: none;
  flex-direction: column;
  padding: 10px 20px 18px;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
  background: inherit;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.22);
  gap: 4px;
}

.mob-drawer.open {
  display: flex;
}

.mob-drawer a {
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.mob-drawer a:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .mob-menu-btn,
  .mob-drawer {
    display: none !important;
  }
}

/* 4. PACKAGE AUTO-SELECT HIGHLIGHT */
@keyframes pkgFlash {
  0% { box-shadow: 0 0 0 0 rgba(252, 100, 0, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(252, 100, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(252, 100, 0, 0); }
}

.pkg-selected-flash {
  animation: pkgFlash 0.9s ease-out 2;
  outline: 2px solid #FC6400;
  outline-offset: 1px;
}

/* 5. BOTTOM EXPLORE OTHER THEMES BAR */
.more-themes-bar {
  background: #141210;
  color: #F4F4F5;
  padding: 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.more-themes-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.more-themes-text {
  font-size: 0.84rem;
  color: #D4D4D8;
}

.more-themes-text strong {
  color: #FFFFFF;
}

.more-themes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.more-themes-back {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.more-themes-order {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 15px;
  border-radius: 8px;
  background: #FC6400;
}

/* 6. SERVICE DETAIL MODAL POPUP */
.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.68);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.detail-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-modal-card {
  width: 100%;
  max-width: 520px;
  background: #FFFFFF;
  color: #18181B;
  border-radius: 16px;
  padding: 28px 24px 24px;
  position: relative;
  box-shadow: 0 28px 60px -16px rgba(0, 0, 0, 0.45);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.detail-modal.open .detail-modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #E4E4E7;
  background: #FAFAFA;
  color: #18181B;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #F1F1F4;
}

.modal-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--feat-link, #8B5E3C);
  background: var(--feat-soft, #F5EAE0);
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.22;
  margin-bottom: 10px;
  color: #111827;
}

.modal-desc {
  font-size: 0.88rem;
  color: #52525B;
  line-height: 1.6;
  margin-bottom: 18px;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-meta-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
}

.modal-meta-box span {
  display: block;
  font-size: 0.7rem;
  color: #64748B;
  margin-bottom: 2px;
}

.modal-meta-box strong {
  font-size: 0.88rem;
  color: #0F172A;
}

.modal-prep-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
  margin-bottom: 8px;
}

.modal-prep-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 22px;
}

.modal-prep-list li {
  font-size: 0.84rem;
  color: #475569;
  padding-left: 16px;
  position: relative;
}

.modal-prep-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--feat-link, #8B5E3C);
  font-weight: 900;
}

.modal-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--feat-cta-bg, linear-gradient(135deg, #27201B 0%, #14110F 100%));
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 10px;
}

/* 7. INTERACTIVE BEFORE / AFTER SLIDER */
.ba-card {
  max-width: 780px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--feat-ba-border, rgba(200, 162, 122, 0.3));
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.35);
}

.ba-stage {
  position: relative;
  height: 290px;
  user-select: none;
  overflow: hidden;
}

.ba-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 26px;
}

.ba-before {
  background: var(--feat-ba-before, linear-gradient(135deg, #3D332D 0%, #241D19 100%));
  color: #E7DED7;
}

.ba-after {
  background: var(--feat-ba-after, linear-gradient(135deg, #FBF5EE 0%, #EAD9C7 100%));
  color: #241A14;
  clip-path: inset(0 50% 0 0);
}

.ba-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ba-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
}

.ba-before .ba-badge {
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
}

.ba-after .ba-badge {
  background: var(--feat-link, #8B5E3C);
  color: #FFFFFF;
}

.ba-content {
  max-width: 480px;
}

.ba-content h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.ba-content p {
  font-size: 0.85rem;
  line-height: 1.55;
  opacity: 0.9;
}

.ba-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ba-metric-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 6px;
}

.ba-before .ba-metric-pill {
  background: rgba(255, 255, 255, 0.1);
}

.ba-after .ba-metric-pill {
  background: rgba(0, 0, 0, 0.08);
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #FFFFFF;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 4;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #18181B;
  font-weight: 900;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
  margin: 0;
}

.ba-caption {
  background: rgba(0, 0, 0, 0.04);
  padding: 10px 16px;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
}

@media (max-width: 520px) {
  .ba-stage {
    height: 330px;
  }
  .ba-layer {
    padding: 18px 16px;
  }
  .ba-content h3 {
    font-size: 1.15rem;
  }
  .detail-modal-card {
    padding: 22px 18px 20px;
  }
  .modal-title {
    font-size: 1.2rem;
  }
  .modal-meta-grid {
    grid-template-columns: 1fr;
  }
  .demo-theme-badge {
    display: none;
  }
}
