/**
 * Webbitech - Playful Canvas FAQ Section Styles
 * Pixel-accurate recreation of the creative studio canvas reference:
 * - Graph-paper background (#FAF9F7 with 60px grid #B9CAFF)
 * - Centered bold heading with rotated "FAQs" paperclip sticker
 * - 5 floating pastel cards with smooth expand/collapse and hover physics
 * - Hand-drawn SVG doodles (hearts, stars, lightbulb, wave, cursors, cloud, zig-zag)
 * - Fully responsive with clean mobile accordion stack
 */

:root {
  --faq-paper: #FAF9F7;
  --faq-grid: #B9CAFF;
  --faq-ink: #050505;
  --faq-pink: #FADBDD;
  --faq-blue: #C9E0F5;
  --faq-green-light: #DDF3C9;
  --faq-green: #DCF3C9;
  --faq-yellow: #FFFACB;
  --faq-sticker-bg: #d8ebfd;
  --faq-sticker-border: #b8daf8;
  --faq-sticker-ink: #0284c7;
}

/* ==========================================================================
   1. SECTION & GRAPH PAPER CANVAS
   ========================================================================== */
.faq-playful-section {
  position: relative;
  background-color: var(--faq-paper);
  background-image:
    linear-gradient(var(--faq-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--faq-grid) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center top;
  overflow: hidden;
  width: 100%;
  min-height: 520px;
  color: var(--faq-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  user-select: none;
}

.faq-playful-canvas {
  position: relative;
  width: 100%;
  max-width: 1466px;
  min-height: 520px;
  margin: 0 auto;
}

/* ==========================================================================
   2. CENTRAL HEADING & FAQS STICKER
   ========================================================================== */
.faq-playful-center {
  position: absolute;
  top: 155px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  width: 100%;
  max-width: 600px;
}

/* Rotated "FAQs" Sticker with Paperclip & Question Mark */
.faq-playful-sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--faq-sticker-bg);
  border: 1px solid var(--faq-sticker-border);
  border-radius: 9px;
  padding: 4px 14px 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--faq-sticker-ink);
  letter-spacing: 0.04em;
  transform: rotate(-4deg);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.12);
  margin-bottom: 12px;
  position: relative;
  pointer-events: auto;
}

.faq-playful-paperclip {
  position: absolute;
  left: 8px;
  top: -8px;
  width: 13px;
  height: 24px;
  pointer-events: none;
}

.faq-playful-sticker-icon {
  width: 14px;
  height: 14px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
}

