/* SoftEdge Corporation - Main Stylesheet */

/* Note: Tailwind is loaded via CDN in header.php and some pages. */
/* This stylesheet provides custom components and utilities that complement Tailwind. */

/* Base Styles */
@layer base {
  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
  }

  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }

  ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06b6d4, #3b82f6);
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0891b2, #2563eb);
  }
}

/* Component Styles */
@layer components {
  .glass-card {
    background: rgba(30, 41, 59, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  .btn-primary {
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    color: white;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }

  .btn-primary:hover {
    background: linear-gradient(to right, #0891b2, #2563eb);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }

  .btn-secondary {
    background-color: #334155;
    color: #e2e8f0;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: 1px solid #475569;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
  }

  .btn-secondary:hover {
    background-color: #475569;
  }

  .input-focus {
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.1);
  }

  .input-focus:focus {
    background: rgba(30, 41, 59, 0.3);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow:
      0 0 0 3px rgba(6, 182, 212, 0.1),
      0 0 20px rgba(6, 182, 212, 0.1);
  }
}

/* Utility Classes */
@layer utilities {
  .text-gradient {
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
  }

  .text-gradient-animated {
    background: linear-gradient(90deg, #06b6d4, #3b82f6, #a855f7);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradient-shift 8s ease infinite;
  }

  .scroll-fade-in {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .scroll-fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
  }

  .stat-card,
  .service-card {
    background: rgba(30, 41, 59, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: .75rem;
    padding: 1.25rem;
    backdrop-filter: blur(20px);
  }

  .service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(59,130,246,0.15));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
  }

  .bg-sea {
    background: url('/assets/mar.jpg') center/cover fixed no-repeat;
  }

  .bg-sea::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.75) 50%, rgba(15, 23, 42, 0.85) 100%);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: -1;
  }

  .fade-in {
    animation: fadeIn 0.8s ease-out;
  }

  .shimmer {
    position: relative;
    overflow: hidden;
  }

  .shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.1; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.3; }
}

/* Floating Particles */
.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.particle:nth-child(1) { width: 4px; height: 4px; top: 20%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; top: 60%; left: 80%; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; top: 40%; left: 60%; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; top: 80%; left: 30%; animation-delay: 1s; }
.particle:nth-child(5) { width: 4px; height: 4px; top: 10%; left: 70%; animation-delay: 3s; }

/* Loading Spinner */
.loading-spinner {
  border: 2px solid rgba(226, 232, 240, 0.3);
  border-top: 2px solid #06b6d4;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .glass-card {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }

  .particle {
    display: none; /* Hide particles on mobile for performance */
  }
}
