:root {
  --nav-height: 64px;
}
/* FIX: Force disable webkit-app-region */
* {
  -webkit-app-region: no-drag !important;
}

html,
body,
header,
main,
section,
div,
img {
  -webkit-app-region: no-drag !important;
}
/* FORCE FIX - Highest priority */
* {
  -webkit-app-region: no-drag !important;
}

html {
  -webkit-app-region: no-drag !important;
}

body {
  -webkit-app-region: no-drag !important;
}

.hero-header,
.hero-slides,
.hero-slide {
  -webkit-app-region: no-drag !important;
}


.hero-header {
  position: relative;
  min-height: max(600px, calc(80vh - var(--nav-height))); /* Minimum 600px VAGY 80vh - nav */
  background: radial-gradient(140% 120% at 50% -40%, #fff, #fbeac2 45%, #f5dfb0) !important;
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  overflow: hidden;
  isolation: isolate;
  --slide-transition: 1600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --kenburns-duration: 20000ms;
  --parallax-intensity: 0.05;
}


.hero-header::before {
  z-index: -3;
  background: none !important;
}

.hero-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(120, 119, 198, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 200, 124, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

/* Slides */
.hero-header .hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.hero-header .hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.15) rotateZ(0.5deg) translateZ(0);
  filter: none;
  transition:
    opacity var(--slide-transition),
    transform var(--kenburns-duration) ease,
    filter var(--kenburns-duration) ease;
  will-change: opacity, transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-header .hero-slide.is-active {
  opacity: 1;
  transform: scale(1) rotateZ(0deg) translateZ(0);
  filter: none;
}

.hero-header .hero-slide.kenburns-zoom {
  transform: scale(1.2) translateZ(0);
}

.hero-header .hero-slide.kenburns-pan-left {
  background-position: 60% center;
  transform: scale(1.1) translateZ(0);
}

.hero-header .hero-slide.kenburns-pan-right {
  background-position: 40% center;
  transform: scale(1.1) translateZ(0);
}

.hero-header .hero-slide.is-active.kenburns-zoom,
.hero-header .hero-slide.is-active.kenburns-pan-left,
.hero-header .hero-slide.is-active.kenburns-pan-right {
  transform: scale(1) translateZ(0);
  background-position: center center;
}

/* Progress indicator */
.hero-progress {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.hero-progress-item {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.3s ease;
  border: none;
  padding: 0;
}

.hero-progress-item:hover {
  background: rgba(255, 255, 255, 0.5);
}

.hero-progress-item.active .progress-fill {
  width: 100%;
  animation: progressCountdown 7s linear forwards;
  background: rgba(255, 255, 255, 0.95);
}

.hero-progress-item.paused .progress-fill {
  animation-play-state: paused;
}

.progress-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  width: 0%;
  border-radius: 2px;
  transition: width 0.1s linear;
}

@keyframes progressCountdown {
  0% {
    width: 100%;
  }
  100% {
    width: 0%;
  }
}

/* Navigációs gombok */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 10;
  pointer-events: none;
}

.hero-nav-button {
  pointer-events: all;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.5rem;
}

.hero-nav-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hero-nav-button:active {
  transform: scale(0.95);
}

.hero-nav-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.6);
  outline-offset: 3px;
}

/* Hero layout improvements - CLS prevention */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Fix arány large képernyőkön CLS csökkentésére */
@media (min-width: 768px) {
  .hero {
    aspect-ratio: 16 / 9;
    max-height: 50vh;
  }
}

/* Mobilon magasabb arány */
@media (max-width: 767.98px) {
  .hero {
    aspect-ratio: 4 / 3;
    min-height: 300px;
  }
  
  .hero-nav {
    padding: 0 1rem;
  }
  
  .hero-nav-button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .hero-progress {
    bottom: 1rem;
    gap: 0.4rem;
  }
  
  .hero-progress-item {
    width: 30px;
    height: 3px;
  }
}

/* Kis képernyők */
@media (max-width: 576px) {
  .hero-nav-button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .hero-progress-item {
    width: 24px;
  }
}

/* Safari prefix a backface-visibility-hez */
.hero-slide {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-slide {
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
  }
  
  .hero-progress .progress-fill {
    transition: none !important;
  }
  
  .hero-nav-button {
    transition: none !important;
  }
  
  .hero-progress-item {
    transition: none !important;
  }
  
  .hero-progress-item.active .progress-fill {
    animation: none !important;
  }
}

/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Touch eszközök: nagyobb kattintható területek */
@media (hover: none) and (pointer: coarse) {
  .hero-nav-button {
    width: 48px;
    height: 48px;
  }
  
  .hero-progress-item {
    height: 5px;
  }
}

/* Section separator */
.section-separator {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 48px;
  height: 2px;
  background: linear-gradient(90deg, #e3c176 0%, #ffe07a 100%);
  opacity: 0.39;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .section-separator {
    height: 1px;
    margin-bottom: 32px;
  }
}

/* Print styles - Nyomtatáskor */
@media print {
  .hero-header {
    min-height: 200px;
    page-break-inside: avoid;
  }
  
  .hero-progress,
  .hero-nav,
  .section-separator {
    display: none !important;
  }
}

