/* ==========================================================================
   HOMEPAGE FAQ - LUXURY ANIMATED SCROLLYTELLING ACCORDION
   Inspired by Davide Cattaneo (davidecattaneo.it) - Precision Industrial Design
   ========================================================================== */

.home-faq.faq-section {
  position: relative;
  background: 
    radial-gradient(circle at 12% 28%, rgba(36, 188, 180, 0.08) 0%, transparent 48%),
    radial-gradient(circle at 88% 75%, rgba(229, 184, 105, 0.05) 0%, transparent 45%),
    #06151a;
  border-block: 1px solid rgba(57, 229, 219, 0.12);
  padding: clamp(40px, 4.5vw, 68px) 0;
  color: #edf3ef;
  overflow: hidden;
}

/* Subtle Industrial Background Texture */
.home-faq.faq-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(57, 229, 219, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.7;
}

.home-faq .faq-layout {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 4vw, 54px);
  align-items: start;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   LEFT COLUMN: LUXURY CARD WITH GLOWING BOX SHADOW
   -------------------------------------------------------------------------- */
.home-faq-intro {
  position: sticky;
  top: 90px;
  background: linear-gradient(165deg, rgba(13, 37, 45, 0.88) 0%, rgba(6, 20, 25, 0.96) 100%);
  border: 1px solid rgba(57, 229, 219, 0.22);
  border-radius: 20px;
  padding: clamp(22px, 2.6vw, 32px);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 35px rgba(57, 229, 219, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: 
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

/* Card Top Glowing Beam */
.home-faq-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #39e5db 30%, #6ee7b7 70%, transparent);
  box-shadow: 0 0 14px rgba(57, 229, 219, 0.85);
  pointer-events: none;
}

/* Card Ambient Corner Radial Glow */
.home-faq-intro::after {
  content: "";
  position: absolute;
  top: -60px;
  left: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 229, 219, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

/* Card Hover Lift & Glow */
.home-faq-intro:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 229, 219, 0.42);
  box-shadow: 
    0 32px 75px rgba(0, 0, 0, 0.7),
    0 0 55px rgba(57, 229, 219, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* Eyebrow with Live Animated Pulse Dot */
.home-faq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #55e6dc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: rgba(57, 229, 219, 0.08);
  border: 1px solid rgba(57, 229, 219, 0.22);
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(57, 229, 219, 0.12);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.home-faq-eyebrow:hover {
  border-color: rgba(57, 229, 219, 0.45);
  transform: translateY(-1px);
}

.faq-live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39e5db;
  box-shadow: 0 0 8px #39e5db;
}

.faq-live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid #39e5db;
  animation: faqPulseDot 2s infinite cubic-bezier(0.24, 0, 0.38, 1);
}

@keyframes faqPulseDot {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Heading with High-Tech Shimmering Gradient */
.home-faq .home-faq-intro h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: #ffffff;
}

