/* ==========================================================================
   ChequePlus V2 - Custom Stylesheet & Design System
   Brand Primary: #8B5CF6 (Purple / Violet Fintech Aesthetic)
   Direction: RTL | Font: Vazirmatn
   ========================================================================== */

@import url('./Vazirmatn-font-face.css');

:root {
  /* ChequePlus Color Tokens */
  --primary: #8B5CF6;
  --primary-hover: #7C3AED;
  --primary-light: #EDE9FE;
  --primary-soft: #F5F3FF;
  --primary-dark: #6D28D9;
  --secondary: #1E1B4B;
  --dark-bg: #0F0B26;
  --surface: #FFFFFF;
  --surface-alt: #F8FAFC;

  /* Snapp-Inspired High-Legibility Color Tokens */
  --text-heading: #111827; /* Deep charcoal for titles and headings */
  --text-body: #374151;    /* Slate-700 / 800 for high-contrast Persian reading */
  --text-secondary: #4B5563; /* Slate-600 for card body & paragraphs */
  --text-muted: #64748B;   /* Slate-500 for secondary hints (accessible >= 4.5:1) */

  /* Responsive Typography Scale with clamp() */
  --font-hero-h1: clamp(2rem, 1.5rem + 2vw, 3rem);              /* 32px to 48px */
  --font-section-h2: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);    /* 24px to 34px */
  --font-card-h3: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);     /* 17px to 20px */
  --font-body: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);         /* 15px to 16px */
  --font-desc: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);     /* 14px to 15px */
  --font-btn: clamp(0.875rem, 0.85rem + 0.15vw, 1rem);          /* 14px to 16px */
  --font-minor: 0.75rem;                                         /* 12px absolute minimum for Persian */
}

/* Base Document Configuration */
html {
  scroll-behavior: smooth;
  direction: rtl;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  background-color: #F8FAFC;
  color: var(--text-body);
  text-align: right;
  line-height: 1.8;
  font-size: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Enhancements for Persian RTL (Snapp Standard) */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Vazirmatn', sans-serif;
  letter-spacing: 0 !important;
  color: var(--text-heading);
  line-height: 1.35;
  font-weight: 800;
}

h1.hero-title {
  font-size: var(--font-hero-h1);
  line-height: 1.28;
  font-weight: 900;
}

h2.section-title {
  font-size: var(--font-section-h2);
  line-height: 1.35;
  font-weight: 800;
}

h3.card-title {
  font-size: var(--font-card-h3);
  line-height: 1.45;
  font-weight: 700;
}

p.body-lead {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.85;
  color: var(--text-secondary);
}

/* Persian Text Legibility Guardrails (Prevent microscopic unreadable text) */
.text-\[8px\], .text-\[9px\], .text-\[10px\], .text-\[11px\] {
  font-size: 0.75rem !important; /* 12px min readable size */
  line-height: 1.55 !important;
}

/* Ensure secondary slate text has accessible contrast on light cards */
.text-slate-400:not(footer *):not([class*="bg-[#0F0B26]"] *) {
  color: #64748B !important; /* Upgrade washed-out slate-400 to slate-500 */
}

/* Custom Gradients & Surfaces */
.bg-gradient-primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
}

.bg-gradient-hero {
  background: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.08) 0%, rgba(248, 250, 252, 0) 70%),
              radial-gradient(circle at 85% 65%, rgba(196, 181, 253, 0.07) 0%, rgba(255, 255, 255, 0) 60%);
}

.text-gradient {
  background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.shadow-purple-glow {
  box-shadow: 0 15px 35px -5px rgba(139, 92, 246, 0.35);
}

.shadow-purple-soft {
  box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.12);
}

.shadow-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.shadow-card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -12px rgba(139, 92, 246, 0.16);
}

/* Realistic Smartphone Mockup for ChequePlus */
.phone-mockup {
  position: relative;
  width: 285px;
  height: 560px;
  background: #111424;
  border-radius: 44px;
  padding: 8px;
  box-shadow: 
    0 0 0 2px #393E58,
    0 25px 60px -15px rgba(30, 27, 75, 0.35),
    0 10px 20px -5px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
  border: 3px solid #1E2238;
}

