/* Custom CSS for GoIT360 Static Website */

/* Enhanced header styles matching React version */
#main-header {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-header .absolute.inset-0 {
  transition: opacity 0.5s ease;
}

/* Mobile menu button - ensure visibility on mobile only */
#mobile-menu-btn {
  display: none !important;
}

@media (max-width: 1023px) {
  #mobile-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 44px !important;
    z-index: 60 !important;
  }
}

@media (min-width: 1024px) {
  #mobile-menu-btn {
    display: none !important;
  }
}

/* Mobile menu full screen styles */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
}

#mobile-menu .fixed.inset-0 {
  width: 100vw;
  height: 100vh;
}

/* Mobile menu panel full screen */
#mobile-menu > div:last-child {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  max-width: none !important;
  border: none !important;
}

/* Mobile menu animations - full screen */
#mobile-menu .mobile-menu-link {
  animation: slideInUp 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

#mobile-menu .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu .mobile-menu-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu .mobile-menu-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu .mobile-menu-link:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu .mobile-menu-link:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu .mobile-menu-link:nth-child(6) { animation-delay: 0.35s; }
#mobile-menu .mobile-menu-link:nth-child(7) { animation-delay: 0.4s; }
#mobile-menu .mobile-menu-link:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dropdown menu styles */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

.group:hover .group-hover\:visible {
  visibility: visible;
}

.group:hover .group-hover\:translate-y-0 {
  transform: translateY(0);
}

/* Mobile menu animations */
#mobile-menu {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile menu full screen styles */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
}

#mobile-menu .fixed.inset-0 {
  width: 100vw;
  height: 100vh;
}

/* Mobile menu panel full screen */
#mobile-menu > div:last-child {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  max-width: none !important;
  border: none !important;
}

/* Mobile menu animations - full screen */
#mobile-menu .mobile-menu-link {
  animation: slideInUp 0.4s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

#mobile-menu .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu .mobile-menu-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu .mobile-menu-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu .mobile-menu-link:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu .mobile-menu-link:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu .mobile-menu-link:nth-child(6) { animation-delay: 0.35s; }
#mobile-menu .mobile-menu-link:nth-child(7) { animation-delay: 0.4s; }
#mobile-menu .mobile-menu-link:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Blob animations - Enhanced for mobile */
@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-1000 {
  animation-delay: 1s;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-3000 {
  animation-delay: 3s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Hero section enhancements for mobile */
#home {
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile */
  position: relative;
}

#home .absolute.inset-0 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Ensure animations work on mobile */
@media (max-width: 768px) {
  .animate-blob {
    animation: blob 8s infinite;
  }
  
  #home {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 6rem; /* Account for fixed header */
  }
  
  #home .absolute.inset-0 {
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }
  
  /* Mobile-specific blob positioning */
  #home .absolute.inset-0 > div {
    will-change: transform;
    position: absolute;
  }
  
  /* Ensure blobs are visible throughout the section */
  #home .absolute.inset-0 > div:nth-child(1) {
    top: 10%;
    left: 5%;
  }
  
  #home .absolute.inset-0 > div:nth-child(2) {
    top: 10%;
    right: 5%;
  }
  
  #home .absolute.inset-0 > div:nth-child(3) {
    bottom: 20%;
    left: 10%;
  }
  
  #home .absolute.inset-0 > div:nth-child(4) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  #home .absolute.inset-0 > div:nth-child(5) {
    bottom: 25%;
    right: 10%;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 2px solid #FBB90F;
  outline-offset: 2px;
}

/* Custom button hover effects */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Card hover effects */
.service-card {
  transition: all 0.5s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive utilities */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .text-responsive {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
}

/* Loading animation for images */
.img-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #FBB90F;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e6a509;
}

/* Intersection observer animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Hero section enhancements */
.hero-bg {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 50%, #f3e8ff 100%);
}

/* Service cards grid enhancement */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Contact form styling */
.contact-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-input {
  border: 2px solid #e5e7eb;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  border-color: #FBB90F;
  outline: none;
  box-shadow: 0 0 0 3px rgba(251, 185, 15, 0.1);
}

/* Footer enhancements */
.footer-link {
  position: relative;
  transition: color 0.3s ease;
}

.footer-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #FBB90F;
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
}

/* Performance optimizations */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .bg-gradient-to-r {
    background: #000 !important;
    color: #fff !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-blob {
    animation: none;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --border-color: #333333;
  }
}

/* Utility classes */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus trap for modals */
.focus-trap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Custom animations for specific elements */
.pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}