/* ============================================
   JAK Info Online - Bootstrap-First CSS
   Minimal custom styles, maximum Bootstrap usage
   Colors dynamically generated from site.json
   ============================================ */

/* ============================================
   1. CSS Variables (Dynamically Generated from site.json)
   ============================================ */
:root {
  /* Primary Colors */
  --color-primary: #16619f;
  --color-primary-light: #1e7db8;
  --color-primary-lighter: #4a9ed1;
  --color-primary-dark: #0f4872;
  --color-primary-darker: #0a3555;
  
  /* Secondary Colors */
  --color-secondary: #629460;
  --color-secondary-light: #7db674;
  --color-secondary-lighter: #a3d49a;
  --color-secondary-dark: #4a6f47;
  --color-secondary-darker: #364f34;
  
  /* Accent Colors */
  --color-accent: #a13d63;
  --color-accent-light: #c44d76;
  --color-accent-lighter: #d9739e;
  --color-accent-dark: #7a2e4b;
  --color-accent-darker: #561f33;
  
  /* Neutral Colors */
  --color-white: #ffffff;
  --color-gray-50: #f8f9fa;
  --color-gray-100: #f1f3f5;
  --color-gray-200: #e9ecef;
  --color-gray-300: #dee2e6;
  --color-gray-400: #ced4da;
  --color-gray-500: #adb5bd;
  --color-gray-600: #6c757d;
  --color-gray-700: #495057;
  --color-gray-800: #343a40;
  --color-gray-900: #212529;
  --color-black: #000000;
  
  /* Semantic Colors */
  --color-success: #629460;
  --color-success-light: #d4edda;
  --color-warning: #ffc107;
  --color-warning-light: #fff3cd;
  --color-danger: #a13d63;
  --color-danger-light: #f8d7da;
  --color-info: #16619f;
  --color-info-light: #d1ecf1;
  
  /* Background Colors */
  --bg-body: #ffffff;
  --bg-surface: #f8f9fa;
  --bg-elevated: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Text Colors */
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-disabled: #adb5bd;
  --text-inverse: #ffffff;
  
  /* Border Colors */
  --border-default: #dee2e6;
  --border-light: #e9ecef;
  --border-dark: #ced4da;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #16619f 0%, #1e7db8 100%);
  --gradient-secondary: linear-gradient(135deg, #629460 0%, #7db674 100%);
  --gradient-accent: linear-gradient(135deg, #a13d63 0%, #c44d76 100%);
  --gradient-hero: linear-gradient(135deg, rgba(22, 97, 159, 0.9) 0%, rgba(98, 148, 96, 0.8) 50%, rgba(161, 61, 99, 0.9) 100%);
  --gradient-subtle: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Legacy aliases for backward compatibility */
  --jak-lapis-lazuli: #16619f;
  --jak-asparagus: #629460;
  --jak-quinacridone-magenta: #a13d63;
  
  /* Bootstrap Theme Overrides */
  --bs-primary: #16619f;
  --bs-primary-rgb: 22, 97, 159;
  --bs-secondary: #629460;
  --bs-secondary-rgb: 98, 148, 96;
  --bs-success: #629460;
  --bs-danger: #a13d63;
  --bs-dark: #000000;
  
  /* Typography */
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-heading-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   2. Base Typography Enhancements & Unified Shadow System
   ============================================ */
body {
  font-family: var(--bs-body-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--bs-heading-font-family);
}

/* Unified Shadow System */
.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

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

/* ============================================
   3. Bootstrap Component Enhancements
   ============================================ */

/* Navbar - white background with clean design */
.navbar {
  transition: all 0.3s ease;
  background: white !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-scrolled {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-family: var(--bs-heading-font-family);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bs-dark) !important;
}

.navbar-light .nav-link {
  color: var(--bs-dark);
  transition: color 0.3s ease;
}

.navbar-light .nav-link:hover,
.navbar-light .nav-link.active {
  color: var(--bs-primary);
}

/* Cards - use Bootstrap's card with minimal tweaks */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Service icon styling */
.service-icon {
  width: 70px;
  height: 70px;
  background: var(--jak-gradient-primary);
  transition: transform 0.3s ease;
}

.card:hover .service-icon {
  transform: scale(1.1);
}

/* Buttons with gradient */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  font-weight: 600;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--gradient-secondary);
  border: none;
  font-weight: 600;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--color-secondary-light) 0%, var(--color-secondary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Outline button variants */
.btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  font-weight: 600;
}

.btn-outline-primary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-secondary {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  font-weight: 600;
}

.btn-outline-secondary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-accent {
  color: var(--color-accent);
  border-color: var(--color-accent);
  font-weight: 600;
}

.btn-outline-accent:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   4. Custom Utility Classes (Bootstrap-style)
   ============================================ */

/* Background gradients */
.bg-gradient-primary {
  background: var(--jak-gradient-primary) !important;
  color: white;
}

.bg-gradient-secondary {
  background: var(--jak-gradient-secondary) !important;
  color: white;
}

.bg-gradient-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Hero section - minimal custom styles */
.hero {
  min-height: 60vh;
  background: var(--bs-primary);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 1;
}

.hero > * {
  position: relative;
  z-index: 2;
}

/* Text shadow for hero */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   5. Form Enhancements (Bootstrap forms)
   ============================================ */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--color-primary) 25%, transparent);
}

