/* ========================================
   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 center !important;
  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: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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 32px;
}

.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: rgba(255, 255, 255, 0.92);
  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: rgba(255, 255, 255, 0.92);
  opacity: 1;
  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;
}

/* Fade Up Animation Class */
.animate-fade-up {
  animation: fadeUp 800ms ease-out both;
}

/* Delay handled via JS or separate class */
.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;
  }
}

/* Portfolio Navigation Buttons */
.a2z-portfolio-navigation {
  position: absolute;
  top: 96px;
  /* Desktop: 96px from top (24×4px) */
  left: 0;
  right: 0;
  z-index: 30;
  /* Floats above hero image and gradient overlay */
  width: 100%;
  pointer-events: none;
  /* Allow clicks through container, but not buttons */
}

.a2z-portfolio-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  /* Desktop: px-6 */
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
  /* Re-enable pointer events for buttons */
}

/* Navigation Button Base Styles */
.a2z-nav-button {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  /* gap-2 */
  padding: 8px 12px;
  /* py-2 px-3 */
  border-radius: 9999px;
  /* Fully rounded pill shape */
  background: rgba(0, 0, 0, 0.2);
  /* 20% black opacity */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  text-decoration: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.5px;
  transition: all 300ms ease;
  cursor: pointer;
  border: none;
  min-height: 44px;
  /* Touch target minimum */
  min-width: 44px;
}

.a2z-nav-button:hover {
  background: rgba(0, 0, 0, 0.4);
  /* 40% black opacity on hover */
  text-decoration: none;
  color: #FFFFFF;
}

.a2z-nav-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Back Button (Left Side) */
.a2z-nav-back {
  margin-left: -12px;
  /* -ml-3 - extends slightly outside container */
}

/* Next Button (Right Side) */
.a2z-nav-next {
  margin-right: -12px;
  /* -mr-3 - extends slightly outside container */
  display: flex !important;
  /* Always show Next button */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure navigation container and buttons are always visible */
.a2z-portfolio-navigation {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.a2z-portfolio-nav-container {
  display: flex !important;
  visibility: visible !important;
}

.a2z-nav-button {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Navigation Icon */
.a2z-nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: #FFFFFF;
  stroke-width: 2;
}

/* Navigation Text */
.a2z-nav-text {
  white-space: nowrap;
}

/* Tablet Responsive (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
  .a2z-portfolio-navigation {
    top: 80px;
    /* Tablet: 80px from top (20×4px) */
  }

  .a2z-portfolio-nav-container {
    padding: 0 16px;
    /* sm:px-4 */
  }
}

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

  .a2z-portfolio-navigation {
    top: 80px;
    /* Mobile: 80px from top (20×4px) */
  }

  .a2z-portfolio-nav-container {
    padding: 0 24px;
    /* Mobile: 24px left/right for more spacing */
  }

  .a2z-nav-button {
    padding: 6px 14px;
    /* Added more horizontal padding on mobile */
    font-size: 12px;
    /* Smaller font on mobile */
    line-height: 16px;
    gap: 6px;
    /* Smaller gap between icon and text */
    min-height: 36px;
    /* Smaller but still touch-friendly */
    min-width: 36px;
  }

  .a2z-nav-icon {
    width: 16px;
    /* Smaller icon on mobile */
    height: 16px;
  }

  .a2z-nav-back {
    margin-left: -8px;
    /* Slightly less negative margin on mobile */
  }

  .a2z-nav-next {
    margin-right: -8px;
    /* Slightly less negative margin 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 20px;
}

/* 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 */
}
}