.phone-mockup-sm {
  width: 235px;
  height: 460px;
  border-radius: 38px;
  padding: 7px;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #F8FAFC;
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-mockup-sm .phone-screen {
  border-radius: 30px;
}

/* Dynamic Island / Notch */
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  background: #111424;
  border-radius: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.notch-camera {
  width: 8px;
  height: 8px;
  background: #1C233D;
  border-radius: 50%;
  border: 1px solid #2B3356;
}

.notch-sensor {
  width: 5px;
  height: 5px;
  background: #181F38;
  border-radius: 50%;
}

/* Floating 3D Spheres (ChequePlus Lavender Theme) */
.floating-sphere {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: drop-shadow(0 15px 25px rgba(139, 92, 246, 0.22));
}

.sphere-1 {
  width: 65px;
  height: 65px;
  background: radial-gradient(circle at 30% 30%, #DDD6FE 0%, #8B5CF6 70%, #6D28D9 100%);
  animation: floatSlow 6s ease-in-out infinite;
}

.sphere-2 {
  width: 45px;
  height: 45px;
  background: radial-gradient(circle at 30% 30%, #EDE9FE 0%, #A78BFA 70%, #8B5CF6 100%);
  animation: floatSlow 7s ease-in-out infinite 1s;
}

.sphere-3 {
  width: 85px;
  height: 85px;
  background: radial-gradient(circle at 35% 35%, #F5F3FF 0%, #7C3AED 85%);
  opacity: 0.8;
  animation: floatSlow 8s ease-in-out infinite 2s;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(-4deg);
  }
}

/* Step Timeline Line in How It Works (RTL Centered) */
.timeline-line {
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #DDD6FE 0%, #8B5CF6 50%, #DDD6FE 100%);
  z-index: 1;
}

@media (max-width: 1023px) {
  .timeline-line {
    right: 28px;
    left: auto;
    transform: none;
  }
}

/* Glassmorphism Card */
.glass-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Carousel Scroll Snapping */
.blog-carousel-container {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.blog-carousel-item {
  scroll-snap-align: start;
}

/* FAQ Accordion Transitions */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin-top 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 320px;
  opacity: 1;
  margin-top: 14px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  background-color: #8B5CF6;
  color: #FFFFFF;
}

/* Accessible touch targets & focus rings */
button, a {
  touch-action: manipulation;
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #8B5CF6;
  outline-offset: 3px;
}

/* Certificate Document Presentation & Aspect Ratio Preservation */
.doc-preview-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.doc-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(139, 92, 246, 0.15);
}

.doc-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.doc-preview-card:hover .doc-frame img {
  transform: scale(1.03);
}

/* Graceful Image Fallback */
.doc-frame.image-fallback img {
  display: none;
}
.doc-frame.image-fallback .fallback-content {
  display: flex !important;
}

/* Accessible Lightbox Modal */
#certModal.active {
  display: flex !important;
  opacity: 1;
}
#certModal.active .cert-modal-box {
  transform: scale(1);
}

.cert-modal-box {
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#certModal[aria-hidden="true"] { visibility: hidden; }
#certModal[aria-hidden="false"] { visibility: visible; }

/* Accurate scroll margin for sticky header offset on certificate sections */
#business-license,
#nsr-membership,
#enamad,
#payment-gateways {
  scroll-margin-top: 100px;
}

/* Samsung Galaxy S26 Ultra Device Mockup Structure */
.samsung-s26-wrapper {
  position: relative;
  width: 100%;
  max-width: 310px;
  aspect-ratio: 540 / 1086;
  margin: 0 auto;
  filter: drop-shadow(0 25px 45px rgba(15, 23, 42, 0.2));
  transition: transform 0.3s ease, filter 0.3s ease;
}

@media (min-width: 640px) {
  .samsung-s26-wrapper {
    max-width: 330px;
  }
}

.samsung-s26-wrapper:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 30px 55px rgba(139, 92, 246, 0.25));
}

/* Device Frame Image Overlay */
.samsung-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 20;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Inner Screen Viewport inside the S26 Ultra Frame */
.samsung-screen-viewport {
  position: absolute;
  top: 2.03%;
  bottom: 2.21%;
  left: 3.70%;
  right: 4.07%;
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
  z-index: 10;
}