/* ============================================
   6. Footer Professional Styling
   ============================================ */
.footer {
  background: var(--bg-surface);
}

.footer .hover-primary:hover {
  color: var(--bs-primary) !important;
  transition: color 0.2s ease;
}

.footer .btn-primary {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   8. Keyboard Navigation Accessibility
   ============================================ */
.keyboard-navigation *:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* ============================================
   9. Responsive Adjustments
   ============================================ */
@media (max-width: 767.98px) {
  .hero {
    min-height: 50vh;
  }
  
  .display-1,
  .display-2,
  .display-3 {
    font-size: calc(1.5rem + 2vw);
  }
}

/* ============================================
   10. About Page Animations & Hover Effects
   ============================================ */

/* Hover effect for about page cards */
.about-page .card,
.contact-page .card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-page .card:hover,
.contact-page .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Icon animation on hover */
.about-page .card:hover i {
  transform: scale(1.1) rotate(5deg);
  transition: transform 0.3s ease;
}

/* Progress bar animation */
.about-page .progress-bar {
  animation: progressLoad 1.5s ease-in-out forwards;
  transform-origin: left;
}

@keyframes progressLoad {
  from {
    width: 0 !important;
  }
}

/* Floating animation for icons */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.about-page .fa-users-cog,
.about-page .fa-book-open,
.about-page .fa-star,
.about-page .fa-chart-line,
.about-page .fa-rocket {
  animation: float 3s ease-in-out infinite;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card number animation */
.about-page .card:hover .opacity-10 {
  opacity: 0.2 !important;
  transition: opacity 0.3s ease;
}

/* Button hover effects for CTA section */
.about-page .btn-light:hover,
.contact-page button[type="submit"]:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.about-page .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: white;
  transform: scale(1.05);
}

/* ============================================
   12. Contact Page Specific Styles
   ============================================ */

/* Form focus states */
.contact-page .form-control:focus,
.contact-page .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(22, 97, 159, 0.15);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Contact card icon pulse */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.contact-page .rounded-circle {
  animation: pulse 2s ease-in-out infinite;
}

.contact-page .card:hover .rounded-circle {
  animation: none;
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

/* ============================================
   13. Hero Carousel Styles (Split Layout)
   ============================================ */

/* Carousel container */
#heroCarousel {
  position: relative;
  height: 100%;
}

#heroCarousel.carousel-split {
  background-color: #000;
}

#heroCarousel .carousel-inner {
  height: 100%;
}

/* Carousel item */
#heroCarousel .carousel-item {
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Split container layout */
#heroCarousel .carousel-split-container {
  width: 100%;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* Text side - left on desktop, full width on mobile */
#heroCarousel .carousel-text-side {
  width: 100%;
  background: linear-gradient(135deg, rgba(22, 97, 159, 0.95) 0%, rgba(98, 148, 96, 0.85) 50%, rgba(161, 61, 99, 0.95) 100%);
  flex: 0 0 50%;
  padding: 3rem 3rem;
  display: flex;
  align-items: center;
  height: 100%;
}

#heroCarousel .carousel-text-side .carousel-content {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
}

/* Image side - right on desktop, background on mobile */
#heroCarousel .carousel-image-side {
  flex: 0 0 50%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: block;
}

/* Carousel content animation */
#heroCarousel .carousel-content {
  animation: fadeInUp 0.8s ease-out;
}

#heroCarousel .carousel-content h2 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

#heroCarousel .carousel-content .h5 {
  font-size: 1.1rem;
  font-weight: 400;
  opacity: 0.95;
  margin-bottom: 1rem;
}

#heroCarousel .carousel-content p {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 2rem;
}

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

