/* ═══════════════════════════════════════════════════════
   Neweb Landing Theme — Custom Visual Effects
   Ported from the original Next.js landing page design
   ═══════════════════════════════════════════════════════ */

/* ─── Base: Font Smoothing & Overflow ─── */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ─── Selection Color ─── */
::selection {
  background: #247fc3;
  color: #fff;
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 9999px;
}

/* ─── Film Grain Overlay ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.012;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ─── Heading Typography Enhancement ─── */
.elementor-heading-title,
.ekit-heading--title {
  letter-spacing: -0.02em;
}

/* ─── Hero Section: Aurora Gradient Background ─── */
.elementor-element[data-id] > .e-con-inner > .elementor-element:first-child .elementor-widget-heading {
  position: relative;
}

/* Aurora effect on hero-like full-width sections */
.e-con:first-child {
  position: relative;
}

.e-con:first-child::before,
.e-con:first-child::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  animation: aurora-drift 22s ease-in-out infinite alternate;
}

.e-con:first-child::before {
  width: 55vw;
  height: 55vw;
  max-width: 900px;
  max-height: 900px;
  top: -20%;
  left: 15%;
  background: radial-gradient(circle, rgba(36, 127, 195, 0.06) 0%, transparent 70%);
}

.e-con:first-child::after {
  width: 45vw;
  height: 45vw;
  max-width: 700px;
  max-height: 700px;
  top: 5%;
  right: 5%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
  animation-delay: -8s;
  animation-duration: 28s;
}

/* ─── Elementor Buttons: Enhanced Styling ─── */
.elementor-button {
  transition: transform 0.2s ease, box-shadow 0.3s ease !important;
  position: relative;
  overflow: hidden;
}

.elementor-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(36, 127, 195, 0.25) !important;
}

.elementor-button:active {
  transform: scale(0.97);
  transition: transform 0.08s ease !important;
}

/* Shooting star shimmer on buttons */
.elementor-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: skewX(-20deg);
  animation: btn-shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes btn-shimmer {
  0%, 100% { left: -60%; }
  50% { left: 120%; }
}

/* ─── Counter Widget: Enhanced ─── */
.elementor-counter-number-wrapper {
  font-variant-numeric: tabular-nums;
}

/* ─── Icon Boxes: Subtle hover lift ─── */
.elementor-widget-icon-box {
  transition: transform 0.3s ease;
}

.elementor-widget-icon-box:hover {
  transform: translateY(-4px);
}

/* ─── Service/Feature Cards: Subtle hover ─── */
.e-con-inner > .e-con {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.e-con-inner > .e-con:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

/* ─── Testimonial Cards: Polish ─── */
.elementskit-single-testimonial-slider {
  transition: transform 0.3s ease;
}

.elementskit-single-testimonial-slider:hover {
  transform: translateY(-2px);
}

/* ─── Section Divider Effect ─── */
.elementor-divider-separator {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(226, 232, 240, 0.8) 30%,
    rgba(226, 232, 240, 0.8) 70%,
    transparent 100%
  ) !important;
  border: none !important;
}

/* ─── Smooth Scroll ─── */
html {
  scroll-behavior: smooth;
}

/* ─── Image Hover Effects ─── */
.elementor-widget-image img,
.elementor-widget-theme-site-logo img {
  transition: transform 0.4s ease;
}

.elementor-widget-image:hover img {
  transform: scale(1.02);
}

/* ─── Navigation Menu Enhancement ─── */
.elementor-nav-menu--main .elementor-item {
  transition: color 0.2s ease !important;
  position: relative;
}

.elementor-nav-menu--main .elementor-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #247fc3;
  transition: width 0.3s ease, left 0.3s ease;
}

.elementor-nav-menu--main .elementor-item:hover::after,
.elementor-nav-menu--main .elementor-item.elementor-item-active::after {
  width: 100%;
  left: 0;
}

/* ─── Social Icons: Hover Lift ─── */
.elementor-social-icon {
  transition: transform 0.2s ease !important;
}

.elementor-social-icon:hover {
  transform: translateY(-3px) !important;
}

/* ─── Form Enhancement ─── */
.elementor-field-group input,
.elementor-field-group textarea {
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.elementor-field-group input:focus,
.elementor-field-group textarea:focus {
  border-color: #247fc3 !important;
  box-shadow: 0 0 0 3px rgba(36, 127, 195, 0.1) !important;
  outline: none !important;
}

/* ─── Google Maps: Rounded ─── */
.elementor-widget-google_maps iframe {
  border-radius: 0;
  filter: grayscale(10%);
}

/* ─── Fade-in Animation for Sections ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.elementor-widget {
  animation: fadeInUp 0.6s ease-out both;
}

/* Stagger animations for child elements */
.e-con-inner > .elementor-element:nth-child(1) { animation-delay: 0.1s; }
.e-con-inner > .elementor-element:nth-child(2) { animation-delay: 0.2s; }
.e-con-inner > .elementor-element:nth-child(3) { animation-delay: 0.3s; }
.e-con-inner > .elementor-element:nth-child(4) { animation-delay: 0.4s; }
.e-con-inner > .elementor-element:nth-child(5) { animation-delay: 0.5s; }
.e-con-inner > .elementor-element:nth-child(6) { animation-delay: 0.6s; }

/* ─── Aurora Drift Keyframes ─── */
@keyframes aurora-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(3%, 5%) scale(1.05); }
  100% { transform: translate(-2%, -3%) scale(0.95); }
}
