/* ═══════════════════════════════════════════════════════════════════════════ */
/* ─── UX REFINEMENT LAYER — REYPUB DIGITAL 2026 ─────────────────────────── */
/* ─── Premium polish: layout, spacing, animations, cards, responsiveness ── */
/* ─── NO content/SEO/structure changes — pure UX/UI improvements ────────── */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════ */
/* 1. GLOBAL LAYOUT & OVERFLOW FIX                            */
/* ═══════════════════════════════════════════════════════════ */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
main, section, article, header, footer, nav, .section {
  max-width: 100vw;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ═══════════════════════════════════════════════════════════ */
/* 2. TYPOGRAPHY & SPACING REFINEMENT                         */
/* ═══════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  letter-spacing: -0.015em;
}
p {
  line-height: 1.65;
}
.section-title {
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.section-subtitle {
  line-height: 1.7;
  letter-spacing: 0.005em;
}

/* Consistent section spacing — 8px grid system */
.section {
  padding: 80px 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* 3. ANIMATION OVERHAUL — Smooth micro-interactions only     */
/* ═══════════════════════════════════════════════════════════ */

/* Kill all heavy/laggy animations */
.gradient-mesh-bg::before {
  animation: none !important;
  transform: none !important;
}
.f-shape {
  animation: none !important;
}
.floating-card {
  animation: none !important;
}
/* Remove cursor dot — unprofessional */
.cursor-dot {
  display: none !important;
}
/* Remove typing effect cursor */
.typing-cursor::after {
  display: none !important;
}
/* Stop badge sweep animation — distracting */
.animated-badge::before {
  animation: none !important;
  display: none;
}
/* Tame shimmer text — make it subtle, not infinite */
.shimmer-text {
  animation-duration: 6s;
}
/* Reduce modal icon spin — too distracting */
.modal-icon-ring {
  animation-duration: 8s;
}
/* Remove parallax on slider — causes layout shift */
#heroSlider {
  transform: none !important;
  will-change: auto;
}
/* Reduce loader time */
.reypub-loader {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
/* Remove page enter animation — it causes CLS */
main {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
/* Tame Ken Burns — smaller scale to prevent overflow */
@keyframes sliderKenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}
@keyframes sliderKenBurns2 {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}
@keyframes sliderKenBurns3 {
  0% { transform: scale(1); }
  100% { transform: scale(1.03); }
}

/* Unified hover lift — subtle, consistent */
.hover-lift:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08) !important;
}

/* Smooth scroll reveal — faster, subtler */
.scroll-reveal {
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.scroll-reveal-left {
  transform: translateX(-24px);
  transition-duration: 0.5s;
}
.scroll-reveal-right {
  transform: translateX(24px);
  transition-duration: 0.5s;
}

/* Stagger timing — tighter */
.stagger-children .scroll-reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .scroll-reveal:nth-child(2) { transition-delay: 0.06s; }
.stagger-children .scroll-reveal:nth-child(3) { transition-delay: 0.12s; }
.stagger-children .scroll-reveal:nth-child(4) { transition-delay: 0.18s; }
.stagger-children .scroll-reveal:nth-child(5) { transition-delay: 0.24s; }
.stagger-children .scroll-reveal:nth-child(6) { transition-delay: 0.30s; }
.stagger-children .scroll-reveal:nth-child(7) { transition-delay: 0.36s; }

/* Remove tilt effect on cards — causes layout instability */
.service-card,
.counter-item,
.showcase-item {
  transform: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* 4. CARD COMPONENTS — Equal height, clean, premium          */
/* ═══════════════════════════════════════════════════════════ */

/* Service Cards */
.service-card {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(11, 95, 212, 0.08);
  border-color: rgba(11, 95, 212, 0.12);
}
.service-card::after {
  display: none !important; /* Remove glow pseudo-element */
}
.service-card h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin-bottom: 12px;
}
.service-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  flex: 1;
  color: var(--text-light);
}
.service-features {
  margin-bottom: 20px;
}
.service-link {
  margin-top: auto;
  padding-top: 4px;
}

/* Testimonial Cards */
.testimonial-card {
  padding: 32px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}
.testimonial-text {
  flex: 1;
}

