/* ===================================================================
   فارم أكاونت — Premium Polish v2
   Cookie consent · Exit-intent · Particles · Confetti · FAQ animation
   =================================================================== */

/* ===== COOKIE CONSENT ===== */
.pl-cookie {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 500px;
  margin: 0 auto;
  z-index: 95;
  background: linear-gradient(135deg, #2A3621, #3A4A2B);
  color: #EFE7D6;
  border: 1px solid rgba(184,134,47,0.4);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  transform: translateY(150%);
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
  font-family: 'Cairo', sans-serif;
}
.pl-cookie.pl-visible { transform: translateY(0); }
.pl-cookie-title {
  font-weight: 800;
  color: #D4A248;
  margin-bottom: 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pl-cookie-body {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(239,231,214,0.85);
  margin-bottom: 12px;
}
.pl-cookie-body a {
  color: #D4A248;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pl-cookie-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pl-cookie-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-width: 120px;
}
.pl-cookie-accept {
  background: #B8862F;
  color: white;
}
.pl-cookie-accept:hover { background: #D4A248; transform: translateY(-2px); }
.pl-cookie-reject {
  background: transparent;
  color: rgba(239,231,214,0.85);
  border: 1px solid rgba(239,231,214,0.3);
}
.pl-cookie-reject:hover { background: rgba(239,231,214,0.1); }

/* ===== EXIT INTENT MODAL ===== */
.pl-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(42, 54, 33, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.pl-modal-bg.pl-visible { opacity: 1; visibility: visible; }
.pl-modal {
  background: #FAF6EC;
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Cairo', sans-serif;
}
.pl-modal-bg.pl-visible .pl-modal { transform: scale(1) translateY(0); }
.pl-modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(58,74,43,0.1);
  border: none;
  border-radius: 50%;
  color: #3A4A2B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.pl-modal-close:hover {
  background: rgba(58,74,43,0.2);
  transform: rotate(90deg);
}
.pl-modal-header {
  background: linear-gradient(135deg, #3A4A2B, #4D6139);
  color: #EFE7D6;
  padding: 32px 32px 28px;
  text-align: center;
  position: relative;
}
.pl-modal-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 20px;
  background: #FAF6EC;
  border-radius: 24px 24px 0 0;
}
.pl-modal-emoji {
  font-size: 48px;
  margin-bottom: 8px;
}
.pl-modal-title {
  font-weight: 900;
  font-size: 24px;
  margin-bottom: 6px;
  color: #EFE7D6;
}
.pl-modal-title span { color: #D4A248; }
.pl-modal-sub {
  font-size: 14px;
  color: rgba(239,231,214,0.8);
}
.pl-modal-body {
  padding: 24px 32px 32px;
}
.pl-modal-body p {
  color: rgba(26,26,26,0.85);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 18px;
}
.pl-modal-body strong { color: #3A4A2B; font-weight: 800; }
.pl-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pl-modal-form input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid rgba(184,134,47,0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  background: white;
  color: #1A1A1A;
  transition: border-color 0.2s ease;
}
.pl-modal-form input:focus {
  outline: none;
  border-color: #B8862F;
}
.pl-modal-form button {
  padding: 14px 24px;
  background: #B8862F;
  color: white;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(184,134,47,0.4);
}
.pl-modal-form button:hover {
  background: #D4A248;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(184,134,47,0.5);
}
.pl-modal-trust {
  text-align: center;
  font-size: 11px;
  color: rgba(26,26,26,0.5);
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pl-modal-success {
  text-align: center;
  padding: 40px 32px;
  display: none;
}
.pl-modal-success.pl-show { display: block; }
.pl-modal-success-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

/* ===== HERO PARTICLES ===== */
.pl-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.pl-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #B8862F;
  border-radius: 50%;
  opacity: 0.4;
  animation: pl-float linear infinite;
}
.pl-particle:nth-child(3n) {
  width: 6px;
  height: 6px;
  opacity: 0.25;
  background: #D4A248;
}
.pl-particle:nth-child(5n) {
  width: 3px;
  height: 3px;
  opacity: 0.5;
}
@keyframes pl-float {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { transform: translateY(-100vh) translateX(40px); opacity: 0; }
}

/* ===== CONFETTI ===== */
.pl-confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.pl-confetti {
  position: absolute;
  width: 10px;
  height: 16px;
  top: -20px;
  opacity: 0;
  animation: pl-confetti-fall 3s cubic-bezier(0.55, 0, 0.45, 1) forwards;
}
@keyframes pl-confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotateZ(0); }
  100% { opacity: 0; transform: translateY(110vh) rotateZ(720deg); }
}

/* ===== ANIMATED FAQ ACCORDION ===== */
details.pl-faq {
  overflow: hidden;
}
details.pl-faq summary {
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
details.pl-faq summary::-webkit-details-marker { display: none; }
details.pl-faq summary > span:last-child {
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  display: inline-block;
}
details.pl-faq[open] summary > span:last-child {
  transform: rotate(45deg);
}
details.pl-faq > div {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.45s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.35s ease-out, margin 0.45s cubic-bezier(0.65, 0, 0.35, 1);
  margin-top: 0;
}
details.pl-faq[open] > div {
  max-height: 800px;
  opacity: 1;
  margin-top: 1rem;
}

/* ===== CINEMATIC TIMELINE ===== */
.pl-timeline {
  position: relative;
  padding: 32px 0;
}
.pl-timeline::before {
  content: '';
  position: absolute;
  top: 60px;
  bottom: 60px;
  right: 50%;
  width: 3px;
  background: linear-gradient(180deg, rgba(184,134,47,0.2), #B8862F, rgba(184,134,47,0.2));
  transform: translateX(50%);
}
@media (max-width: 768px) {
  .pl-timeline::before {
    right: 24px;
    transform: none;
  }
}
.pl-timeline-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.65, 0, 0.35, 1), transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}
.pl-timeline-step.pl-visible {
  opacity: 1;
  transform: translateX(0);
}
.pl-timeline-step:nth-child(even) {
  flex-direction: row-reverse;
}
@media (max-width: 768px) {
  .pl-timeline-step,
  .pl-timeline-step:nth-child(even) {
    flex-direction: row;
    padding-right: 60px;
  }
  .pl-timeline-step .pl-timeline-content { width: 100%; text-align: right; }
}
.pl-timeline-dot {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3A4A2B, #4D6139);
  color: #D4A248;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 20px;
  border: 4px solid #FAF6EC;
  box-shadow: 0 4px 16px rgba(58,74,43,0.25);
  position: relative;
  z-index: 2;
}
@media (max-width: 768px) {
  .pl-timeline-dot {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}
.pl-timeline-content {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(58,74,43,0.06);
  border-right: 4px solid #B8862F;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pl-timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(58,74,43,0.12);
}
.pl-timeline-content h4 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  color: #3A4A2B;
  font-size: 18px;
  margin-bottom: 4px;
}
.pl-timeline-content p {
  color: rgba(26,26,26,0.7);
  font-size: 14px;
  line-height: 1.6;
}
