/* =========================================================
   Datatech Solutions - styles.css (Cleaned + Fixed)
   Fix: Hero “jumping/fading” caused by duplicate @keyframes float.
   Change: Split animations into unique names:
     - hero-float for .hero-image (gentle translateY only)
     - particle-float for .particle (translate + opacity)
   Also: Removed duplicates + consolidated repeated blocks.
   ========================================================= */

/* Main font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* =========================================================
   CSS Variables
   ========================================================= */
:root {
  --color-primary: #202020;
  --color-secondary: #0b80a5;
  --color-accent: #838383;
  --color-light: #f0f0f0;

  --spacing-section: 5rem;

  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   Base
   ========================================================= */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f8f9fa;
  color: var(--color-primary);
  scroll-behavior: smooth;
}

/* Common backgrounds */
.gradient-bg {
  background: linear-gradient(135deg, #2a4365 0%, var(--color-secondary) 100%);
}

.hero-gradient {
  background: linear-gradient(
    135deg,
    rgba(11, 128, 165, 0.9) 0%,
    rgba(32, 32, 32, 0.85) 100%
  );
}

.section-padding {
  padding: var(--spacing-section) 0;
}

@media (max-width: 768px) {
  :root { --spacing-section: 3rem; }
  .section-padding { padding: var(--spacing-section) 0; }
}

/* Accent helper */
.accent-text { color: var(--color-accent); }

/* =========================================================
   Buttons
   ========================================================= */
.btn-primary {
  background-color: var(--color-secondary);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary:hover {
  background-color: #096685;
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(11, 128, 165, 0.4);
}

/* sheen */
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s;
}
.btn-primary:hover::after { left: 100%; }

/* subtle ripple (optional enhancement) */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}
.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-secondary {
  border: 2px solid var(--color-light);
  color: var(--color-light);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  background-color: var(--color-light);
  color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(240, 240, 240, 0.3);
}

/* White button for dark/blue sections */
.btn-white {
  background-color: #ffffff !important;
  color: var(--color-primary) !important;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.btn-white:hover {
  background-color: var(--color-light) !important;
  color: var(--color-primary) !important;
  transform: translateY(-3px);
  border-color: var(--color-secondary);
  box-shadow: 0 12px 25px rgba(255, 255, 255, 0.3);
}

.btn-white::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(11, 128, 165, 0.1), transparent);
  transition: left 0.7s;
}
.btn-white:hover::after { left: 100%; }

/* =========================================================
   Top Bar
   ========================================================= */
.top-bar {
  background-color: var(--color-primary);
  color: var(--color-light);
  padding: 8px 0;
  font-size: 0.875rem;
}

.contact-btn {
  background-color: var(--color-secondary);
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 600;
  transition: all var(--transition-base);
}

.contact-btn:hover {
  background-color: #096685;
  transform: translateY(-2px);
}

/* =========================================================
   Cards / Hover Effects
   ========================================================= */
.card-hover,
.service-card,
.cyber-card,
.industry-card,
.difference-card,
.testimonial-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.card-hover:hover,
.service-card:hover,
.cyber-card:hover,
.industry-card:hover,
.difference-card:hover,
.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

/* Service cards */
.service-card {
  border-left: 4px solid transparent;
  background-color: #ffffff;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
  border-left: 4px solid var(--color-secondary);
  box-shadow: 0 15px 30px rgba(11, 128, 165, 0.2);
}

/* Icon bg */
.service-icon-bg {
  background: linear-gradient(
    135deg,
    rgba(11, 128, 165, 0.1) 0%,
    rgba(11, 128, 165, 0.05) 100%
  );
  transition: all 0.4s ease;
}

.service-card:hover .service-icon-bg {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(
    135deg,
    rgba(11, 128, 165, 0.2) 0%,
    rgba(11, 128, 165, 0.1) 100%
  );
}