/* Carousel indicators styling */
#heroCarousel .carousel-indicators-split {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  gap: 8px;
  justify-content: center;
}

#heroCarousel .carousel-indicators-split button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  margin: 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

#heroCarousel .carousel-indicators-split button.active {
  background-color: var(--color-warning, #ffc107);
  width: 28px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

#heroCarousel .carousel-indicators-split button:hover {
  background-color: rgba(255, 255, 255, 0.8);
}

/* Carousel controls */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: auto;
  height: auto;
  background: none;
  z-index: 5;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  top: 50%;
  transform: translateY(-50%);
}

#heroCarousel .carousel-control-prev {
  left: 20px;
}

#heroCarousel .carousel-control-next {
  right: 20px;
  left: auto;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
  opacity: 1;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

#heroCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#heroCarousel .carousel-control-next:hover .carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Badge styling in carousel */
#heroCarousel .badge {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Stats section after carousel */
.hero {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
  overflow: hidden;
}

#heroCarousel {
  flex: 0 0 85%;
  height: 85%;
}

.hero-stats {
  flex: 0 0 15%;
  height: 15%;
  display: flex;
  align-items: center;
  box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.2);
  position: relative;
}

.hero-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.3) 50%, transparent);
}

.stat-item {
  transition: transform 0.3s ease, opacity 0.5s ease;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.stat-item:nth-child(1) {
  animation-delay: 0.2s;
}

.stat-item:nth-child(2) {
  animation-delay: 0.4s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.6s;
}

.stat-item:nth-child(4) {
  animation-delay: 0.8s;
}

.stat-item:hover {
  transform: translateY(-5px) scale(1.05);
}

.stat-item h3 {
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
  margin-bottom: 0.25rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.stat-item:hover h3 {
  color: #ffd54f !important;
  transform: scale(1.1);
}

.stat-item p {
  font-size: 0.65rem;
  opacity: 0.9;
  font-weight: 500;
  margin-bottom: 0;
}

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

.letter-spacing-wide {
  letter-spacing: 0.1em;
}

/* ============================================
   Mobile Responsive Carousel Adjustments
   ============================================ */

/* Tablets (768px and below) */
@media (max-width: 991.98px) {
  #heroCarousel .carousel-text-side {
    flex: 0 0 100%;
    padding: 2.5rem 2rem;
    min-height: auto;
    position: relative;
    z-index: 3;
  }
  
  #heroCarousel .carousel-content h2 {
    font-size: 2.25rem;
  }

  #heroCarousel .carousel-image-side {
    flex: 0 0 100%;
    display: none;
  }

  #heroCarousel .carousel-item {
    background-size: cover;
    background-position: center;
  }

  .stat-item h3 {
    font-size: 1.5rem;
  }
  
  .stat-item p {
    font-size: 0.6rem;
  }

  #heroCarousel .carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(22, 97, 159, 0.75) 0%, rgba(98, 148, 96, 0.65) 50%, rgba(161, 61, 99, 0.75) 100%);
    z-index: 1;
  }

  #heroCarousel .carousel-text-side {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #heroCarousel .carousel-control-prev-icon,
  #heroCarousel .carousel-control-next-icon {
    width: 40px;
    height: 40px;
  }

  #heroCarousel .carousel-indicators-split {
    bottom: 15px;
  }

  #heroCarousel .carousel-indicators-split button {
    width: 10px;
    height: 10px;
  }

  #heroCarousel .carousel-indicators-split button.active {
    width: 24px;
  }
}

/* Mobile phones (576px and below) */
@media (max-width: 575.98px) {
  #heroCarousel .carousel-text-side {
    padding: 2rem 1.25rem;
  }

  #heroCarousel .carousel-text-side .carousel-content {
    padding-left: 0;
    padding-right: 0;
  }

  #heroCarousel .carousel-content h2 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 1rem !important;
  }

  #heroCarousel .carousel-content .h5 {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
  }
  
  #heroCarousel .carousel-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

  #heroCarousel .carousel-content .badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
  }

  #heroCarousel .carousel-content .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .stat-item h3 {
    font-size: 1.25rem;
  }
  
  .stat-item p {
    font-size: 0.55rem;
  }

  #heroCarousel .carousel-control-prev,
  #heroCarousel .carousel-control-next {
    display: none;
  }

  #heroCarousel .carousel-control-prev-icon,
  #heroCarousel .carousel-control-next-icon {
    width: 35px;
    height: 35px;
  }

  #heroCarousel .carousel-indicators-split {
    bottom: 10px;
    gap: 6px;
  }

  #heroCarousel .carousel-indicators-split button {
    width: 8px;
    height: 8px;
  }

  #heroCarousel .carousel-indicators-split button.active {
    width: 20px;
  }

  .hero + .bg-dark .col {
    font-size: 0.85rem;
  }

  .hero + .bg-dark h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
}