.home-faq-intro h2 span {
  display: block;
  background: linear-gradient(135deg, #39e5db 0%, #7ef2ec 50%, #f4cb84 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(57, 229, 219, 0.25));
}

.home-faq .home-faq-intro > p {
  margin: 0;
  color: #9cb3ba;
  font-size: 13.5px;
  line-height: 1.65;
}

/* Explore Link as a Modern Pill Button inside the Card */
.home-faq .home-faq-intro > .home-faq-all {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 16px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(57, 229, 219, 0.08);
  border: 1px solid rgba(57, 229, 219, 0.24);
  border-radius: 10px;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-faq-all span {
  display: inline-block;
  font-size: 15px;
  color: #39e5db;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-faq-all:hover {
  background: rgba(57, 229, 219, 0.16);
  border-color: #39e5db;
  color: #39e5db;
  box-shadow: 0 0 22px rgba(57, 229, 219, 0.25);
  transform: translateY(-1px);
}

.home-faq-all:hover span {
  transform: translate(3px, -3px);
}

/* Glassmorphism Inner Help Sub-Card */
.home-faq-help {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(4, 16, 21, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.home-faq-help:hover {
  transform: translateY(-2px);
  border-color: rgba(57, 229, 219, 0.35);
  background: rgba(4, 16, 21, 0.8);
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 20px rgba(57, 229, 219, 0.12);
}

.home-faq-help-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  background: rgba(57, 229, 219, 0.1);
  border: 1px solid rgba(57, 229, 219, 0.3);
  border-radius: 50%;
  color: #39e5db;
  box-shadow: 0 0 14px rgba(57, 229, 219, 0.2);
  transition: transform 0.35s ease, background 0.35s ease;
}

.home-faq-help-icon svg {
  width: 18px;
  height: 18px;
}

.home-faq-help:hover .home-faq-help-icon {
  transform: scale(1.08) rotate(4deg);
  background: rgba(57, 229, 219, 0.18);
}

.home-faq-help strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.home-faq-help a {
  display: inline-flex;
  align-items: center;
  color: #39e5db;
  font-size: 11.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-faq-help a span {
  margin-left: 5px;
  transition: transform 0.25s ease;
}

.home-faq-help a:hover span {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   RIGHT COLUMN: LUXURY INTERACTIVE ACCORDION CARDS
   -------------------------------------------------------------------------- */
.home-faq-list-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(57, 229, 219, 0.15);
  color: #8da4a8;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 600;
}

.home-faq-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a6c0c5;
}

.home-faq-counter {
  font-variant-numeric: tabular-nums;
  color: #39e5db;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home-faq-counter .active-count {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(57, 229, 219, 0.6);
}

.home-faq-counter .divider {
  color: rgba(57, 229, 219, 0.4);
  margin: 0 2px;
}

/* Accordion Card Container */
.home-faq .home-faq-list details {
  position: relative;
  margin: 0 0 8px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(10, 27, 33, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transition: 
    border-color 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
    background 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.35s cubic-bezier(0.165, 0.84, 0.44, 1),
    transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Left Accent Indicator Line */
.home-faq .home-faq-list details::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3.5px;
  height: 0;
  background: linear-gradient(180deg, #39e5db 0%, #24bcb4 100%);
  box-shadow: 0 0 12px rgba(57, 229, 219, 0.8);
  transition: height 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 2;
}

/* Hover State */
.home-faq .home-faq-list details:hover {
  border-color: rgba(57, 229, 219, 0.28);
  background: rgba(14, 38, 46, 0.8);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

/* Active / Open State */
.home-faq .home-faq-list details[open],
.home-faq .home-faq-list details.is-open {
  border-color: rgba(57, 229, 219, 0.45);
  background: rgba(12, 34, 41, 0.95);
  box-shadow: 
    0 20px 45px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(57, 229, 219, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(0);
}

.home-faq .home-faq-list details[open]::before,
.home-faq .home-faq-list details.is-open::before {
  height: 100%;
}

/* Summary Trigger */
.home-faq .home-faq-list summary {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: #e6f2ee;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: color 0.25s ease;
}

.home-faq-list summary::-webkit-details-marker {
  display: none;
}

/* Question Title Shift on Hover */
.home-faq-list summary > span:nth-child(2) {
  display: block;
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), color 0.3s ease;
}

.home-faq-list details:hover summary > span:nth-child(2) {
  transform: translateX(5px);
  color: #ffffff;
}

.home-faq-list details[open] summary > span:nth-child(2),
.home-faq-list details.is-open summary > span:nth-child(2) {
  color: #39e5db;
  transform: translateX(4px);
}

/* Question Number Badge */
.home-faq-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #7d9ba0;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
}

.home-faq-list details:hover .home-faq-number {
  color: #39e5db;
  border-color: rgba(57, 229, 219, 0.3);
  background: rgba(57, 229, 219, 0.08);
}

.home-faq-list details[open] .home-faq-number,
.home-faq-list details.is-open .home-faq-number {
  color: #041419;
  background: #39e5db;
  border-color: #39e5db;
  box-shadow: 0 0 14px rgba(57, 229, 219, 0.6);
}

/* Rotating Toggle Circle */
.home-faq-toggle {
  position: relative;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-faq-toggle::before,
.home-faq-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  background: #a9c7c2;
  transform: translate(-50%, -50%);
  transition: transform 0.35s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.3s ease;
}

.home-faq-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.home-faq-list details:hover .home-faq-toggle {
  border-color: rgba(57, 229, 219, 0.5);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(57, 229, 219, 0.25);
}

.home-faq-list details:hover .home-faq-toggle::before,
.home-faq-list details:hover .home-faq-toggle::after {
  background: #ffffff;
}

/* Active State for Toggle: Smooth Rotation & Spin */
.home-faq details[open] .home-faq-toggle,
.home-faq details.is-open .home-faq-toggle {
  background: rgba(57, 229, 219, 0.15);
  border-color: #39e5db;
  box-shadow: 0 0 16px rgba(57, 229, 219, 0.4);
  transform: rotate(180deg) scale(1.06);
}

.home-faq details[open] .home-faq-toggle::before,
.home-faq details.is-open .home-faq-toggle::before {
  background: #39e5db;
}

.home-faq details[open] .home-faq-toggle::after,
.home-faq details.is-open .home-faq-toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

/* --------------------------------------------------------------------------
   FLUID CSS GRID ANIMATION ENGINE (ZERO-JUMP ACCORDION)
   -------------------------------------------------------------------------- */
.home-faq .home-faq-anim-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: 
    grid-template-rows 0.34s cubic-bezier(0.165, 0.84, 0.44, 1),
    opacity 0.26s ease;
}

.home-faq details.is-open .home-faq-anim-wrapper {
  grid-template-rows: 1fr;
  opacity: 1;
}

.home-faq details.is-closing .home-faq-anim-wrapper {
  grid-template-rows: 0fr !important;
  opacity: 0 !important;
}

/* Fallback for when JS wrapper is not yet initialized */
.home-faq details[open]:not(.is-closing) .home-faq-anim-wrapper {
  grid-template-rows: 1fr;
  opacity: 1;
}

.home-faq-answer {
  overflow: hidden;
  padding: 0 18px 14px 58px;
  transform: translateY(-6px);
  transition: transform 0.34s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.home-faq details.is-open .home-faq-answer,
.home-faq details[open]:not(.is-closing) .home-faq-answer {
  transform: translateY(0);
}

.home-faq .home-faq-answer p {
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #9cb1b5;
}

.home-faq-answer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #39e5db;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.home-faq-answer a span {
  transition: transform 0.2s ease;
}

.home-faq-answer a:hover {
  color: #ffffff;
}

.home-faq-answer a:hover span {
  transform: translate(3px, -3px);
}

/* Footer Note */
.home-faq .home-faq-note {
  margin: 22px 0 0 6px;
  padding: 0;
  color: #799196;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Accessibility Focus States */
.home-faq :is(summary, a):focus-visible {
  outline: 2px solid #39e5db;
  outline-offset: 4px;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .home-faq .faq-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .home-faq-intro {
    position: static;
  }
  .home-faq .home-faq-intro > p {
    max-width: 560px;
  }
  .home-faq-help {
    margin-top: 32px;
    max-width: 560px;
  }
}

@media (max-width: 600px) {
  .home-faq .home-faq-list summary {
    grid-template-columns: 28px 1fr 28px;
    gap: 12px;
    padding: 18px 14px;
    font-size: 14.5px;
  }
  .home-faq-number {
    width: 28px;
    height: 28px;
    font-size: 10px;
  }
  .home-faq-toggle {
    width: 28px;
    height: 28px;
  }
  .home-faq-answer {
    padding: 0 14px 18px 54px;
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-faq *,
  .home-faq *::before,
  .home-faq *::after {
    transition: none !important;
    animation: none !important;
  }
}
