/* ============================================================
   Footer Reveal Effect
   Sticky footer behind page content, revealed by transparent spacer.
   Background image zooms from 1.2x → 1x via GSAP ScrollTrigger.
   ============================================================ */

/* ---- Page content sits ABOVE the fixed footer ---- */
.elementor-437,
[data-elementor-type="wp-page"] {
  position: relative;
  z-index: 2;
  background-color: #fff;
}

/* Ensure ALL top-level content sections have opaque backgrounds
   so they cover the fixed footer underneath.                    */
.elementor-437 > .e-con,
.elementor-437 > .elementor-section,
.elementor-437 > section {
  background-color: #fff; /* fallback white for any transparent sections */
}

/* Sections that already have their own dark bg — keep them */
.elementor-437 > .e-con[data-id="a67a89d"],
.elementor-437 > .e-con[data-id="e7da66e"],
.elementor-437 > .e-con[data-id="df10105"],
.elementor-437 > .e-con[data-id="7c98f74"] {
  background-color: rgb(8, 45, 73);
}
.elementor-437 > .e-con[data-id="e501825"] {
  background-color: rgb(252, 249, 240);
}

/* Sections with background images — give them a white base */
.elementor-437 > .e-con[data-id="ba7c839"],
.elementor-437 > .e-con[data-id="4a1317b"],
.elementor-437 > .e-con[data-id="a285765"] {
  background-color: #0a1428;
}

/* ---- Transparent spacer that reveals the footer ---- */
.footer-reveal-spacer {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: transparent !important;
  position: relative;
  z-index: 2;
}

/* ---- The Elementor footer becomes fixed behind everything ---- */
footer.elementor-location-footer {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
}

/* Remove any existing padding/margin that could offset it */
footer.elementor-location-footer > .e-con.e-parent {
  position: relative;
  z-index: 2;
  background: transparent !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 4vw 20px !important;
}

/* ---- Footer main content row — shrink & tighten ---- */
footer.elementor-location-footer .e-con[data-id="bd3d808"] {
  padding-top: 0 !important;
  gap: 0 !important;
}

/* Inner content row (logo, services, support, newsletter) */
footer.elementor-location-footer .e-con[data-id="8f28971"] {
  padding: 0 !important;
  gap: 0 !important;
  align-items: flex-start !important;
}

/* Logo + description column — compact */
footer.elementor-location-footer .e-con[data-id="0e897fc"] {
  padding: 0 !important;
}

/* Services column — shrink to content width, align bottom */
footer.elementor-location-footer .e-con[data-id="12e1ae0"] {
  padding: 0 30px !important;
  width: auto !important;
  flex: 0 0 auto !important;
  align-self: flex-end !important;
}

/* Support column — shrink to content width, align bottom */
footer.elementor-location-footer .e-con[data-id="3021238"] {
  padding: 0 30px !important;
  width: auto !important;
  flex: 0 0 auto !important;
  align-self: flex-end !important;
}

/* Newsletter/subscribe column — fill remaining space, clear sidebar, align with services */
footer.elementor-location-footer .e-con[data-id="84f663c"] {
  padding: 0 60px 71px 0 !important;
  flex: 1 1 auto !important;
  align-self: flex-end !important;
}

/* Hide the Elementor divider widget above copyright */
footer.elementor-location-footer .elementor-element-ef87521,
footer.elementor-location-footer [data-id="ef87521"] {
  display: none !important;
}

/* Copyright bottom row — no divider, tight to content */
footer.elementor-location-footer .e-con[data-id="5bad0d3"] {
  padding: 8px 0 0 !important;
  border-top: none !important;
  margin-top: 0 !important;
  align-items: center !important;
}

/* Copyright left text */
footer.elementor-location-footer .e-con[data-id="332dd27"] {
  padding: 0 !important;
}

/* Powered By right text */
footer.elementor-location-footer .e-con[data-id="400b8c3"] {
  padding: 0 !important;
}

