/**
 * --------------------------------------
 * Global Styles
 * -------------------------------------- 
 */

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

/* Theme transition for all elements */
* {
  transition: background-color 0.3s ease, 
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

/* Theme toggle icon transition */
.bx-moon, .bx-sun {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Rotate animation for icon on click */
.theme-toggle:active .bx-moon,
.theme-toggle:active .bx-sun {
  transform: rotate(360deg);
}

/**
 * --------------------------------------
 * Navigation Styles
 * -------------------------------------- 
 */

/* Active navigation link */
.nav-link.active {
  color: #2563eb; /* blue-600 */
  font-weight: 700;
}

/* Mobile menu active link */
.mobile-nav-link.active {
  color: #2563eb; /* blue-600 */
}

/**
 * --------------------------------------
 * Hover Effects
 * -------------------------------------- 
 */

/* Hover effect for service and product cards */
.service-card:hover,
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

/* Custom styles for testimonial cards
  Commented out suspecting these being used

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

.testimonial-card:hover {
  transform: scale(1.05);
}

 */

/* Footer link hover effect
  Commented out suspecting these being used

.footer-link {
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #60a5fa;
}

*/

/**
 * --------------------------------------
 * Forms
 * -------------------------------------- 
 */

/* Contact form focus styles
  Commented out suspecting these being used

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

 */

/**
 * --------------------------------------
 * Responsive Layouts
 * -------------------------------------- 
 */

/* General responsive adjustments */
@media (max-width: 768px) {
  /* Hero section adjustments */
  .hero-section {
    text-align: center;
  }

  .hero-section .flex {
    flex-direction: column-reverse;
  }

  .hero-section img {
    margin-bottom: 2rem;
  }

  /* Home section adjustments */
  #home .container {
    flex-direction: column-reverse;
  }

  #home .md\:w-1/2 {
    width: 100%;
  }

  #home .slideshow-container {
    margin-bottom: 2rem;
  }
}

/**
 * --------------------------------------
 * Slideshow Component
 * -------------------------------------- 
 */

/* Slideshow container */
.slideshow-container {
  max-width: 100%;
  position: relative;
  margin: auto;
}

/* Individual slides */
.slide {
  display: none;
}

/* Navigation buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0,0,0,0.8);
  opacity: 0;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* Show buttons on hover */
.slideshow-container:hover .prev,
.slideshow-container:hover .next {
  opacity: 1;
}

/* Fade animation for slides */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

/**
 * --------------------------------------
 * Mobile Menu Styles
 * -------------------------------------- 
 */

/* Mobile menu overlay */
#mobile-menu-overlay {
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

/* Mobile menu container */
#mobile-menu {
  will-change: transform;
  transition: transform 0.3s ease;
}

/* Animation keyframes for mobile menu */
@keyframes slideIn {
  0% {
    transform: translateX(100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Animation classes */
.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

.slide-out {
  animation: slideOut 0.3s ease-in forwards;
}

/**
 * --------------------------------------
 * Preloader Styles
 * -------------------------------------- 
 */

/* Preloader overlay */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-color); /* Supports dark mode */
  z-index: 999999;
  transition: background-color 0.3s ease;
}

/* Preloader animation container */
.preloader {
  width: 50px;
  height: 50px;
  display: inline-block;
  padding: 0;
  text-align: left;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -25px;
  margin-top: -25px;
}

/* Preloader dots */
.preloader span {
  position: absolute;
  display: inline-block;
  width: 50px;
  height: 50px;
  border-radius: 100%;
  background: var(--primary-color); /* Supports dark mode */
  animation: preloader 1.3s linear infinite;
  transition: background-color 0.3s ease;
}

.preloader span:last-child {
  animation-delay: -0.9s;
}

/* Preloader keyframes */
@keyframes preloader {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(1, 1);
    opacity: 0;
  }
}

/* Webkit keyframes for preloader */
@-webkit-keyframes preloader {
  0% {
    -webkit-transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    -webkit-transform: scale(1, 1);
    opacity: 0;
  }
}

/**
 * --------------------------------------
 * Clip Animation Styles
 * -------------------------------------- 
 */

/* Clip element
  Suspected not being used but not 100% sure

.clip {
  z-index: 1000;
  position: fixed;
  width: 0;
  height: 0;
  border-radius: 50%;
  overflow: hidden;
}

.clip.anim {
  animation: open 1.5s ease-in;
}

 */

/* Open animation */
@keyframes open {
  0% {
    width: 0;
    height: 0;
    clip-path: circle(0 at var(--clip-x) var(--clip-y));
  }
  100% {
    width: 500vmax;
    height: 500vmax;
    clip-path: circle(100% at var(--clip-x) var(--clip-y));
  }
}

/**
 * --------------------------------------
 * Custom Elements Styles
 * -------------------------------------- 
 */

/* Product thumbnail with overlay text */
.product-thumb::before {
  content: "290X160";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6b7280;
  font-size: 1.5rem;
}
