/* Custom CSS overrides for Next.js */

/* Preloader fade-out animation */
.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

/* Fix for potential render flashes */
.boxed_wrapper {
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

/* Fix for Revolution slider in Next.js */
.rev_slider_wrapper {
  width: 100% !important;
}

/* Ensure all carousel items are visible */
.owl-carousel {
  display: block !important;
}

.owl-carousel.owl-loaded {
  display: block;
}

.owl-carousel .owl-stage-outer {
  overflow: hidden;
}

/* Fix for image paths in Revolution Slider */
.tp-caption img,
.tp-simpleresponsive img {
  max-width: 100% !important;
}

/* Make sure images are loaded in all sections */
.img-holder img,
.image-box img,
.single-blog-post .img-holder img,
.single-project-style2 .img-holder img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fix for testimonial images */
.testimonial-style1-content .single-testimonial-style1 .client-info .image img {
  display: inline-block;
  max-width: 100%;
}

/* Fix for brand logos */
.brand-items-carousel .single-brand-item img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

/* Fix for forms in Next.js */
input, 
textarea,
select {
  display: block;
  width: 100%;
}

button {
  cursor: pointer;
}

/* Default font fallbacks */
body {
  font-family: 'Open Sans', Arial, sans-serif;
}

/* Custom CSS overrides for Next.js specific issues */

/* Override box-sizing to match the original template */
* {
  box-sizing: border-box;
}

/* Fix for image handling in Next.js */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for owl carousel in Next.js */
.owl-carousel {
  display: block;
}
.owl-carousel .owl-stage-outer {
  overflow: hidden;
}

/* Fix for preloader */
.preloader {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  background-color: #ffffff;
  background-position: center center;
  background-image: url(/images/icon/preloader.gif);
  background-repeat: no-repeat;
}

/* Fix for boxed_wrapper */
.boxed_wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Fix for revolution slider */
.rev_slider_wrapper {
  width: 100% !important;
}

/* Fix for react-specific issues */
.project-carousel .owl-item {
  float: left;
}

/* Fix for working process area */
.working-process-area .single-working-process {
  margin-bottom: 30px;
}

/* Fix for brand-items-carousel */
.brand-items-carousel .single-brand-item {
  display: block;
  margin: 0 auto;
  text-align: center;
}

/* Fix for appointment-box selectpicker */
.appointment-box .selectpicker {
  display: block;
  width: 100%;
  height: 55px;
  border-radius: 0;
  border: 1px solid #f2f2f2;
  color: #83888d;
  font-size: 16px;
  font-weight: 400;
  text-transform: capitalize;
  background: #ffffff;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0 20px;
  outline: none;
}

/* Fix header dropdown menus for Next.js */
.navigation li.dropdown > ul {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  width: 250px;
  z-index: 100;
  background: #ffffff;
  box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
  transform: scaleY(0);
  transform-origin: top center;
  transition: all 200ms linear;
  transition-delay: 0.1s;
}

.navigation li.dropdown:hover > ul {
  transform: scaleY(1);
  display: block;
}

/* Fix for scroll to top button in Next.js */
.scroll-to-top-style2 {
  position: fixed;
  bottom: 30px;
  right: 15px;
  z-index: 999;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  display: none;
}

.scroll-to-top-style2.visible {
  display: block;
}

/* Fix for carousel issues in Next.js */
.carousel-fixes {
  display: block;
} 