/* Cyber cards */
.cyber-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.cyber-card:hover::after { transform: scaleX(1); }
.cyber-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(11, 128, 165, 0.15);
}

/* Force dark text in cyber cards (your request) */
.cyber-card,
.cyber-card h3,
.cyber-card p { color: var(--color-primary) !important; }
.cyber-card h3 { color: #1a202c !important; }
.cyber-card p { color: #4a5568 !important; }

/* Industry cards */
.industry-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 128, 165, 0.1) 0%,
    rgba(32, 32, 32, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.industry-card:hover::before { opacity: 1; }
.industry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Industry links clickability */
.industry-card a {
  position: relative;
  z-index: 10;
  cursor: pointer;
}
.industry-card a.text-secondary:hover { text-decoration: underline !important; }

/* Difference cards */
.difference-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Testimonials */
.testimonial-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
}
.testimonial-card::before {
  content: "“";
  position: absolute;
  top: 20px;
  left: 25px;
  font-size: 5rem;
  color: rgba(11, 128, 165, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
}

/* =========================================================
   Hero Image (FIXED)
   ========================================================= */
.hero-image {
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: hero-float 6s ease-in-out infinite;
  will-change: transform;
  display: block;
}

/* (Optional) helps prevent layout shifts while image loads */
.hero-image {
  width: 100%;
  height: auto;
}

/* Gentle float only (no opacity changes) */
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* =========================================================
   Scroll-triggered animations (IntersectionObserver)
   ========================================================= */
.slide-element {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-element.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease-out;
}
.fade-in.visible { opacity: 1; }

/* Stagger delays (used by both transitions and keyframe animations) */
.stagger-1 { transition-delay: 0.1s; animation-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; animation-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; animation-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; animation-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; animation-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; animation-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; animation-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; animation-delay: 0.8s; }
.stagger-9 { transition-delay: 0.9s; animation-delay: 0.9s; }

/* =========================================================
   Hero particles
   ========================================================= */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
  animation: particle-float 15s linear infinite;
}

/* Particles get their own keyframes (no collision with hero image) */
@keyframes particle-float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
  25% { opacity: 1; }
  50% {
    transform: translateY(-100px) translateX(20px);
    opacity: 1;
  }
  75% { opacity: 1; }
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.7;
  }
}

/* =========================================================
   CTA Pulse
   ========================================================= */
.cta-pulse {
  animation: pulseSlow 4s infinite;
}
@keyframes pulseSlow {
  0%   { box-shadow: 0 0 0 0 rgba(11, 128, 165, 0.4); }
  70%  { box-shadow: 0 0 0 15px rgba(11, 128, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(11, 128, 165, 0); }
}

/* Tailwind-like pulse utility (used on badges) */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* =========================================================
   Hero Entrance Animations (one-shot)
   Note: these are different from scroll animations.
   ========================================================= */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-down {
  animation: fadeInDown 0.6s ease-out forwards;
  opacity: 0;
}
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* =========================================================
   Logo container (footer)
   ========================================================= */
.logo-container {
  display: flex;
  align-items: center;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-top {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.logo-bottom {
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-secondary);
}

/* =========================================================
   Footer links underline animation
   ========================================================= */
.footer-link {
  position: relative;
  transition: color var(--transition-base);
}
.footer-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width var(--transition-base);
}
.footer-link:hover::after { width: 100%; }

/* =========================================================
   Logo Slider
   ========================================================= */
.logo-slider-container {
  overflow: hidden;
  position: relative;
  padding: 40px 0;
  background-color: #f8f9fa;
}

.logo-slider {
  display: flex;
  width: calc(200px * 12);
  animation: slide 30s linear infinite;
}
.logo-slider:hover { animation-play-state: paused; }

.logo-item {
  width: 200px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 20px;
  transition: transform var(--transition-base);
}
.logo-item:hover { transform: scale(1.1); }

.logo-img {
  max-width: 160px;
  max-height: 80px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all var(--transition-base);
}
.logo-item:hover .logo-img {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes slide {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-200px * 6)); }
}

