/* Satoshi Font Face Declarations */
@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 400;
    src: local('Satoshi'), url('https://fonts.cdnfonts.com/s/85546/Satoshi-Regular.woff') format('woff');
}

@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 300;
    src: local('Satoshi'), url('https://fonts.cdnfonts.com/s/85546/Satoshi-Light.woff') format('woff');
}

@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 500;
    src: local('Satoshi'), url('https://fonts.cdnfonts.com/s/85546/Satoshi-Medium.woff') format('woff');
}

@font-face {
    font-family: 'Satoshi';
    font-style: normal;
    font-weight: 700;
    src: local('Satoshi'), url('https://fonts.cdnfonts.com/s/85546/Satoshi-Bold.woff') format('woff');
}

/* Verdana Font Face Declaration */
@font-face {
    font-family: 'Verdana';
    font-style: normal;
    font-weight: 400;
    src: local('Verdana'), url('https://fonts.cdnfonts.com/s/26084/VERDANAI.woff') format('woff');
}

/* Set default font family for the entire application */
@layer base {
  html {
    font-family: 'Satoshi', system-ui, sans-serif;
  }

  body {
    @apply antialiased min-h-screen;
    transition: background-color 0.3s ease, color 0.3s ease;
  }
  
  /* Light theme defaults */
  :root {
    background-color: #F6FCFE;
    color: #1f2937;
  }
  
  /* Dark theme defaults */
  .dark {
    background-color: #000000;
    color: #f3f4f6;
  }
  
  h1, h2, h3, h4, h5, h6 {
    @apply font-bold;
  }
  
  /* Focus styles */
  a:focus, button:focus, input:focus, textarea:focus, select:focus {
    @apply outline-none ring-2 ring-[#F6FCFE] ring-opacity-50;
  }
  
  .dark a:focus, .dark button:focus, .dark input:focus, .dark textarea:focus, .dark select:focus {
    @apply ring-[#016E84];
  }
}

@layer components {
  .btn-primary {
    @apply px-4 py-2 bg-[#016E84] text-white rounded-lg hover:bg-[#015A6E] 
           transition-all duration-300 focus:ring-2 focus:ring-[#F6FCFE] focus:ring-opacity-50;
  }
  
  .dark .btn-primary {
    @apply bg-[#016E84] text-white focus:ring-2 focus:ring-[#F6FCFE] focus:ring-opacity-50;
  }
  
  .btn-secondary {
    @apply px-4 py-2 border border-[#F6FCFE] rounded-lg hover:bg-[#F6FCFE]/20 
           transition-all duration-300 focus:ring-2 focus:ring-[#F6FCFE] focus:ring-opacity-50;
  }
  
  .dark .btn-secondary {
    @apply border-[#016E84]/20 hover:bg-[#016E84]/10 focus:ring-[#016E84];
  }
  
  .card {
    @apply bg-white rounded-xl shadow-md p-6 transition-all duration-300;
  }
  
  .dark .card {
    @apply bg-black shadow-xl;
  }
  
  /* Navbar specific styles - enhanced with gradient underline animation */
  .nav-link {
    position: relative;
    @apply text-gray-700 dark:text-gray-200 hover:text-primary-DEFAULT dark:hover:text-white;
    transition: color 0.2s ease;
    font-weight: 400; /* Regular weight */
  }
  
  .nav-link.active {
    @apply text-primary-DEFAULT dark:text-white;
    font-weight: 600; /* Semi-bold for active */
  }
  
  .nav-link i {
    font-weight: 400 !important; /* Force regular weight for icons */
  }
  
  /* Enhanced gradient underline animation */
  .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(
      90deg,
      transparent 0%,
      transparent 10%,
      #FF8C00 50%,
      transparent 90%,
      transparent 100%
    );
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0.5px;
  }

  .nav-link:hover::after {
    width: 100%;
    animation: shimmer 2s infinite;
  }

  .dark .nav-link::after {
    background: linear-gradient(
      90deg,
      transparent 0%,
      transparent 10%,
      #FFFFFF 50%,
      transparent 90%,
      transparent 100%
    );
  }

  /* Shimmer animation for the underline */
  @keyframes shimmer {
    0% {
      background-position: -100% 0;
    }
    100% {
      background-position: 100% 0;
    }
  }

  /* Enhanced active state underline */
  .nav-link.active::after {
    width: 100%;
    background: linear-gradient(
      90deg,
      transparent 0%,
      transparent 10%,
      #FF8C00 50%,
      transparent 90%,
      transparent 100%
    );
    animation: pulse-glow 2s ease-in-out infinite alternate;
  }

  .dark .nav-link.active::after {
    background: linear-gradient(
      90deg,
      transparent 0%,
      transparent 10%,
      #FFFFFF 50%,
      transparent 90%,
      transparent 100%
    );
  }

  /* Pulse glow animation for active state */
  @keyframes pulse-glow {
    0% {
      opacity: 0.8;
    }
    100% {
      opacity: 1;
    }
  }

  .dark .nav-link.active::after {
    animation: pulse-glow-dark 2s ease-in-out infinite alternate;
  }

  @keyframes pulse-glow-dark {
    0% {
      opacity: 0.8;
    }
    100% {
      opacity: 1;
    }
  }
}

@layer utilities {
  /* Mobile nav links with regular font weight */
  .mobile-nav-link {
    font-weight: 400;
  }

  .mobile-nav-link i {
    font-weight: 400 !important;
  }

  .mobile-service-link {
    font-weight: 400;
  }

  .mobile-service-link i {
    font-weight: 400 !important;
  }

  /* Service links regular weight */
  .service-link {
    font-weight: 400;
  }

  .service-link i {
    font-weight: 400 !important;
  }

  /* Ensure all FontAwesome icons are regular weight */
  .fas, .fa-solid {
    font-weight: 400 !important;
  }

  /* Force body background transitions */
  body {
    background-color: #F6FCFE;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .dark body {
    background-color: #000000;
  }

  /* Define surface-dark as solid black */
  .bg-surface-dark {
    background-color: #000000 !important;
  }

  /* Navbar background transitions */
  #navbar {
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  @apply w-2 h-2;
}

::-webkit-scrollbar-track {
  @apply bg-gray-100;
}

.dark ::-webkit-scrollbar-track {
  @apply bg-gray-800;
}

::-webkit-scrollbar-thumb {
  @apply bg-gray-300 rounded-full;
}

.dark ::-webkit-scrollbar-thumb {
  @apply bg-gray-600;
}

::-webkit-scrollbar-thumb:hover {
  @apply bg-gray-400;
}

.dark ::-webkit-scrollbar-thumb:hover {
  @apply bg-gray-500;
}

/* Button effects */
.apply-now-btn {
  position: relative;
  overflow: hidden;
}

.apply-now-btn:hover {
  background-color: theme('colors.primary.dark');
  box-shadow: 0 4px 6px -1px rgba(1, 110, 132, 0.1), 0 2px 4px -1px rgba(1, 110, 132, 0.06);
}

.apply-now-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: translateX(-100%);
}

.apply-now-btn:hover::after {
  animation: shine 1.5s infinite;
}

@keyframes shine {
  to {
    transform: translateX(50%);
  }
}

@keyframes slowFloat {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
  100% {
    transform: translateY(0px) rotate(360deg);
  }
}

@keyframes fastFloat {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-40px) rotate(180deg);
  }
  100% {
    transform: translateY(0px) rotate(360deg);
  }
}

.animate-slow-float {
  animation: slowFloat 10s ease-in-out infinite;
}

.animate-fast-float {
  animation: fastFloat 3s ease-in-out infinite;
}


/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}


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

/* Light theme styles */
:root {
  --background-light: #ecfdf5;
  --text-light: #1f2937;
  --primary-light: #4ade80;
  --secondary-light: #fcd34d;
  --accent-light: #67e8f9;
}

/* Dark theme styles */
.dark {
  --background-dark: #1f2937;
  --text-dark: #f9fafb;
  --primary-dark: #22c55e;
  --secondary-dark: #f59e0b;
  --accent-dark: #0ea5e9;
}

/* Base styles */
body {
  font-family: 'Inter', sans-serif;
}

/* Override outline styles for better accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.dark *:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

/* Button animation */
.btn-hover-effect {
  position: relative;
  overflow: hidden;
}

.btn-hover-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.btn-hover-effect:hover::after {
  transform: translateX(0);
}

/* Apply Now button glow effect */
.apply-now-btn {
  position: relative;
}

.apply-now-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--primary-light), var(--accent-light));
  border-radius: 9999px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.apply-now-btn:hover::before {
  opacity: 0.7;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

/* Dark mode button glow */
.dark .apply-now-btn::before {
  background: linear-gradient(45deg, var(--primary-dark), var(--accent-dark));
}

.dark .apply-now-btn:hover::before {
  opacity: 0.7;
  animation: darkPulse 1.5s infinite;
}

@keyframes darkPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Navbar scroll effects */
.navbar-scrolled {
  @apply bg-white/65 dark:bg-surface-dark/65 backdrop-blur-lg shadow-nav dark:shadow-nav-dark;
}

/* Dark mode logo filter */
.dark #logo,
.dark #mobile-logo {
  filter: brightness(0) invert(1);
}

/* Theme toggle specific styles */
#theme-toggle-ball {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile menu animations with proper transforms */
#mobile-menu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-backdrop {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Services dropdown animations */
#services-menu {
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

#services-chevron {
  transition: transform 0.2s ease;
}

/* Mobile services menu animation */
#mobile-services-menu {
  transition: max-height 0.3s ease;
}

#mobile-services-chevron {
  transition: transform 0.2s ease;
}

/* Navbar glass morphism effect */
.navbar-glass {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Enhanced scrollbar for dark mode */
.dark ::-webkit-scrollbar-track {
  @apply bg-surface-dark;
}

.dark ::-webkit-scrollbar-thumb {
  @apply bg-gray-600 hover:bg-gray-500;
}