/* ========================================
   A2Z INNER PAGE HERO HEADERS
   ======================================== */

/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Hero Container */
.a2z-inner-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  /* Desktop default */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ensure full width when used in full-width Elementor sections */
.elementor-section-full_width .a2z-inner-hero,
.elementor-section-stretched .a2z-inner-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

/* Prevent horizontal scroll on desktop */
body:not(.elementor-editor-active) .elementor-section-full_width .a2z-inner-hero,
body:not(.elementor-editor-active) .elementor-section-stretched .a2z-inner-hero {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Background Image Layer */
.a2z-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.a2z-hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  will-change: transform, opacity;
  /* Optimize for animations */
}

/* Fixed Background Effect - Parallax scroll (background moves slower) */
.a2z-inner-hero[data-bg-effect="fixed"] {
  position: relative;
}

.a2z-hero-bg[data-effect="fixed"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.a2z-hero-bg[data-effect="fixed"] .a2z-hero-bg-image {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  object-position: center center;
  transform: translateY(0);
  will-change: transform;
  z-index: 1;
}

/* Scale on Scroll - Initial state */
.a2z-hero-bg[data-effect="scale-on-scroll"] .a2z-hero-bg-image {
  transform: scale(1);
  transition: transform 0.3s ease-out;
}

/* Fade on Scroll - Initial state */
.a2z-hero-bg[data-effect="fade-on-scroll"] .a2z-hero-bg-image {
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

/* Ken Burns Animations */
@keyframes kenBurnsZoomIn {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.2);
  }
}

@keyframes kenBurnsZoomOut {
  from {
    transform: scale(1.2);
  }

  to {
    transform: scale(1);
  }
}

@keyframes kenBurnsZoomInLeft {
  from {
    transform: scale(1) translateX(0);
  }

  to {
    transform: scale(1.2) translateX(5%);
  }
}

@keyframes kenBurnsZoomInRight {
  from {
    transform: scale(1) translateX(0);
  }

  to {
    transform: scale(1.2) translateX(-5%);
  }
}

@keyframes kenBurnsZoomOutLeft {
  from {
    transform: scale(1.2) translateX(0);
  }

  to {
    transform: scale(1) translateX(5%);
  }
}

@keyframes kenBurnsZoomOutRight {
  from {
    transform: scale(1.2) translateX(0);
  }

  to {
    transform: scale(1) translateX(-5%);
  }
}

/* Ken Burns Effect Classes */
.a2z-hero-bg[data-effect="ken-burns"] .a2z-hero-bg-image {
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-duration: var(--ken-burns-duration, 20s);
}

.a2z-hero-bg[data-effect="ken-burns"][data-ken-direction="zoom-in"] .a2z-hero-bg-image {
  animation-name: kenBurnsZoomIn;
}

.a2z-hero-bg[data-effect="ken-burns"][data-ken-direction="zoom-out"] .a2z-hero-bg-image {
  animation-name: kenBurnsZoomOut;
}

.a2z-hero-bg[data-effect="ken-burns"][data-ken-direction="zoom-in-left"] .a2z-hero-bg-image {
  animation-name: kenBurnsZoomInLeft;
}

.a2z-hero-bg[data-effect="ken-burns"][data-ken-direction="zoom-in-right"] .a2z-hero-bg-image {
  animation-name: kenBurnsZoomInRight;
}

.a2z-hero-bg[data-effect="ken-burns"][data-ken-direction="zoom-out-left"] .a2z-hero-bg-image {
  animation-name: kenBurnsZoomOutLeft;
}

.a2z-hero-bg[data-effect="ken-burns"][data-ken-direction="zoom-out-right"] .a2z-hero-bg-image {
  animation-name: kenBurnsZoomOutRight;
}

/* Gradient Overlay Layer */
.a2z-hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Light Overlay (Services/Contact) */
.a2z-hero-overlay[data-overlay-type="light"] {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.6) 70%);
}

/* Dark Overlay (About) */
.a2z-hero-overlay[data-overlay-type="dark"] {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.7) 100%);
}

/* Custom Overlay - handled by Elementor inline styles */
.a2z-hero-overlay[data-overlay-type="custom"] {
  /* Custom gradient applied via Elementor's background control */
}

/* Content Container */
.a2z-hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.a2z-hero-text-wrapper {
  text-align: center;
  max-width: 100%;
}

/* Main Heading (H1) */
.a2z-hero-heading {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 74.59px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 16px;
  margin-top: 0;
}

/* Subheading */
.a2z-hero-subheading {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  opacity: 0.9;
  max-width: 768px;
  margin: 0 auto;
}

/* Scroll Indicator Container */
.a2z-scroll-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.a2z-scroll-indicator:hover {
  opacity: 0.8;
}

.a2z-scroll-indicator[data-show="false"] {
  display: none;
}

.a2z-scroll-wrapper {
  text-align: center;
}

/* Scroll Text */
.a2z-scroll-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 16px;
  margin-top: 0;
}

/* Scroll Line */
.a2z-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.8) 0%,
      rgba(255, 255, 255, 0) 100%);
  margin: 0 auto;
}

/* Fade Up Animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }

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

/* Initial Hidden State */
.a2z-hero-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

.animate-fade-up {
  animation: fadeUp 800ms ease-out both;
}

.animate-fade-up-delay {
  animation: fadeUp 800ms ease-out 200ms both;
}

/* Tablet Responsive (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .a2z-inner-hero {
    height: 65vh;
  }

  .a2z-hero-heading {
    font-size: 48px;
  }

  .a2z-hero-subheading {
    font-size: 16px;
  }

  .a2z-scroll-indicator {
    bottom: 16px;
  }
}

/* Mobile Responsive (<768px) */
@media (max-width: 767px) {
  .a2z-inner-hero {
    height: 60vh;
    min-height: 400px;
    /* Ensure minimum height on mobile */
  }

  /* Ensure background image fills on mobile */
  .a2z-hero-bg {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
  }

  .a2z-hero-bg-image {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .a2z-hero-heading {
    font-size: 32px;
  }

  .a2z-hero-subheading {
    font-size: 14px;
  }

  .a2z-scroll-indicator {
    bottom: 12px;
  }

  .a2z-scroll-text {
    font-size: 10px;
  }

  .a2z-hero-content {
    padding: 0 16px;
  }

  /* Fix potential horizontal scroll on mobile */
  .elementor-section-full_width .a2z-inner-hero,
  .elementor-section-stretched .a2z-inner-hero {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* Disable scroll effects on mobile for performance - use static only */
  .a2z-hero-bg[data-effect="parallax"] .a2z-hero-bg-image,
  .a2z-hero-bg[data-effect="scale-on-scroll"] .a2z-hero-bg-image,
  .a2z-hero-bg[data-effect="fade-on-scroll"] .a2z-hero-bg-image {
    transform: none !important;
    opacity: 1 !important;
  }

  /* Disable parallax on mobile - keep static background */
  .a2z-hero-bg[data-effect="fixed"] .a2z-hero-bg-image {
    transform: none !important;
  }

  /* Simplify Ken Burns on mobile - slower, less intensive */
  .a2z-hero-bg[data-effect="ken-burns"] .a2z-hero-bg-image {
    animation-duration: 30s;
    /* Slower on mobile */
    transform: scale(1.05);
    /* Less zoom on mobile */
  }

  /* Force "from A to Z" to be on its own line */
  .a2z-mobile-break {
    display: block;
    width: 100%;
  }
}