/* Feature Boxes (Blog preview cards) */
.feature-box {
  padding: 32px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(11, 95, 212, 0.06);
}

/* Counter Items */
.counter-item {
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.counter-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
.counter-item:hover .counter-icon {
  transform: scale(1.05);
}

/* Process Steps */
.process-step {
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.process-step:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Feature Highlight Cards */
.fh-card {
  border-radius: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fh-stat-box {
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fh-stat-box:hover {
  transform: translateY(-2px);
}

/* FAQ Items */
.faq-item {
  border-radius: 12px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item:hover {
  transform: none; /* Remove translateX — it's jarring */
  border-color: rgba(11, 95, 212, 0.15);
}
.faq-item.open {
  box-shadow: 0 4px 16px rgba(11, 95, 212, 0.06);
}

/* Showcase Items */
.showcase-item {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.showcase-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.showcase-item:hover img {
  transform: scale(1.04);
}

/* Metrics Card */
.metrics-card {
  border-radius: 20px;
  padding: 32px;
}

/* SA Stats */
.sa-stat {
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sa-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════════════════ */
/* 5. BUTTONS & CTA — Consistent, premium                    */
/* ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  min-height: 44px; /* thumb-friendly */
  white-space: nowrap;
  line-height: 1.4;
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(11, 95, 212, 0.25);
}
.btn-outline:hover {
  transform: translateY(-2px);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.btn-lg {
  padding: 14px 32px;
  font-size: 0.95rem;
  min-height: 48px;
}

/* CTA Section buttons */
.cta-actions .btn {
  min-width: 200px;
}

/* ═══════════════════════════════════════════════════════════ */
/* 6. HERO SLIDER — Stable, clean                            */
/* ═══════════════════════════════════════════════════════════ */
.advanced-hero-slider {
  will-change: auto;
}
.slider-content-wrapper {
  padding: 0 clamp(24px, 5vw, 60px);
}
.slider-content-slide {
  max-width: 640px;
}
.slider-content-headline {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.slider-content-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  line-height: 1.5;
}
.slider-content-tag {
  font-size: 0.8rem;
  letter-spacing: 0.8px;
}

/* ═══════════════════════════════════════════════════════════ */
/* 7. SECTIONS — Consistent vertical rhythm                   */
/* ═══════════════════════════════════════════════════════════ */

/* About Section */
.small-about {
  padding: 72px 0;
}

/* Services */
.services-section {
  padding: 80px 0;
}

/* Feature Highlights */
.feature-highlight {
  padding: 80px 0;
}

/* Animated Stats */
.animated-stats-section {
  padding: 72px 0;
}

/* Image Showcase */
.image-showcase {
  padding: 80px 0;
}

/* SEO Authority */
.seo-authority-block {
  padding: 56px 0;
}

/* Process Section */
.process-section {
  padding: 80px 0;
}

/* Testimonials */
.testimonials-section {
  padding: 80px 0;
}

/* FAQ */
.faq-section {
  padding: 80px 0;
}

/* CTA */
.cta-section {
  padding: 80px 0;
}

/* Blog Resources */
.bg-light.section {
  padding: 80px 0;
}

/* Section header spacing */
.section-header {
  margin-bottom: 48px;
}

/* SEO Pakistan Promo */
.seo-pk-promo {
  padding: 64px 0;
}

/* Why Section */
.why-section {
  padding: 80px 0;
}

/* Trusted By */
.trusted-by {
  padding: 32px 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* 8. HERO SECTION — Refined spacing                          */
/* ═══════════════════════════════════════════════════════════ */
.hero {
  padding: 56px 0 72px;
}
.hero-badge {
  margin-bottom: 20px;
}
.hero-title {
  margin-bottom: 20px;
  text-shadow: none; /* Remove glow */
}
.hero-subtitle {
  margin-bottom: 32px;
  line-height: 1.75;
}
.hero-actions {
  margin-bottom: 40px;
}
.hero-stats {
  border-radius: 14px;
  padding: 16px 12px;
}
/* Remove hero bottom gradient overlay that overlaps next section */
.hero::after {
  display: none;
}

/* Hero Dashboard — prevent overflow */
.hero-image {
  overflow: hidden;
}
.floating-card {
  backdrop-filter: blur(12px);
}
.card-seo {
  right: 0;
}
.card-ads {
  right: 0;
}
.card-web {
  left: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* 9. WHY SECTION IMAGE — Clean                              */
/* ═══════════════════════════════════════════════════════════ */
.why-section-image {
  border-radius: 16px;
  overflow: hidden;
}
.why-section-image img {
  min-height: 320px;
  transition: transform 0.4s ease;
}
.why-section-image:hover img {
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════ */
/* 10. FOOTER — Cleaner spacing                               */
/* ═══════════════════════════════════════════════════════════ */
.footer-top {
  padding: 64px 0;
}
.footer-grid {
  gap: 40px;
}
.footer-badges {
  padding: 28px 0;
}
.footer-badge-item {
  border-radius: 12px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.footer-badge-item:hover {
  transform: translateY(-2px);
}
.social-link {
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-link:hover {
  transform: translateY(-2px) scale(1.05);
}

/* ═══════════════════════════════════════════════════════════ */
/* 11. CONTACT MODAL — Smoother                               */
/* ═══════════════════════════════════════════════════════════ */
.contact-modal {
  border-radius: 20px;
  max-width: 440px;
}
.contact-modal-overlay {
  transition: opacity 0.25s ease;
}
.contact-modal-overlay.show .contact-modal {
  transform: scale(1) translateY(0);
}

/* ═══════════════════════════════════════════════════════════ */
/* 12. SCROLL PROGRESS BAR — Thinner, less intrusive          */
/* ═══════════════════════════════════════════════════════════ */
.scroll-progress {
  height: 2px;
  z-index: 100000;
}

/* ═══════════════════════════════════════════════════════════ */
/* 13. LOADING SCREEN — Faster, sleeker                       */
/* ═══════════════════════════════════════════════════════════ */
.loader-bar {
  animation: loaderProgress 0.8s ease-in-out forwards !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* 14. GRIDS — Prevent overflow at all sizes                  */
/* ═══════════════════════════════════════════════════════════ */
.services-grid,
.testimonials-grid,
.services-grid-3,
.blog-grid,
.stats-counter-grid,
.showcase-grid,
.footer-badges-row {
  width: 100%;
  max-width: 100%;
}

/* Process steps — prevent horizontal overflow on mobile */
.process-steps {
  width: 100%;
  max-width: 100%;
}

/* SEO Pakistan cities — prevent overflow */
.seo-pk-cities {
  max-width: 100%;
}

/* Feature highlight tech stack — prevent overflow */
.fh-tech-stack {
  max-width: 100%;
}

/* ═══════════════════════════════════════════════════════════ */
/* 15. RESPONSIVE — Mobile-first refinements                  */
/* ═══════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .section {
    padding: 64px 0;
  }
  .section-header {
    margin-bottom: 40px;
  }
  .feature-highlight {
    padding: 64px 0;
  }
  .process-section {
    padding: 64px 0;
  }
  .cta-section {
    padding: 64px 0;
  }
  .hero {
    padding: 48px 0 56px;
  }
  .small-about {
    padding: 56px 0;
  }
  .animated-stats-section {
    padding: 56px 0;
  }
  .seo-pk-promo {
    padding: 56px 0;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }
  .section-header {
    margin-bottom: 32px;
  }
  .container {
    padding: 0 20px;
  }
  
  /* Service Cards — full width, consistent padding */
  .service-card {
    padding: 24px;
  }
  
  /* Testimonial Cards */
  .testimonial-card {
    padding: 24px;
  }
  
  /* Feature Boxes */
  .feature-box {
    padding: 24px;
  }
  
  /* Counter Items */
  .counter-item {
    padding: 24px 16px;
  }
  
  /* Process Steps */
  .process-step {
    padding: 28px 20px;
  }
  
  /* Metrics Card */
  .metrics-card {
    padding: 24px;
  }
  
  /* Feature Highlight Card */
  .fh-card {
    padding: 24px;
  }
  
  /* Hero Stats — stack nicely */
  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
  }
  .stat {
    padding: 8px 12px;
  }
  .stat-divider {
    display: none;
  }
  
  /* CTA Actions */
  .cta-actions {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .cta-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
  
  /* Hero Actions */
  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Feature Highlight Actions */
  .fh-actions {
    flex-direction: column;
    gap: 10px;
  }
  .fh-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* SEO Pakistan Actions */
  .seo-pk-actions {
    flex-direction: column;
    gap: 10px;
  }
  .seo-pk-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Disable hover lifts on mobile — touchscreen doesn't need them */
  .hover-lift:hover,
  .service-card:hover,
  .testimonial-card:hover,
  .feature-box:hover,
  .faq-item:hover,
  .showcase-item:hover {
    transform: none !important;
  }
  
  /* Footer badges — scrollable on mobile */
  .footer-badges-row {
    gap: 10px;
    justify-content: center;
  }
  .footer-badge-item {
    padding: 8px 14px;
  }
  
  /* Slider */
  .slider-content-headline {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
  }
  
  /* Why Section Image */
  .why-section-image img {
    min-height: 240px;
  }
  
  /* Small About */
  .small-about {
    padding: 48px 0;
  }
  
  /* Process section */
  .process-section {
    padding: 56px 0;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  .section {
    padding: 48px 0;
  }
  .section-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
  }
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  /* Cards */
  .service-card,
  .testimonial-card,
  .feature-box {
    padding: 20px;
    border-radius: 14px;
  }
  
  /* Buttons */
  .btn {
    padding: 12px 24px;
    font-size: 0.88rem;
  }
  .btn-lg {
    padding: 12px 28px;
    font-size: 0.9rem;
  }
  
  /* Slider */
  .slider-content-tag {
    font-size: 0.72rem;
    padding: 6px 14px;
  }
  
  /* Counter */
  .counter-number {
    font-size: 2rem;
  }
  .counter-item {
    padding: 20px 12px;
    border-radius: 14px;
  }
  
  /* Footer */
  .footer-top {
    padding: 48px 0;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* 16. PERFORMANCE — Reduced paint & composite layers         */
/* ═══════════════════════════════════════════════════════════ */
/* Use will-change sparingly — only on things that actually animate */
.hero-slide {
  will-change: opacity;
}
.slider-content-slide {
  will-change: opacity, transform;
}
.nav-menu {
  will-change: transform;
}

/* Reduce compositing on floating shapes */
.f-shape,
.floating-shapes {
  will-change: auto;
}

/* Prevent layout shift on images */
.hero-slide img,
.showcase-item img,
.why-section-image img {
  aspect-ratio: auto;
}

/* ═══════════════════════════════════════════════════════════ */
/* 17. PRINT — Clean print styles                             */
/* ═══════════════════════════════════════════════════════════ */
@media print {
  .scroll-progress,
  .whatsapp-float,
  .wa-popup,
  .mobile-sticky-cta,
  .reypub-loader,
  .top-bar,
  .nav-toggle,
  .contact-modal-overlay {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* 18. FOCUS STATES — Better accessibility                    */
/* ═══════════════════════════════════════════════════════════ */
.btn:focus-visible,
.nav-link:focus-visible,
.faq-question:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════════ */
/* 19. WHATSAPP FLOAT — Less obtrusive                        */
/* ═══════════════════════════════════════════════════════════ */
.whatsapp-float {
  border-radius: 14px;
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
  animation: none; /* Remove pulsing — it's distracting */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-float:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.3);
}

/* ═══════════════════════════════════════════════════════════ */
/* 20. MOBILE STICKY CTA — Cleaner                           */
/* ═══════════════════════════════════════════════════════════ */
.mobile-sticky-cta {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  padding: 12px 16px;
  gap: 10px;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
}
.sticky-cta-btn {
  border-radius: 10px;
  padding: 12px;
  font-size: 0.88rem;
  min-height: 44px;
}

/* ═══════════════════════════════════════════════════════════ */
/* 21. REVEAL ANIMATION STATE — Prevent invisible content     */
/* ═══════════════════════════════════════════════════════════ */
/* After 3s, force-show content if JS hasn't triggered reveal */
@keyframes forceReveal {
  to {
    opacity: 1;
    transform: none;
  }
}
.scroll-reveal,
.scroll-reveal-left,
.scroll-reveal-right,
.scroll-reveal-scale,
.reveal {
  animation: forceReveal 0s 3s forwards;
}