.faq-playful-sticker-pin {
  position: absolute;
  right: -3px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Bold Central Heading */
.faq-playful-heading {
  font-family: Arial, "Helvetica Neue", "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--faq-ink);
  text-transform: uppercase;
  margin: 0;
  text-align: center;
}

/* ==========================================================================
   3. FLOATING FAQ CARDS
   ========================================================================== */
.faq-playful-card {
  position: absolute;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  cursor: pointer;
  z-index: 6;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              z-index 0.2s ease;
  user-select: text;
}

/* Hover Physics: Subtle Lift & Slight Rotation */
.faq-playful-card:hover {
  transform: translateY(-4px) rotate(0.6deg);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.faq-playful-card.is-expanded {
  z-index: 10;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
  cursor: default;
}

.faq-playful-card.is-expanded:hover {
  transform: none;
}

/* Individual Card Colors & Desktop Positions (Matching Reference Canvas) */
.faq-playful-card-1 {
  background-color: var(--faq-pink);
  left: 6.7%;
  top: 22.5%;
  width: 220px;
}

.faq-playful-card-2 {
  background-color: var(--faq-blue);
  left: 6.7%;
  top: 59%;
  width: 205px;
}

.faq-playful-card-3 {
  background-color: var(--faq-green);
  left: 41.5%;
  top: 66%;
  width: 242px;
}

.faq-playful-card-4 {
  background-color: var(--faq-green-light);
  right: 8%;
  top: 19%;
  width: 224px;
}

.faq-playful-card-5 {
  background-color: var(--faq-yellow);
  right: 8%;
  top: 61%;
  width: 205px;
}

/* Card Header (Question & Icon) */
.faq-playful-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 10px 16px;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.faq-playful-question {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Circular Plus / Close Toggle Icon */
.faq-playful-toggle-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #475569;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.faq-playful-card:hover .faq-playful-toggle-icon {
  color: #0f172a;
}

.faq-playful-card.is-expanded .faq-playful-toggle-icon {
  transform: rotate(45deg);
}

/* Expandable Answer Content */
.faq-playful-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.32s ease,
              padding 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 0 16px;
}

.faq-playful-card.is-expanded .faq-playful-body {
  max-height: 200px;
  opacity: 1;
  padding: 2px 16px 14px 16px;
}

.faq-playful-answer {
  font-size: 12.5px;
  line-height: 1.45;
  color: #334155;
  margin: 0;
}

/* ==========================================================================
   4. HAND-DRAWN DECORATIVE DOODLES (Exact Positions from Screenshot)
   ========================================================================== */
.faq-playful-doodle {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}

/* Cyan Sparkle (Top-Left) */
.doodle-sparkle-tl {
  left: 2.2%;
  top: 6%;
  width: 24px;
  height: 24px;
  animation: doodleSpin 16s linear infinite;
}

/* Grey Cloud (Upper-Left above Card 1) */
.doodle-cloud {
  left: 8%;
  top: 11%;
  width: 52px;
  height: 32px;
  animation: doodleDrift 6s ease-in-out infinite alternate;
}

/* Yellow Squiggly Zig-zag (Far Left edge) */
.doodle-zigzag {
  left: 0.6%;
  top: 23%;
  width: 20px;
  height: 16px;
}

/* Yellow Sunburst (Left below Card 1) */
.doodle-sunburst-l {
  left: 6.2%;
  top: 45%;
  width: 34px;
  height: 34px;
  animation: doodlePulse 4s ease-in-out infinite;
}

/* Mint-Green Cursor Arrow (Lower-Left edge) */
.doodle-cursor-green {
  left: 2%;
  top: 68%;
  width: 18px;
  height: 22px;
  animation: doodleFloatGreen 3.5s ease-in-out infinite alternate;
}

/* Blue Hand-Drawn Wave (Bottom-Left) */
.doodle-wave-bl {
  left: 6.5%;
  bottom: 3.5%;
  width: 44px;
  height: 16px;
}

/* Small Pink Heart (Very Top Center-Right) */
.doodle-heart-small {
  right: 17%;
  top: 2%;
  width: 18px;
  height: 18px;
  animation: doodleFloat 3.8s ease-in-out infinite alternate;
}

/* Large Pink Heart (Upper-Right above Card 4) */
.doodle-heart-large {
  right: 11.5%;
  top: 7%;
  width: 48px;
  height: 46px;
  animation: doodleFloat 4.2s ease-in-out infinite alternate;
}

/* Blue Cursor Arrow (Resting on Card 4) */
.doodle-cursor-blue {
  right: 14%;
  top: 25.5%;
  width: 18px;
  height: 22px;
  z-index: 12;
}

/* Blue Lightbulb Outline (Right edge) */
.doodle-lightbulb {
  right: 4.8%;
  top: 24.5%;
  width: 20px;
  height: 28px;
}

/* Tiny Blue Lightning Bolt (Right edge) */
.doodle-lightning {
  right: 2.2%;
  top: 24.5%;
  width: 12px;
  height: 18px;
}

/* Yellow Sunburst (Right above Card 5) */
.doodle-sunburst-r {
  right: 14.5%;
  top: 51%;
  width: 34px;
  height: 34px;
  animation: doodlePulse 4s ease-in-out infinite 2s;
}

/* Blue Circular Doodle / Spiral (Bottom-Right) */
.doodle-spiral-br {
  right: 7%;
  bottom: 2.5%;
  width: 38px;
  height: 36px;
}

/* ==========================================================================
   5. DECORATIVE KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes doodleFloat {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-5px) rotate(2deg); }
}

@keyframes doodleFloatGreen {
  0% { transform: translate(0, 0); }
  100% { transform: translate(3px, -4px); }
}

@keyframes doodlePulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes doodleDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(6px); }
}

@keyframes doodleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   6. RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1199.98px) and (min-width: 768px) {
  .faq-playful-section {
    min-height: 560px;
  }

  .faq-playful-canvas {
    min-height: 560px;
  }

  .faq-playful-heading {
    font-size: 34px;
  }

  .faq-playful-card-1 {
    left: 4%;
    top: 20%;
    width: 210px;
  }

  .faq-playful-card-2 {
    left: 4%;
    top: 62%;
    width: 195px;
  }

  .faq-playful-card-3 {
    left: 38%;
    top: 68%;
    width: 230px;
  }

  .faq-playful-card-4 {
    right: 4%;
    top: 18%;
    width: 215px;
  }

  .faq-playful-card-5 {
    right: 4%;
    top: 64%;
    width: 195px;
  }
}

@media (max-width: 767.98px) {
  .faq-playful-section {
    min-height: auto;
    padding: 50px 20px 60px;
  }

  .faq-playful-canvas {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .faq-playful-center {
    position: static;
    transform: none;
    margin-bottom: 34px;
    max-width: 100%;
  }

  .faq-playful-heading {
    font-size: 28px;
    letter-spacing: -0.8px;
    line-height: 1.15;
  }

  /* Switch Cards to Clean Stack Layout on Mobile */
  .faq-playful-cards-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 6;
  }

  .faq-playful-card {
    position: static;
    width: 100% !important;
    transform: none !important;
  }

  .faq-playful-card:hover {
    transform: translateY(-2px) !important;
  }

  /* Simplify Doodles on Mobile to avoid clutter */
  .doodle-zigzag,
  .doodle-sunburst-l,
  .doodle-sunburst-r,
  .doodle-cursor-blue,
  .doodle-lightning {
    display: none;
  }

  .doodle-sparkle-tl {
    left: 12px;
    top: 16px;
  }

  .doodle-cloud {
    right: 16px;
    left: auto;
    top: 20px;
    width: 40px;
    height: 24px;
  }

  .doodle-heart-large {
    display: none;
  }

  .doodle-wave-bl {
    left: 16px;
    bottom: 14px;
  }

  .doodle-spiral-br {
    right: 16px;
    bottom: 14px;
  }
}

/* ==========================================================================
   7. REDUCED MOTION PREFERENCE (A11y)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .faq-playful-doodle,
  .faq-playful-card,
  .faq-playful-toggle-icon,
  .faq-playful-body {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