/* =========================================================
   Video wrapper
   ========================================================= */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  background-color: #000;
}
.video-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* =========================================================
   Cookie banner
   ========================================================= */
/* Hide banner by default; JS will show it if needed */
#cookie-banner { display: none; }

/* =========================================================
   Modal Styles
   ========================================================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
}

.modal-content {
  background-color: white;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: modalSlideUp 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  background: linear-gradient(135deg, #2a4365 0%, var(--color-secondary) 100%);
  color: white;
  padding: 25px;
  text-align: center;
}

.modal-header h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.modal-body { padding: 30px; }

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Form Styles + Validation
   ========================================================= */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: all var(--transition-base);
  background-color: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 128, 165, 0.2);
  background-color: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  gap: 15px;
}

.submit-btn {
  background: linear-gradient(to right, var(--color-secondary), #07729c);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition-base);
  flex: 1;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(11, 128, 165, 0.35);
}

.close-btn {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all var(--transition-base);
  flex: 1;
}

.close-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
}

/* Success + error states */
.success-message {
  display: none;
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
}
.success-message.show { display: block; animation: slideDown 0.5s ease; }

.error-message {
  display: none;
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}
.error-message.show { display: block; animation: slideDown 0.3s ease; }

.error-alert {
  display: none;
  background-color: #fff5f5;
  border-left: 4px solid #e74c3c;
  color: #c0392b;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 0.95rem;
}
.error-alert.show {
  display: flex;
  align-items: center;
  animation: slideDown 0.3s ease;
}

/* Field error highlighting */
.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: #e74c3c !important;
  background-color: #fff5f5 !important;
  animation: shake 0.3s ease;
}

/* “Valid” state (safe) */
.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown),
.form-group select:valid {
  border-color: #27ae60 !important;
}

/* Character counter */
.char-count {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.5rem;
  text-align: right;
  font-weight: 500;
}

/* submit loading (optional) */
.submit-btn.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-5px); }
  50%      { transform: translateX(5px); }
  75%      { transform: translateX(-5px); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Honeypot fields hidden */
input[name="_website"],
input[name="_gotcha"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================================================
   Process Step Circles
   ========================================================= */
.process-step {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: bold;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 30px rgba(11, 128, 165, 0.4);
  transition: all var(--transition-base);
  position: relative;
}

.process-step::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.process-step:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 15px 40px rgba(11, 128, 165, 0.6);
}
.process-step:hover::after { opacity: 0.3; }

@media (max-width: 768px) {
  .process-step {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
}

/* =========================================================
   Utility colors
   ========================================================= */
.text-dark { color: var(--color-primary) !important; }
.text-gray-800 { color: #1a202c !important; }
.text-gray-700 { color: #2d3748 !important; }
.text-gray-600 { color: #4a5568 !important; }

/* =========================================================
   Reduced motion (global)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-image,
  .particle,
  .cta-pulse,
  .animate-pulse,
  .slide-element,
  .slide-in-left,
  .slide-in-right,
  .fade-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .btn-primary::before,
  .btn-primary::after,
  .btn-white::after {
    display: none !important;
  }

  .logo-slider { animation: none !important; }
}

/* =========================================================
   Mobile hover tuning
   ========================================================= */
@media (max-width: 768px) {
  .card-hover:hover,
  .service-card:hover,
  .cyber-card:hover,
  .industry-card:hover,
  .difference-card:hover,
  .testimonial-card:hover {
    transform: translateY(-5px);
  }
}

/* =========================================================
   Responsive modal adjustments
   ========================================================= */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  .form-actions { flex-direction: column; }
  .submit-btn, .close-btn { width: 100%; }
  .modal-header h2 { font-size: 1.5rem; }
  .modal-body { padding: 20px; }
}
