/* 1. GLOBÁLNE POZADIE (Titulka na celom webe) */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  background-color: #ffffff;
  overflow-x: hidden; /* Prevent horizontal scrollbar shift */
  
  /* Mesh gradient: jemné modré odlesky v rohoch */
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.07) 0px, transparent 45%),
    radial-gradient(at 100% 0%, rgba(45, 212, 191, 0.05) 0px, transparent 40%),
    radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.07) 0px, transparent 45%),
    radial-gradient(at 0% 100%, rgba(6, 182, 212, 0.05) 0px, transparent 40%);
    
  background-attachment: fixed; /* Pozadie stojí, obsah sa kĺže */
  background-size: cover;
  color: #1e293b;
  scroll-behavior: smooth;
}

/* 2. VYNÚTENÁ PRIEHLADNOSŤ SEKCIÍ */
section, main, header, footer {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* 3. TEXTOVÉ EFEKTY A GRADIENTY */
.gradient-text {
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #2dd4bf 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  display: inline-block;
}

.text-aioni-gradient {
  background: linear-gradient(to right, #2563EB 0%, #0EA5E9 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
  line-height: 1.2;
}

/* Tmavofialová pre malé nadpisy */
.text-purple-accent {
  color: #4b0082 !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fix-italic-cutoff {
  padding: 0.1em 0.2em !important;
  overflow: visible !important;
  display: inline-block;
}

/* 4. MODERNÉ KARTY (Sklenený efekt) */
.card-gradient, .feature-card {
  background-color: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-gradient:hover, .feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.3);
}

.spec-row:hover {
  background: rgba(45, 212, 191, 0.05);
}

/* 5. TLAČIDLÁ */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
  color: white !important;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  border: 2px solid #2563eb !important;
  color: #2563eb !important;
  background: transparent;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: #06b6d4 !important;
  color: #06b6d4 !important;
}

/* 6. ANIMÁCIE */
.glow-effect {
  box-shadow: 0 0 50px rgba(37, 99, 235, 0.2), 0 0 100px rgba(45, 212, 191, 0.15);
}

.pulse-glow { 
  animation: pulseGlow 3s ease-in-out infinite; 
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.4)); }
  50% { filter: drop-shadow(0 0 35px rgba(45, 212, 191, 0.6)); }
}

.float-animation { 
  animation: float 6s ease-in-out infinite; 
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.fade-in { 
  animation: fadeIn 1s ease-out forwards; 
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 7. SKENOVACÍ LÚČ A PORTÁL */
.portal-mask {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 10;
  -webkit-clip-path: inset(0 0 100% 0);
  clip-path: inset(0 0 100% 0);
  animation: portalRevealOnce 6s ease-in-out forwards;
  contain: layout; /* Prevent layout recalculation */
}

@keyframes portalRevealOnce {
  0%   { -webkit-clip-path: inset(0 0 100% 0); clip-path: inset(0 0 100% 0); } 
  100% { -webkit-clip-path: inset(0 0 0% 0);   clip-path: inset(0 0 0% 0); }    
}

.animate-scan-instant {
  position: absolute;
  width: 100%;
  z-index: 20;
  animation: scanOnceDown 6s ease-in-out forwards;
  contain: layout;
}

@keyframes scanOnceDown {
  0%   { top: 0%; opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }  
}

/* Rotácia samotného obrázka vo vnútri masky */
.animate-portal-rotate {
  animation: portalRotate 100s linear infinite;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

@keyframes portalRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.animate-portal-slow {
  animation: portalRotate 100s linear infinite;
  width: 100%;
  height: 100%;
}

.animate-electric-flicker { 
  animation: electricFlicker 0.15s linear infinite; 
}

@keyframes electricFlicker {
  0% { background-position: -200% 0%; }
  100% { background-position: 200% 0%; }
}

.animate-pulse-blue { 
  animation: pulseBlue 3s ease-in-out infinite; 
}

@keyframes pulseBlue {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.portal-mask, .animate-scan-instant {
  pointer-events: none !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: clip-path, -webkit-clip-path; /* More specific will-change */
}

/* Vynútenie klikateľnosti pre menu */
nav a, nav button {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Plynulé scrollovanie */
html {
  scroll-behavior: smooth;
}

#main-nav {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateZ(0);
}

/* Definícia animácie nekonečného prúdu (Neon Flow) */
@keyframes neonFlow {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

/* Animované SVG čiary */
.animate-neon-flow {
  stroke-dasharray: 150, 350; 
  animation: neonFlow 6s linear infinite !important;
  animation-delay: -100s !important;
  pathLength: 1000;
}

.hero-flow {
  stroke-dasharray: 300, 700;
  animation: neonFlow 3s linear infinite !important;
  animation-delay: -100s !important;
}

.gallery-flow {
  stroke-dasharray: 100, 233;
  animation: neonFlow 9s linear infinite !important;
  animation-delay: -100s !important;
}

/* Animácia vstupného rozsvietenia */
@keyframes entranceFade {
  0% { 
    opacity: 0; 
    visibility: visible; 
  }
  100% { 
    opacity: 1; 
    visibility: visible; 
  }
}

.fade-in-entrance {
  visibility: hidden;
  opacity: 0;
  animation: entranceFade 2.5s ease-in-out forwards;
  animation-delay: 3s;
  animation-fill-mode: forwards;
}

/* Slider Track */
#slider-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
  width: 100%;
}

.slide-item {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  opacity: 1 !important;
}

.slide-content, .slide-item img {
  opacity: 1 !important;
  transform: none !important;
}

@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.animate-pulse-blue {
  animation: pulse-blue 2s infinite;
}

.group\/btn:hover .animate-pulse-blue {
  animation: none;
}

/* MODALS - Text po vyplnení */
#modal-buy input, #modal-buy textarea {
  color: #7e22ce !important;
  -webkit-text-fill-color: #7e22ce !important;
}

#modal-rent input, #modal-rent textarea {
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
}

#modal-b2b input, #modal-b2b textarea, #modal-b2b select {
  color: #06b6d4 !important;
  -webkit-text-fill-color: #06b6d4 !important;
}

/* Chrome Autofill fix */
input:-webkit-autofill {
  transition: background-color 5000s ease-in-out 0s;
}

/* RESPONSIVE IMPROVEMENTS */
@media (max-width: 1024px) {
  html, body {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  html, body {
    font-size: 14px;
  }

  .portal-mask, .animate-scan-instant {
    will-change: auto;
  }
}

@media (max-width: 640px) {
  html, body {
    font-size: 13px;
  }

  .hide-on-mobile {
    display: none !important;
  }
}

/* Utility classes for responsive design */
.text-balance { 
  text-wrap: balance; 
}

/* Prevent layout shift from scrollbar */
html {
  scrollbar-gutter: stable;
}

/* Mobile Menu Drawer Fixes */
#mobile-menu {
  position: fixed !important;
  top: 56px !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  background-color: rgb(255, 255, 255) !important;
  z-index: 110 !important;
  transition: transform 0.3s ease !important;
  transform: translateX(-100%) !important;
  overflow: hidden !important;
}

#mobile-menu.translate-x-0 {
  transform: translateX(0) !important;
}

#mobile-menu.-translate-x-full {
  transform: translateX(-100%) !important;
}
