/* ===== RiyalDirect — Calm & Professional UI v2 ===== */

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
}

::selection {
  background: #0f766e;
  color: #fff;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Material Symbols */
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ===== ACCENT CLASSES ===== */
.accent-text {
  color: #0f766e;
}

.gold-text {
  color: #fff;
}

.accent-underline {
  position: relative;
  display: inline-block;
}

.accent-underline::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #0f766e;
  border-radius: 2px;
  opacity: 0.5;
}

/* ===== NAVBAR ===== */
#navbar {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 2px 12px rgba(0, 0, 0, 0.03);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* Nav link hover underline */
#navbar a.text-gray-500 {
  position: relative;
}

#navbar a.text-gray-500::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0f766e;
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%);
}

#navbar a.text-gray-500:hover::after {
  width: 100%;
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-18px) rotate(2deg);
  }
}

@keyframes gentlePulse {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 0.8;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ANIMATION CLASSES ===== */
.anim-fade-up {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-fade-down {
  animation: fadeInDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-scale-in {
  animation: fadeInScale 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.animate-modal-in {
  animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wa-float-pulse {
  animation: pulseRing 2.5s infinite;
}

.animate-float-slow {
  animation: floatSlow 7s ease-in-out infinite;
}

.animate-bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ===== SCROLL REVEAL ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.scroll-reveal:nth-child(1) {
  transition-delay: 0s;
}

.scroll-reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.scroll-reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.scroll-reveal:nth-child(4) {
  transition-delay: 0.3s;
}

.scroll-reveal:nth-child(5) {
  transition-delay: 0.4s;
}

/* Section headings reveal */
.section-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Normalize section heading spacing for a tighter business layout */
#features .text-center.mb-16,
#steps .text-center.mb-16,
#testimonials .text-center.mb-16,
#faq .text-center.mb-16 {
  margin-bottom: clamp(1.9rem, 3vw, 2.35rem) !important;
}

#proof-testimonials .text-center.mb-12,
#riyal-cash .text-center.mb-12 {
  margin-bottom: clamp(1.6rem, 2.6vw, 2.1rem) !important;
}

/* Tighten the transition from proof slider to FAQ on desktop */
#proof-testimonials {
  padding-bottom: clamp(1.75rem, 3vw, 2.4rem) !important;
}

#faq {
  padding-top: clamp(1.9rem, 3.2vw, 2.6rem) !important;
}

/* Consistent section header typography (business look) */
#features .text-center h2,
#steps .text-center h2,
#proof-testimonials .text-center h2,
#faq .text-center h2,
#riyal-cash .text-center h2 {
  font-size: clamp(1.9rem, 2.5vw, 2.45rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}

#features .text-center p,
#steps .text-center p,
#proof-testimonials .text-center p,
#faq .text-center p,
#riyal-cash .text-center p {
  color: #64748b !important;
  line-height: 1.65;
  max-width: 42rem;
}

#features .text-center > p,
#steps .text-center > p,
#proof-testimonials .text-center > p,
#faq .text-center > p,
#riyal-cash .text-center > p {
  margin-top: 0.75rem !important;
}

#features .text-center > span,
#steps .text-center > span,
#proof-testimonials .text-center > span,
#faq .text-center > span,
#riyal-cash .text-center > span {
  margin-bottom: 0.55rem !important;
}

/* ===== GRADIENT BORDER HOVER ===== */
.gradient-border-hover {
  position: relative;
}

.gradient-border-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, #0f766e, transparent);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gradient-border-hover:hover::before {
  opacity: 1;
}

/* ===== AMBIENT DECORATION ===== */
.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.04;
  pointer-events: none;
  animation: gentlePulse 10s ease-in-out infinite;
}

/* ===== HERO ===== */
.hero-gradient-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.35) 35%,
    rgba(0, 0, 0, 0.55) 70%,
    rgba(5, 46, 38, 0.65) 100%
  );
}

/* Hero stagger animations */
.hero-badge {
  animation: fadeInDown 0.6s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-title {
  animation: fadeInUp 0.8s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-subtitle {
  animation: fadeInUp 0.8s 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.18);
}

.hero-calc {
  animation: fadeInUp 0.8s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-calc > div {
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    0 16px 40px rgba(2, 6, 23, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 0.85rem !important;
}

.hero-calc h4,
.hero-calc #calc-rate-note {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.hero-calc #calc-rate-note {
  color: rgba(255, 255, 255, 0.78) !important;
}

.hero-calc #calc-live-data {
  color: rgba(255, 255, 255, 0.9) !important;
}

.hero-calc input,
.hero-calc button {
  border-radius: 0.85rem !important;
}

.hero-calc button {
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22) !important;
}

