/* ============================================================
   FlirtCam AI Review — Premium Enhancements
   Loaded on ALL pages after style.css.
   1. Author box (E-E-A-T style byline card)
   2. FAQ premium redesign (light theme pages)
   3. ReactBits-inspired animations: scroll reveal, shine
      buttons, card lift/glow, gradient shimmer text, count-in
   ============================================================ */

/* ------------------------------------------------------------
   1. AUTHOR BOX
   ------------------------------------------------------------ */
.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: linear-gradient(135deg, #fff5f9 0%, #fce4ec 100%);
  border: 1px solid var(--border-light, #e8d5e0);
  border-radius: 16px;
  padding: 24px;
  margin: 40px 0 8px;
  position: relative;
  overflow: hidden;
}
.author-box::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(194, 24, 91, 0.09) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.author-avatar {
  position: relative;
  flex-shrink: 0;
}
.author-avatar img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(194, 24, 91, 0.22);
}
.author-avatar .author-verified {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #c2185b, #880e4f);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  border: 2px solid #fff;
}
.author-info { min-width: 0; }
.author-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--brand-accent, #f06292);
  margin-bottom: 2px;
}
.author-name {
  font-family: var(--font-display, serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a2e);
  margin: 0 0 2px;
}
.author-role {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary, #c2185b);
  margin-bottom: 8px;
}
.author-bio {
  font-size: 0.84rem;
  color: var(--text-secondary, #4a4a6a);
  line-height: 1.65;
  margin: 0 0 10px;
}
.author-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.72rem;
  color: var(--text-muted, #7a7a9a);
}
.author-meta span { display: inline-flex; align-items: center; gap: 5px; }
.author-meta i { color: var(--brand-accent, #f06292); }
@media (max-width: 560px) {
  .author-box { flex-direction: column; align-items: center; text-align: center; }
  .author-meta { justify-content: center; }
}

/* ------------------------------------------------------------
   2. FAQ PREMIUM REDESIGN (light theme pages)
   ------------------------------------------------------------ */
.faq-section h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-item {
  border: 1px solid var(--border-light, #e8d5e0);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.faq-item:hover {
  border-color: rgba(194, 24, 91, 0.45);
  box-shadow: 0 6px 22px rgba(194, 24, 91, 0.1);
  transform: translateY(-1px);
}
.faq-question {
  gap: 12px;
  align-items: center;
}
/* Q badge */
.faq-question::before {
  content: '?';
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary, #c2185b), var(--brand-dark, #880e4f));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(194, 24, 91, 0.3);
}
.faq-question { justify-content: flex-start; }
.faq-question .faq-icon,
.faq-question > i { margin-left: auto; }
.faq-answer-inner,
.faq-answer > p {
  position: relative;
  padding-left: 56px;
}
.faq-answer-inner::before,
.faq-answer > p::before {
  content: 'A';
  position: absolute;
  left: 20px;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand-accent, #f06292);
  color: var(--brand-primary, #c2185b);
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 560px) {
  .faq-answer-inner, .faq-answer > p { padding-left: 20px; }
  .faq-answer-inner::before, .faq-answer > p::before { display: none; }
}

/* ------------------------------------------------------------
   3. REACTBITS-INSPIRED ANIMATIONS
   ------------------------------------------------------------ */

/* --- Scroll reveal (added by js/enhancements.js) --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* stagger children in grids */
.reveal-stagger > * { transition-delay: 0s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.14s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.21s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.28s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.35s; }
.reveal-stagger > *:nth-child(7) { transition-delay: 0.42s; }
.reveal-stagger > *:nth-child(8) { transition-delay: 0.49s; }

/* --- Button shine sweep (reactbits "shiny button" style) --- */
.btn-primary, .cta-btn, .nav-cta, .btn-pill, .sidebar-cta-btn, .mobile-cta {
  position: relative;
  overflow: hidden;
}
.btn-primary::after, .cta-btn::after, .nav-cta::after,
.btn-pill::after, .sidebar-cta-btn::after, .mobile-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.35) 50%, transparent 80%);
  transform: skewX(-22deg);
  animation: btn-shine 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btn-shine {
  0%   { left: -80%; }
  55%  { left: 130%; }
  100% { left: 130%; }
}

/* --- CTA pulse ring on primary hero button --- */
.hero-actions .btn-primary {
  animation: cta-pulse 2.6s ease-out infinite;
}
@keyframes cta-pulse {
  0%   { box-shadow: 0 4px 24px rgba(236, 72, 153, 0.35), 0 0 0 0 rgba(236, 72, 153, 0.45); }
  60%  { box-shadow: 0 4px 24px rgba(236, 72, 153, 0.35), 0 0 0 14px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 4px 24px rgba(236, 72, 153, 0.35), 0 0 0 0 rgba(236, 72, 153, 0); }
}

/* --- Gradient shimmer text (reactbits "gradient text") --- */
.grad {
  background-size: 200% auto !important;
  animation: grad-shimmer 4s linear infinite;
}
@keyframes grad-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* --- Card lift + glow on hover (character/article cards) --- */
.character-card, .article-card {
  will-change: transform;
}
.character-card:hover img { transform: scale(1.05); }
.character-card img { transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }

/* --- Badge float --- */
.hero-badge { animation: badge-float 4.5s ease-in-out infinite; }
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* --- Verdict / CTA boxes: soft animated glow border --- */
.verdict-box, .cta-box {
  position: relative;
}
.verdict-box { animation: glow-breathe 4s ease-in-out infinite; }
@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 8px 34px rgba(236, 72, 153, 0.24); }
  50%      { box-shadow: 0 8px 44px rgba(236, 72, 153, 0.42); }
}

/* --- Respect reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  .btn-primary::after, .cta-btn::after, .nav-cta::after,
  .btn-pill::after, .sidebar-cta-btn::after, .mobile-cta::after { animation: none; display: none; }
  .hero-actions .btn-primary, .grad, .hero-badge, .verdict-box { animation: none; }
  .character-card img { transition: none; }
}