.samsung-screen-viewport .phone-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease-in-out, visibility 0.45s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
}

.samsung-screen-viewport .phone-carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.samsung-screen-viewport .phone-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Indicator Dots inside the Samsung Screen */
.samsung-screen-viewport .phone-carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 30;
  background: rgba(15, 23, 42, 0.65);
  padding: 4px 10px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.samsung-screen-viewport .phone-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.samsung-screen-viewport .phone-dot:hover {
  background: rgba(255, 255, 255, 0.9);
}

.samsung-screen-viewport .phone-dot.active {
  width: 16px;
  border-radius: 9999px;
  background: #FFFFFF;
}

/* Download Section Dual Phone Mockups (Samsung S26 Ultra & iPhone 17 Pro Max) */
.download-phones-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.download-mockup-img {
  width: 215px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 540 / 1086;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 25px 40px rgba(15, 23, 42, 0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}

@media (min-width: 640px) {
  .download-mockup-img {
    width: 235px;
  }
}

.download-phone-back {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-phone-back:hover {
  transform: rotate(4deg) scale(0.93) translateX(-2rem);
}

.download-phone-front {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-phone-front:hover {
  transform: rotate(-1deg) translateY(-4px) translateX(1rem);
}

/* Fallback & Legacy Phone Mockup Carousel */
.phone-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F8FAFC;
}

.phone-carousel-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.phone-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Subtle Dots Navigation Indicator inside Phone Screen */
.phone-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 25;
  background: rgba(15, 23, 42, 0.45);
  padding: 3px 8px;
  border-radius: 9999px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.phone-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.phone-dot.active {
  width: 14px;
  border-radius: 4px;
  background: #FFFFFF;
}

/* Blog Horizontal Scroll Carousel (Desktop & Mobile) */
.blog-carousel-container {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.blog-carousel-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@media (prefers-reduced-motion: reduce) {
  .phone-carousel-slide {
    transition: none !important;
  }
  .blog-carousel-container {
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Self-Contained Fallback Utilities & Visual Enhancements
   ========================================================================== */

/* Hero Section Subtle Radiant Background */
.bg-gradient-hero {
  background: radial-gradient(circle at 80% 20%, rgba(237, 233, 254, 0.6) 0%, rgba(248, 250, 252, 1) 50%, #FAF8FF 100%) !important;
}

/* Experience Visual Card (Dark Navy / Purple Slate) */
.experience-visual-card {
  background: linear-gradient(135deg, #1E1B4B 0%, #0F0B26 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(15, 11, 38, 0.45) !important;
  border-radius: 36px !important;
}

.experience-visual-card .item-row {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 1rem !important;
}

/* Timeline Connecting Line */
.timeline-line {
  position: absolute;
  top: 3rem;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: linear-gradient(180deg, #8B5CF6 0%, #A78BFA 50%, #C4B5FD 100%) !important;
  border-radius: 9999px;
  z-index: 0;
}

/* Download Banner Card */
.download-banner-card {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%) !important;
  border-radius: 40px !important;
  color: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.35) !important;
}

/* Blog Article Top Header Gradients & Icons */
.blog-header-amber {
  background: linear-gradient(135deg, #FDE68A 0%, #FCD34D 50%, #FEF3C7 100%) !important;
}
.blog-icon-amber {
  background: rgba(255, 255, 255, 0.65) !important;
  color: #B45309 !important;
}

.blog-header-purple {
  background: linear-gradient(135deg, #DDD6FE 0%, #C4B5FD 50%, #EDE9FE 100%) !important;
}
.blog-icon-purple {
  background: rgba(255, 255, 255, 0.65) !important;
  color: #8B5CF6 !important;
}

.blog-header-blue {
  background: linear-gradient(135deg, #BAE6FD 0%, #7DD3FC 50%, #E0F2FE 100%) !important;
}
.blog-icon-blue {
  background: rgba(255, 255, 255, 0.65) !important;
  color: #1D4ED8 !important;
}

.blog-header-emerald {
  background: linear-gradient(135deg, #A7F3D0 0%, #6EE7B7 50%, #D1FAE5 100%) !important;
}
.blog-icon-emerald {
  background: rgba(255, 255, 255, 0.65) !important;
  color: #047857 !important;
}