.hero-trust {
  animation: fadeInUp 0.6s 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
  row-gap: 0.5rem;
  column-gap: 1.25rem;
}

.hero-trust > div {
  color: rgba(255, 255, 255, 0.68) !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
  backdrop-filter: blur(8px);
}

.hero-trust > div span:last-child {
  color: rgba(255, 255, 255, 0.82) !important;
  font-weight: 600;
}

/* Clear keyboard focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(20, 184, 166, 0.95);
  outline-offset: 2px;
}

/* ===== TRUST BADGE SHIMMER ===== */
.trust-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.06) 100%
  );
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

/* ===== STATS ===== */
.stats-bar .count-up {
  letter-spacing: -0.02em;
}

/* ===== FEATURE CARDS ===== */
#features .grid > div {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#features .grid > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #0f766e;
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#features .grid > div:hover::before {
  transform: scaleX(1);
}

#features .grid > div p {
  flex-grow: 1;
}

/* Feature icon animation on hover */
#features .grid > div:hover .material-symbols-outlined {
  transform: scale(1.1);
}

#features .grid > div .material-symbols-outlined {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== STEP CARDS ===== */
#steps .grid > div {
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Step number badge pulse on hover */
#steps .grid > div:hover > div:first-child {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 20px rgba(15, 118, 110, 0.2);
}

#steps .grid > div > div:first-child {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== TESTIMONIAL CARDS ===== */
#testimonials .grid > div {
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#testimonials .grid > div p.italic {
  flex-grow: 1;
}

/* ===== CARD SYSTEM CONSISTENCY ===== */
#features .grid > div,
.proof-card,
.faq-item,
#riyal-cash .bg-background-card {
  border-radius: 1rem !important;
  border-color: rgba(15, 23, 42, 0.07) !important;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.04);
}

#features .grid > div:hover,
.proof-card:hover,
.faq-item:hover,
#riyal-cash .bg-background-card:hover {
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.07);
}

#features .grid > div,
#riyal-cash .bg-background-card {
  background-image: linear-gradient(180deg, #ffffff, #fbfcfd);
}

/* ===== PROOF SWIPE TESTIMONIALS ===== */
.proof-carousel-shell {
  position: relative;
}

.proof-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 0.25rem 0.1rem 0.5rem;
  scrollbar-width: none;
}

.proof-carousel::-webkit-scrollbar {
  display: none;
}

.proof-card {
  flex: 0 0 86%;
  scroll-snap-align: start;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.05);
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease;
}

.proof-card-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.proof-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

.proof-date {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 600;
}

.proof-shot {
  min-height: 220px;
  border-radius: 0.9rem;
  border: 1px dashed #99f6e4;
  background:
    radial-gradient(
      circle at top left,
      rgba(20, 184, 166, 0.15),
      transparent 56%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(15, 118, 110, 0.14),
      transparent 52%
    ),
    #f0fdfa;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.25rem;
  color: #115e59;
  overflow: hidden;
}

.proof-shot .material-symbols-outlined {
  font-size: 2rem;
  opacity: 0.85;
}

.proof-shot img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0.8rem;
}

.proof-shot p {
  font-size: 0.9rem;
  font-weight: 700;
}

.proof-shot small {
  font-size: 0.75rem;
  color: #0f766e;
}

.proof-copy {
  margin-top: 0.8rem;
  color: #4b5563;
  line-height: 1.6;
  font-size: 0.9rem;
}

.proof-author {
  margin-top: 0.7rem;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
}

.proof-nav {
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
  color: #0f766e;
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 20;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.1);
  backdrop-filter: blur(8px);
}

.proof-prev {
  left: -0.9rem;
}

.proof-next {
  right: -0.9rem;
}

.proof-nav:hover {
  background: #ffffff;
  color: #0d6560;
  border-color: rgba(15, 118, 110, 0.25);
  transform: translateY(-50%) scale(1.04);
}

.proof-progress {
  min-height: 0.75rem;
}

.proof-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #cbd5e1;
  opacity: 0.9;
  transition:
    width 0.25s ease,
    background-color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.proof-dot.is-active {
  width: 1.15rem;
  background: #0f766e;
  opacity: 1;
}

@media (min-width: 768px) {
  .proof-card {
    flex-basis: 48%;
  }
}

