/*-----------------------------------------------------------------------------------
	Wawel Construction
	About: Modern construction website with Tailwind CSS
	Author: Peter
	Version: 2.0
-----------------------------------------------------------------------------------*/

/* Preloader Styles */
.page-preloader {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 100000;
  background: #FFFFFF url("img/pageload-spinner.gif") no-repeat center center;
  animation-name: preloader-fade;
  animation-delay: 2s;
  animation-duration: 0.5s;
  animation-fill-mode: both;
}

.preloader-complete {
  animation-delay: 0.1s;
}

@keyframes preloader-fade {
  0% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

/* Page Container */
.page-container {
  overflow: hidden;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Video Background Compatibility */
.video-bg-container,
.bloc-video {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: -50%;
  overflow: hidden;
  transform: translateX(-50%);
  -webkit-transform: translateX(-50%);
}

.bloc-video,
.video-bg-container iframe {
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  z-index: 0;
}

/* Lazy Loading Support */
img.lazyload {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazyloaded {
  opacity: 1;
}

/* Aspect Ratio Utility for Video */
.aspect-w-16 {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
}

.aspect-h-9 {
  position: relative;
}

.aspect-w-16 > * {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Font Smoothing */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus Styles for Accessibility */
*:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline: none;
}

/* Print Styles */
@media print {
  .page-preloader,
  .scrollToTop {
    display: none;
  }
}

/* Gallery Modal Styles */
#galleryModal {
  backdrop-filter: blur(5px);
}

#galleryModal button {
  transition: all 0.3s ease;
}

#galleryModal button:hover {
  transform: scale(1.1);
}

#galleryModal img {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-card {
  transition: all 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-5px);
}
