/* Modern Design Variables */
:root {
  --primary-color: #6366f1;
  --primary-dark: #4338ca;
  --primary-light: #a5b4fc;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-dark: #111827;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Modern Navigation */
.modern-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.modern-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.modern-brand .brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modern-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.modern-brand .brand-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
}

.modern-nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  min-height: 44px; /* Touch target size */
  display: flex;
  align-items: center;
}

.modern-nav-link:hover,
.modern-nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(99, 102, 241, 0.1);
}

.modern-cta-btn {
  border: 2px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 600;
  padding: 0.5rem 1.5rem !important;
  border-radius: 50px;
  transition: all 0.3s ease;
  min-height: 44px; /* Touch target size */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modern-cta-btn:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Mobile Navigation Enhancements */
.navbar-toggler {
  border: none !important;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  .modern-nav-link {
    margin-bottom: 0.25rem;
    width: 100%;
    text-align: center;
  }
  
  .modern-cta-btn {
    width: 100%;
    margin-top: 0.5rem;
    justify-content: center;
  }
}

/* Hero Section */
.hero-section {
  background: var(--gradient-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Modern Cards */
.modern-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-light);
}

.modern-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn-modern {
  padding: 0.75rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary-modern {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: white;
}

.btn-secondary-modern {
  background: var(--bg-primary);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary-modern:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Sections */
.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Modern Footer */
.modern-footer {
  background: var(--bg-dark);
  color: white;
  margin-top: 5rem;
}

.footer-content {
  padding: 4rem 0 2rem;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #f3f4f6;
}

.footer-text {
  color: #9ca3af;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.contact-info {
  margin-top: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  color: #9ca3af;
}

.contact-item i {
  color: var(--primary-light);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  font-size: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  .section-padding {
    padding: 3rem 0;
  }
  
  .modern-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-content {
    padding: 3rem 0 1.5rem;
  }
  
  /* Mobile-specific improvements */
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .btn-modern {
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.75rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .modern-brand .brand-text {
    font-size: 1.25rem;
  }
  
  .modern-brand .brand-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .contact-item {
    margin-bottom: 1.5rem;
  }
  
  .contact-item i {
    margin-top: 0.1rem;
  }
  
  .feature-icon {
    width: 45px;
    height: 45px;
    margin-bottom: 1rem;
  }
  
  .visual-card {
    margin-bottom: 1rem;
  }
  
  .stats .display-4 {
    font-size: 2rem;
  }
}

/* Tablet specific optimizations */
@media (max-width: 992px) and (min-width: 769px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .modern-card {
    padding: 1.75rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

/* Extra small devices (phones) */
@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-section {
    padding: 1rem 0;
    min-height: 70vh;
  }
  
  .section-padding {
    padding: 2rem 0;
  }
  
  .modern-card {
    padding: 1.25rem;
  }
  
  .hero-title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .btn-modern {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
  }
  
  .modern-nav-link {
    padding: 0.75rem 1rem !important;
    text-align: center;
  }
  
  .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    margin-left: -1rem;
    margin-right: -1rem;
  }
  
  .modern-cta-btn {
    width: 100%;
    margin-top: 0.5rem;
    text-align: center;
  }
  
  .footer-content {
    padding: 2rem 0 1rem;
  }
  
  .footer-title {
    font-size: 1.25rem;
  }
  
  .footer-subtitle {
    font-size: 1rem;
  }
  
  .social-links {
    justify-content: center;
    margin-top: 1rem;
  }
  
  .contact-details .row > div {
    margin-bottom: 1rem;
  }
  
  .privacy-content h2 {
    font-size: 1.1rem;
  }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
  .container {
    max-width: 1200px;
  }
  
  .hero-title {
    font-size: 4.5rem;
  }
  
  .section-title {
    font-size: 3rem;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Utilities */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: var(--gradient-primary);
}

.shadow-modern {
  box-shadow: var(--shadow-xl);
}

.contact-item a.text-inherit {
  color: inherit !important;
}

.contact-item a.text-inherit:hover {
  color: var(--primary-light) !important;
}

/* Form Styles */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Mobile Touch Optimizations */
.form-control,
.form-select,
.btn {
  min-height: 44px; /* Touch target size */
  font-size: 16px; /* Prevents zoom on iOS */
}

.btn {
  min-width: 44px;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:active {
  transform: translateY(1px);
}

/* Mobile-First Responsive Enhancements */
@media (max-width: 480px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .modern-brand .brand-text {
    font-size: 1.25rem;
  }
  
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }
  
  .service-card h5 {
    font-size: 1.125rem;
  }
  
  .footer-section h6 {
    font-size: 1rem;
  }
  
  .contact-form .btn {
    width: 100%;
    margin-top: 1rem;
  }
}

/* Tablet Optimizations */
@media (min-width: 481px) and (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .service-card {
    margin-bottom: 1.5rem;
  }
  
  .stats-container .row > div {
    margin-bottom: 1rem;
  }
}

/* Touch Device Specific */
@media (pointer: coarse) {
  .btn,
  .nav-link,
  .dropdown-item {
    min-height: 48px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .card {
    transition: transform 0.2s ease;
  }
  
  .card:hover {
    transform: translateY(-4px);
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .hero-title,
  .section-title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: high) {
  .btn-primary {
    border: 2px solid currentColor;
  }
  
  .service-card {
    border: 2px solid var(--text-secondary);
  }
}

/* Focus Management for Keyboard Navigation */
.btn:focus,
.nav-link:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Safe Area for Notched Devices */
@supports (padding: max(0px)) {
  .container-fluid {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  .modern-nav {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
}