/* ===== FAQ ===== */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-icon-el {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item:hover {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.06);
  border-color: rgba(15, 118, 110, 0.12);
}

.faq-item.is-open {
  border-color: rgba(15, 118, 110, 0.18);
  box-shadow:
    0 12px 28px rgba(15, 118, 110, 0.07),
    inset 3px 0 0 rgba(15, 118, 110, 0.9);
}

.faq-item.is-open .faq-btn {
  background: rgba(15, 118, 110, 0.02);
}

.faq-item.is-open .faq-icon-el {
  background: #0f766e;
  color: #ffffff;
}

/* ===== CASH SECTION ===== */
#riyal-cash .bg-background-card {
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#riyal-cash .bg-background-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.07);
}

#riyal-cash .flex-wrap span {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: default;
}

#riyal-cash .flex-wrap span:hover {
  background: #0f766e;
  color: white;
  border-color: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.2);
}

#riyal-cash li {
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 4px 8px;
  border-radius: 8px;
}

#riyal-cash li:hover {
  background: rgba(15, 118, 110, 0.04);
  padding-left: 12px;
}

/* ===== WA MODAL ===== */
#wa-modal {
  display: none;
}

#wa-modal.active {
  display: flex;
}

#wa-modal a {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#wa-modal a:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border-color: rgba(15, 118, 110, 0.3);
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex !important;
  pointer-events: none;
}

#mobile-menu.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#mobile-menu a {
  transition: all 0.25s ease;
  opacity: 0;
  transform: translateX(20px);
}

#mobile-menu.active a {
  opacity: 1;
  transform: translateX(0);
}

#mobile-menu.active a:nth-child(1) {
  transition-delay: 0.1s;
}

#mobile-menu.active a:nth-child(2) {
  transition-delay: 0.15s;
}

#mobile-menu.active a:nth-child(3) {
  transition-delay: 0.2s;
}

#mobile-menu.active a:nth-child(4) {
  transition-delay: 0.25s;
}

#mobile-menu.active a:nth-child(5) {
  transition-delay: 0.3s;
}

#mobile-menu.active button {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.35s;
}

#mobile-menu.active button {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu a:hover {
  color: #0f766e;
  padding-left: 8px;
}

/* ===== STICKY CTA ===== */
#sticky-cta {
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#sticky-cta.visible {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

/* ===== WHATSAPP FLOAT ===== */
#whatsapp-float {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.3);
}

/* ===== FOOTER ===== */
footer a {
  transition: all 0.25s ease;
}

footer a:hover {
  padding-left: 3px;
}

footer li {
  transition: all 0.2s ease;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] #wa-modal a:hover {
  transform: translateX(-4px);
}

[dir="rtl"] #mobile-menu a:hover {
  padding-left: 0;
  padding-right: 8px;
}

[dir="rtl"] footer a:hover {
  padding-left: 0;
  padding-right: 3px;
}

/* ===== INPUT ===== */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input:focus {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.12) !important;
  transition: box-shadow 0.2s ease;
}

/* ===== SECTION GENERAL ===== */
section {
  position: relative;
  overflow: hidden;
  padding-top: clamp(2.75rem, 4.5vw, 3.6rem);
  padding-bottom: clamp(2.75rem, 4.5vw, 3.6rem);
}

section.py-20 {
  padding-top: clamp(2.85rem, 4.8vw, 3.8rem) !important;
  padding-bottom: clamp(2.85rem, 4.8vw, 3.8rem) !important;
}

section.py-24 {
  padding-top: clamp(3.2rem, 5.4vw, 4.2rem) !important;
  padding-bottom: clamp(3.2rem, 5.4vw, 4.2rem) !important;
}