/* Shrink headings (Services, Support) — tight gap to links */
footer.elementor-location-footer .e-con[data-id="12e1ae0"] .elementor-heading-title,
footer.elementor-location-footer .e-con[data-id="3021238"] .elementor-heading-title {
  font-size: 18px !important;
  margin-bottom: 6px !important;
  white-space: nowrap !important;
}
footer.elementor-location-footer .e-con[data-id="12e1ae0"] .elementor-widget-heading,
footer.elementor-location-footer .e-con[data-id="3021238"] .elementor-widget-heading {
  margin-bottom: 0 !important;
}
footer.elementor-location-footer .e-con[data-id="12e1ae0"] .elementor-icon-list-items,
footer.elementor-location-footer .e-con[data-id="3021238"] .elementor-icon-list-items {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Shrink nav links */
footer.elementor-location-footer .e-con[data-id="12e1ae0"] .elementor-icon-list-text,
footer.elementor-location-footer .e-con[data-id="3021238"] .elementor-icon-list-text {
  font-size: 14px !important;
}

/* Newsletter heading — single line, icon tight */
footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-title {
  font-size: 18px !important;
  white-space: nowrap !important;
  margin-top: 0 !important;
}
footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-img {
  width: auto !important;
  margin-right: 8px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
}
footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-wrapper {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 0 !important;
}
footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-content {
  flex: 0 1 auto !important;
  width: auto !important;
}
footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-img img {
  vertical-align: middle !important;
  display: block !important;
}

/* Shrink social icons */
footer.elementor-location-footer .e-con[data-id="0922748"] {
  margin: 10px 0 !important;
}
footer.elementor-location-footer .elementor-social-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
}
footer.elementor-location-footer .elementor-social-icon svg {
  width: 16px !important;
  height: 16px !important;
}

/* Copyright & Powered By text sizing */
footer.elementor-location-footer .e-con[data-id="332dd27"] .elementor-widget-text-editor,
footer.elementor-location-footer .e-con[data-id="400b8c3"] .elementor-widget-text-editor {
  font-size: 13px !important;
}

/* ---- Background image layer (injected by JS) ---- */
.footer-reveal-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('https://ardpakistan.com/wp-content/uploads/2026/06/Last.webp');
  background-position: 50% 30%;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
  transform-style: preserve-3d;
}

/* ---- Gradient overlay for text readability ---- */
.footer-reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    0deg,
    rgb(6, 26, 58) 0%,
    rgba(6, 26, 58, 0.92) 40%,
    rgba(8, 45, 73, 0.75) 70%,
    rgba(8, 45, 73, 0.5) 100%
  );
}

/* ---- Footer content adjustments ---- */
footer.elementor-location-footer .elementor-social-icons-wrapper {
  position: relative;
  z-index: 3;
}

/* Floating sidebar stays on top of everything */
#ard-floating-sidebar {
  z-index: 9999 !important;
}

/* Header stays on top */
header.elementor-location-header {
  z-index: 1000 !important;
  position: fixed !important;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 767px) {
  /* Disable fixed reveal on mobile — footer flows naturally */
  footer.elementor-location-footer {
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    width: 100% !important;
    bottom: auto !important;
    left: auto !important;
  }

  footer.elementor-location-footer > .e-con.e-parent {
    padding: 20px 16px 30px !important;
    justify-content: flex-start !important;
    height: auto !important;
  }

  /* Spacer not needed when footer is relative */
  .footer-reveal-spacer {
    display: none !important;
  }

  /* Main row wraps — Logo & Newsletter full width, Services & Support side by side */
  footer.elementor-location-footer .e-con[data-id="8f28971"] {
    --flex-direction: row !important;
    --flex-wrap: wrap !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }

  /* Logo — full width row */
  footer.elementor-location-footer .e-con[data-id="0e897fc"] {
    width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
  }

  /* Services & Support — share one row */
  footer.elementor-location-footer .e-con[data-id="12e1ae0"],
  footer.elementor-location-footer .e-con[data-id="3021238"] {
    width: 50% !important;
    flex: 0 0 50% !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    align-self: flex-start !important;
  }

  /* Newsletter — full width row, space above */
  footer.elementor-location-footer .e-con[data-id="84f663c"] {
    width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    align-self: stretch !important;
    margin-top: 10px !important;
  }

  /* Newsletter heading — single line with envelope icon inline */
  footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-title {
    white-space: nowrap !important;
    font-size: 14px !important;
  }

  footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    justify-content: flex-start !important;
  }

  /* Remove internal margin on envelope icon so it aligns with Services */
  footer.elementor-location-footer .e-con[data-id="84f663c"] .elementor-image-box-img {
    margin-left: 0 !important;
  }

  /* Copyright row — stacked vertically on mobile */
  footer.elementor-location-footer .e-con[data-id="5bad0d3"] {
    --flex-direction: column !important;
    --flex-wrap: nowrap !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 8px 0 0 !important;
    margin-top: 0 !important;
  }

  footer.elementor-location-footer .e-con[data-id="332dd27"],
  footer.elementor-location-footer .e-con[data-id="400b8c3"] {
    width: 100% !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
  }
}