/* Extra small devices (320px and up) */
@media (max-width: 360px) {
  #heroCarousel .carousel-content h1 {
    font-size: 1.5rem !important;
  }

  #heroCarousel .carousel-content .lead {
    font-size: 0.9rem;
  }

  #heroCarousel .carousel-item {
    min-height: 70vh;
  }
}

/* ============================================
   10. Clients & Awards Section Styles
   ============================================ */

/* Client Logos Slider */
.clients-slider-container {
  position: relative;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.clients-slider {
  animation: scroll-left 120s linear infinite;
  width: fit-content;
  flex-wrap: nowrap;
}

.client-logo-item {
  flex: 0 0 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.client-logo-wrapper {
  transition: transform 0.3s ease;
}

.client-logo-wrapper:hover {
  transform: translateY(-5px);
}

.client-logo-square {
  width: 140px;
  height: 100px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-radius: 8px;
  padding: 15px;
  position: relative;
  overflow: hidden;
}

.client-logo-square::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.client-logo-square img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: none;
}

.client-logo-wrapper:hover .client-logo-square {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.client-logo-wrapper:hover .client-logo-square::before {
  left: 100%;
}

.client-logo-wrapper:hover .client-logo-square img {
  transform: scale(1.05);
}

/* Awards Slider */
.awards-slider-container {
  position: relative;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.awards-slider {
  animation: scroll-right 45s linear infinite;
  width: fit-content;
  flex-wrap: nowrap;
}

.award-item {
  flex: 0 0 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.award-card-simple {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  word-wrap: break-word;
  overflow: hidden;
}

.award-card-simple:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.award-icon-simple {
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.award-card-simple:hover .award-icon-simple {
  transform: scale(1.1);
}

/* Infinite Scroll Animations */
@keyframes scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes scroll-right {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

/* Smooth scrolling for all slider elements */
.clients-slider,
.awards-slider,
.team-slider {
  will-change: transform;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Pause animation on hover */
.clients-slider-container:hover .clients-slider,
.awards-slider-container:hover .awards-slider {
  animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .client-logo-item {
    flex: 0 0 130px;
  }

  .client-logo-square {
    width: 90px;
    height: 70px;
    padding: 8px;
  }

  .award-item {
    flex: 0 0 160px;
  }

  .award-card-simple {
    height: auto;
    min-height: 140px;
    padding: 0.75rem !important;
  }
  
  .award-card-simple h6 {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  
  .award-card-simple .small {
    font-size: 0.65rem;
  }
  
  .award-icon-simple {
    margin-bottom: 0.5rem !important;
  }
  
  .award-icon-simple i {
    font-size: 1.3rem !important;
  }
  
  /* Force scroll animations to work on mobile */
  .clients-slider {
    animation: none !important;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px; /* Space for scrollbar */
    width: 100%;
  }
  
  .clients-slider .client-logo-item {
    scroll-snap-align: start;
    flex: 0 0 140px; /* Fixed width for items */
  }

  .clients-slider-container {
    overflow-x: auto !important;
    width: 100%;
  }

  /* Awards - Grid Layout on Mobile */
  .awards-slider {
    animation: none !important;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 15px;
  }

  .awards-slider-container {
    overflow: visible !important; /* Allow vertical expansion */
  }

  .award-item {
    flex: 0 0 calc(50% - 15px); /* 2 columns with gap */
    max-width: calc(50% - 15px);
    padding: 0 !important;
    margin-bottom: 10px;
  }

  .duplicate-item {
    display: none !important;
  }
  
  /* Disable hover pause on mobile */
  .clients-slider-container:hover .clients-slider,
  .awards-slider-container:hover .awards-slider {
    animation-play-state: running !important;
  }
}

/* ============================================
   11. Scroll Animation Styles
   ============================================ */

/* Section entrance animations */
section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

section:not(.hero) {
  opacity: 0;
  transform: translateY(30px);
}

section.section-visible,
section.hero {
  opacity: 1;
  transform: translateY(0);
}

/* Card staggered animations */
.service-card,
.client-logo-item,
.award-item,
.stats-card,
.why-card {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.animate-in,
.client-logo-item.animate-in,
.award-item.animate-in,
.stats-card.animate-in,
.why-card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Slider entrance effects */
.clients-slider-container,
.awards-slider-container {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.clients-slider-container.slider-visible,
.awards-slider-container.slider-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced hover effects for interactive elements */
.service-card,
.stats-card,
.award-card-simple,
.why-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover,
.stats-card:hover,
.award-card-simple:hover,
.why-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Client logo hover effect */
.client-logo-square {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-logo-wrapper:hover .client-logo-square {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Stats counter pulse effect */
.stats-number {
  transition: all 0.3s ease;
  display: inline-block;
}

.stats-card:hover .stats-number {
  transform: scale(1.15);
  color: var(--color-accent) !important;
}

/* Smooth focus states for accessibility */
.keyboard-navigation *:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Enhanced smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  * {
    scroll-margin-top: 100px;
  }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  section,
  .service-card,
  .client-logo-item,
  .award-item,
  .stats-card,
  .why-card {
    opacity: 1;
    transform: none;
  }
}

/* Client Card Hover Effect */
.client-card:hover .client-logo {
  filter: grayscale(0%) !important;
  opacity: 1 !important;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* ============================================
   Team Card Hover Effects
   ============================================ */
.team-card {
  cursor: pointer;
}

.team-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 70px rgba(22, 97, 159, 0.25), 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

.team-card:hover .team-card-bg {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
}

.team-card:hover .team-avatar {
  transform: scale(1.08);
  box-shadow: 0 20px 50px rgba(22, 97, 159, 0.4), 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.team-card:hover .position-absolute.bottom-0 {
  transform: scaleX(1) !important;
}

.team-social-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(22, 97, 159, 0.3), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.team-slider {
  animation: scroll-left 30s linear infinite;
  width: fit-content;
  flex-wrap: nowrap;
}

.team-slider:hover {
  animation-play-state: paused;
}

/* Team Card Flip Effect */
.team-card-flip:hover .team-card-flip-inner {
  transform: rotateY(180deg);
}

.team-card-flip-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.team-card-front,
.team-card-back {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Team Section Mobile Responsive */
@media (max-width: 768px) {
  .team-card {
    height: 360px !important;
  }

  .team-card .card-body {
    padding: 1.75rem !important;
  }

  .team-avatar {
    width: 90px !important;
    height: 90px !important;
  }

  .team-card h5 {
    font-size: 1.05rem !important;
  }

  .team-card p {
    font-size: 0.75rem !important;
  }

  .position-relative[style*="min-height: 400px"] {
    min-height: 380px !important;
  }

  /* Enable touch scrolling on mobile */
  .team-slider {
    animation: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100% !important;
    padding-bottom: 20px;
  }

  .team-slider::-webkit-scrollbar {
    display: none;
  }

  /* Tap to flip on mobile */
  .team-card-flip:active .team-card-flip-inner {
    transform: rotateY(180deg);
  }
}

@media (max-width: 575px) {
  .team-card {
    width: 280px !important;
    height: 340px !important;
  }

  .team-card .card-body {
    padding: 1.5rem !important;
  }

  .team-avatar {
    width: 85px !important;
    height: 85px !important;
  }

  .team-card h5 {
    font-size: 1rem !important;
  }

  .team-card .text-primary {
    font-size: 0.75rem !important;
  }

  .team-card .text-muted {
    font-size: 0.7rem !important;
  }

  .team-social-btn {
    width: 36px !important;
    height: 36px !important;
  }

  .position-relative[style*="min-height: 400px"] {
    min-height: 360px !important;
  }
}

/* Navbar Mobile Responsive */
@media (max-width: 991px) {
  .navbar-spacer {
    height: 70px !important;
  }
}\n
@media (max-width: 575px) {
  .navbar-spacer {
    height: 65px !important;
  }
  
  .navbar-brand img {
    height: 32px !important;
  }
}

/* Client Section Mobile Responsive */
@media (max-width: 768px) {
  .client-card-container[style*="max-height: 500px"] {
    max-height: 400px !important;
  }
}

@media (max-width: 575px) {
  .client-card-container[style*="max-height: 500px"] {
    max-height: 350px !important;
  }
  
  .client-logo-square {
    width: 50px !important;
    height: 50px !important;
  }
  
  .client-logo-square + h6 {
    font-size: 0.7rem !important;
  }
  
  .client-logo-square + h6 + p {
    font-size: 0.6rem !important;
  }
}

/* ============================================
   12. Print Styles
   ============================================ */
@media print {
  .navbar,
  .footer,
  .btn {
    display: none;
  }
}