/* ===== SMOOTH TRANSITIONS ===== */
a,
button {
  transition: all 0.2s ease;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Navbar height */
  #navbar .h-20 {
    height: 4rem;
  }

  /* Hero */
  .min-h-\[90vh\] {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .min-h-\[90vh\] h2 {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  .min-h-\[90vh\] .text-lg {
    font-size: 0.9rem !important;
  }

  /* Calculator mobile */
  .max-w-3xl .grid {
    gap: 0.5rem;
  }

  .max-w-3xl input {
    font-size: 1rem !important;
    padding-top: 1.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .max-w-3xl button {
    min-height: 48px !important;
  }

  /* Trust strip mobile */
  .hero-trust {
    gap: 0.75rem !important;
  }

  .hero-trust > div {
    font-size: 9px !important;
  }

  /* Section spacing */
  section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }

  section.py-24 {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  /* Tighten section header gaps on mobile */
  #features .text-center.mb-16,
  #steps .text-center.mb-16,
  #testimonials .text-center.mb-16,
  #faq .text-center.mb-16 {
    margin-bottom: 2.25rem !important;
  }

  #proof-testimonials .text-center.mb-12,
  #riyal-cash .text-center.mb-12 {
    margin-bottom: 2rem !important;
  }

  /* Stats mobile */
  .stats-bar .count-up {
    font-size: 1.5rem !important;
  }

  .stats-bar .w-14 {
    width: 2.75rem !important;
    height: 2.75rem !important;
  }

  .stats-bar .text-2xl {
    font-size: 1.5rem !important;
  }

  /* Cards mobile */
  #features .grid > div,
  #steps .grid > div,
  #testimonials .grid > div {
    padding: 1.25rem;
  }

  .proof-card {
    flex-basis: 88%;
  }

  .proof-nav {
    display: none !important;
  }

  /* Feature heading mobile */
  .text-3xl {
    font-size: 1.625rem !important;
  }

  /* Steps mobile: cards smaller padding */
  #steps .grid > div {
    padding: 1.25rem;
    padding-top: 2rem;
  }

  #steps .absolute.-top-5 {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  /* FAQ mobile */
  .faq-btn {
    padding: 1rem !important;
  }

  .faq-btn span:first-child {
    font-size: 0.875rem !important;
  }

  .faq-answer p {
    padding: 0 1rem 1rem !important;
    font-size: 0.8125rem !important;
  }

  /* Cash section mobile */
  #riyal-cash .flex-wrap span {
    padding: 0.375rem 0.625rem !important;
    font-size: 0.75rem !important;
  }

  /* Footer mobile */
  footer .grid {
    gap: 1.5rem;
  }

  footer h4 {
    margin-bottom: 0.75rem !important;
    font-size: 1rem !important;
  }

  /* CTA mobile */
  section.py-24 h2 {
    font-size: 1.5rem !important;
  }

  section.py-24 p {
    font-size: 0.9rem !important;
  }

  section.py-24 button {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.875rem !important;
  }

  /* Hide ambient blobs */
  .ambient-blob {
    display: none;
  }

  /* Sticky CTA mobile */
  #sticky-cta.visible {
    display: flex;
  }

  /* WA float mobile - smaller */
  #whatsapp-float {
    width: 3.25rem;
    height: 3.25rem;
    bottom: 1rem;
    right: 1rem;
  }

  #whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  /* WA Modal mobile */
  #wa-modal > div {
    padding: 1.25rem;
    margin: 0.5rem;
  }

  /* Mobile hadith quote */
  .py-12 p.italic {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
  }

  /* Testimonial star sizing */
  #testimonials .text-sm {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 480px) {
  .min-h-\[90vh\] h2 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .min-h-\[90vh\] .space-y-4 {
    padding: 0 0.25rem;
  }

  /* Stats compact */
  .stats-bar .grid-cols-3 {
    gap: 0.25rem;
  }

  .stats-bar .count-up {
    font-size: 1.25rem !important;
  }

  .stats-bar p {
    font-size: 0.625rem !important;
  }

  /* Connecting line hide on small */
  .hidden.md\:block {
    display: none !important;
  }

  /* Footer copyright */
  #footer-copyright {
    font-size: 0.75rem;
  }
}

/* Large screens */
@media (min-width: 1024px) {
  #features .grid > div:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  }

  #steps .grid > div:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
  }

  #testimonials .grid > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
  }

  .proof-card {
    flex-basis: 32%;
  }

  .proof-card:hover {
    transform: translateY(-4px);
    transition: transform 0.2s ease;
  }
}

/* ===== PRINT ===== */
@media print {
  #navbar,
  #sticky-cta,
  #whatsapp-float,
  #wa-modal,
  #mobile-menu {
    display: none !important;
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) {
  #features .grid > div:hover,
  #steps .grid > div:hover,
  #testimonials .grid > div:hover,
  #riyal-cash .bg-background-card:hover,
  .proof-card:hover {
    transform: none;
    box-shadow: none;
  }

  #features .grid > div:hover::before {
    transform: scaleX(0);
  }

  #wa-modal a:hover {
    transform: none;
  }

  #riyal-cash .flex-wrap span:hover {
    transform: none;
    background: inherit;
    color: inherit;
    border-color: inherit;
  }

  #riyal-cash li:hover {
    padding-left: 8px;
  }

  footer a:hover {
    padding-left: 0;
  }
}
