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

/* ─── Base: Dark Background & Typography ─── */
body {
  background-color: #0C1222;
  color: #94A3B8;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

h1, h2, h3,
.elementor-heading-title,
.ekit-heading--title {
  font-family: "Instrument Serif", Georgia, serif;
  letter-spacing: -0.02em;
  font-weight: 400;
}

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

/* ─── Custom Scrollbar (Dark) ─── */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  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;
}

/* ─── Aurora Gradient Glow Effects (Hero Section) ─── */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before,
.hero-section::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;
}

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

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

/* ─── Dot Grid Background for Stats/How-It-Works Sections ─── */
.e-con:nth-child(2)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(circle, rgba(100, 116, 139, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 35%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 35%, black 20%, transparent 70%);
  z-index: 0;
}

/* ─── Section Positioning ─── */
.e-con {
  position: relative;
}

/* ─── Elementor Buttons: Shooting Star Shimmer ─── */
.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 30px rgba(36, 127, 195, 0.35) !important;
}

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

/* Shooting star spark on primary buttons */
.elementor-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0 340deg, rgba(255, 255, 255, 0.4) 360deg);
  animation: spark-rotate 3s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.elementor-button::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: inherit;
  z-index: 1;
}

.elementor-button .elementor-button-content-wrapper {
  position: relative;
  z-index: 2;
}

@keyframes spark-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ─── Feature Cards: Hover glow ─── */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 60px rgba(36, 127, 195, 0.08), 0 12px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(36, 127, 195, 0.3) !important;
}

/* ─── Icon Box Widget: Subtle lift ─── */
.elementor-widget-icon-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elementor-widget-icon-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(36, 127, 195, 0.1);
}

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

/* ─── Inner Containers / Cards: Hover glow ─── */
.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.2);
}

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

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

/* ─── Section Divider (Dark Mode) ─── */
.elementor-divider-separator {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(51, 65, 85, 0.8) 30%,
    rgba(51, 65, 85, 0.8) 70%,
    transparent 100%
  ) !important;
  border: none !important;
}

/* ─── 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 (Dark) ─── */
.elementor-nav-menu--main .elementor-item {
  transition: color 0.2s ease !important;
  position: relative;
  color: #94A3B8 !important;
}

.elementor-nav-menu--main .elementor-item:hover {
  color: #F8FAFC !important;
}

.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 (Dark) ─── */
.elementor-field-group input,
.elementor-field-group textarea,
.mf-input,
.mf-textarea {
  background: #0C1222 !important;
  border: 1px solid #334155 !important;
  color: #F8FAFC !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
}

.elementor-field-group input::placeholder,
.elementor-field-group textarea::placeholder,
.mf-input::placeholder,
.mf-textarea::placeholder {
  color: #64748B !important;
}

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

/* ─── Google Maps: Dark filter ─── */
.elementor-widget-google_maps iframe {
  filter: invert(90%) hue-rotate(180deg) brightness(0.9);
}

/* ─── Hero Screenshot Container ─── */
.hero-screenshot {
  position: relative;
  overflow: hidden;
}

.hero-screenshot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: #172033;
  border-bottom: 1px solid #334155;
  z-index: 2;
}

.hero-screenshot::after {
  content: "• • •";
  position: absolute;
  top: 10px;
  left: 16px;
  font-size: 18px;
  letter-spacing: 4px;
  color: #475569;
  z-index: 3;
}

/* ─── Blog Post Cards (Dark) ─── */
.elementskit-post-card,
.elementskit-entry-card,
.ekit-wid-con .elementskit-post-body {
  background: #1E293B !important;
  border-color: #334155 !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elementskit-post-card:hover,
.elementskit-entry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* ─── Breadcrumb styling on dark hero ─── */
.elementor-icon-list-items {
  backdrop-filter: blur(8px);
}

/* ─── EKit heading focused title (highlight) glow ─── */
.ekit-heading--focused-title-bg {
  opacity: 0.9;
}

/* ─── Glow borders for card containers ─── */
.e-con[style*="border"] {
  border-color: rgba(51, 65, 85, 0.8) !important;
}

/* ─── Scroll Reveal Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children */
.reveal-on-scroll.revealed .elementor-element:nth-child(1) { transition-delay: 0.05s; }
.reveal-on-scroll.revealed .elementor-element:nth-child(2) { transition-delay: 0.1s; }
.reveal-on-scroll.revealed .elementor-element:nth-child(3) { transition-delay: 0.15s; }
.reveal-on-scroll.revealed .elementor-element:nth-child(4) { transition-delay: 0.2s; }
.reveal-on-scroll.revealed .elementor-element:nth-child(5) { transition-delay: 0.25s; }
.reveal-on-scroll.revealed .elementor-element:nth-child(6) { transition-delay: 0.3s; }

/* ─── 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); }
}

/* ─── CTA Section Glow ─── */
.e-con[style*="247FC3"]::after,
.e-con[style*="247fc3"]::after {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 200px;
  background: radial-gradient(ellipse, rgba(36, 127, 195, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Responsive Adjustments ─── */
@media (max-width: 767px) {
  .hero-section::before,
  .hero-section::after {
    filter: blur(80px);
    opacity: 0.7;
  }

  .hero-screenshot::before {
    height: 32px;
  }

  .hero-screenshot::after {
    top: 6px;
    font-size: 14px;
  }
}

/* ─── Smooth Link Transitions ─── */
a {
  transition: color 0.2s ease;
}

/* ─── Elementor Editor Compatibility ─── */
.elementor-editor-active body::before {
  display: none;
}
