/*
 * PROFESSIONAL UPGRADE CSS
 * Perpetual TechSolutions - Fortune 500 Level Design
 * Transforms amateur elements into professional, industry-standard components
 * Version: 2.0 Professional
 */

/* ============================================
   ENHANCED DESIGN TOKENS - PROFESSIONAL GRADE
   ============================================ */

:root {
  /* Professional Color Palette - Refined */
  --navy-primary: #0A1628;
  --navy-secondary: #1B2D4F;
  --navy-light: #2C3E60;
  
  /* Sophisticated Gold Accents */
  --gold-primary: #C8A05C;
  --gold-light: #D4B16F;
  --gold-dark: #B89044;
  
  /* Professional Neutrals */
  --gray-950: #0F1419;
  --gray-900: #1A1D23;
  --gray-800: #2D3139;
  --gray-700: #4A4E56;
  --gray-600: #6B7280;
  --gray-500: #9CA3AF;
  --gray-400: #D1D5DB;
  --gray-300: #E5E7EB;
  --gray-200: #F3F4F6;
  --gray-100: #F9FAFB;
  --gray-50: #FAFBFC;
  
  /* Professional Shadows - Multi-Layer Depth */
  --shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-professional: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-dramatic: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.10);
  --shadow-floating: 0 25px 50px -12px rgba(0, 0, 0, 0.20);
  
  /* Professional Typography Scale */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  
  /* Refined Typography Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  --text-7xl: 4.5rem;      /* 72px */
  
  /* Professional Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* Enhanced Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Professional Gradients */
  --gradient-navy-to-black: linear-gradient(135deg, #0A1628 0%, #000000 100%);
  --gradient-navy-sophisticated: linear-gradient(135deg, #1B2D4F 0%, #0A1628 100%);
  --gradient-gold-subtle: linear-gradient(135deg, #C8A05C 0%, #B89044 100%);
  --gradient-overlay-dark: linear-gradient(180deg, rgba(10, 22, 40, 0.95) 0%, rgba(10, 22, 40, 0.75) 50%, rgba(10, 22, 40, 0.85) 100%);
  --gradient-overlay-light: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
}

/* ============================================
   REMOVE AMATEUR ELEMENTS
   ============================================ */

/* Remove all orange/gold badges that look unprofessional */
.badge,
.btn-badge,
[class*="badge-"] {
  display: none !important;
}

/* ============================================
   PROFESSIONAL TYPOGRAPHY SYSTEM
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-900);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Professional Heading Hierarchy */
h1, .h1, .hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.5rem); /* 36px - 72px */
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--tracking-tight);
  color: var(--navy-primary);
  margin-bottom: 1.25rem;
}

h2, .h2, .section-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 3rem); /* 30px - 48px */
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--tracking-tight);
  color: var(--navy-primary);
  margin-bottom: 1rem;
}

h3, .h3, .card-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.875rem); /* 20px - 30px */
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--tracking-normal);
  color: var(--navy-secondary);
  margin-bottom: 0.875rem;
}

h4, .h4 {
  font-size: 1.25rem; /* 20px */
  font-weight: 600;
  line-height: 1.4;
  color: var(--gray-900);
}

/* Professional Subtitles */
.hero-subtitle,
.section-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem); /* 16px - 20px */
  line-height: 1.7;
  color: var(--gray-700);
  font-weight: 400;
  max-width: 65ch;
  margin: 0 auto 2rem;
}

/* Section Labels - Professional Style */
.section-label,
.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  position: relative;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--gold-primary);
  margin-right: 12px;
  vertical-align: middle;
}

/* ============================================
   PROFESSIONAL HERO SECTION
   ============================================ */

.modern-hero {
  min-height: clamp(500px, 70vh, 750px);
  position: relative;
  display: flex;
  align-items: center;
  padding: clamp(4rem, 10vh, 8rem) 0;
  overflow: hidden;
  background: var(--gradient-navy-sophisticated);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.25;
  filter: brightness(0.7) contrast(1.1);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay-dark);
  z-index: 2;
  mix-blend-mode: normal;
}

/* Add subtle grain texture for sophistication */
.hero-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 3;
}

.hero-content {
  max-width: 800px;
  text-align: left;
}

.modern-hero .hero-title {
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modern-hero .hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2.5rem;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.65;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

@media (max-width: 640px) {
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    max-width: 320px;
  }
}

/* ============================================
   PROFESSIONAL BUTTONS - REDESIGNED
   ============================================ */

.btn,
.btn-primary,
.btn-secondary,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 8px;
  transition: all var(--transition-smooth);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  min-height: 52px;
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

/* Primary Button - Gold */
.btn-primary,
button[type="submit"].btn-primary {
  background: var(--gradient-gold-subtle);
  color: var(--navy-primary);
  box-shadow: 0 4px 14px rgba(200, 160, 92, 0.35);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 160, 92, 0.45);
  color: var(--navy-primary);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(200, 160, 92, 0.3);
}

/* Secondary Button - Outline */
.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.btn-secondary:hover {
  border-color: var(--white);
  color: var(--navy-primary);
  transform: translateY(-2px);
}

.btn-secondary:hover::before {
  opacity: 1;
}

/* Button on Light Backgrounds */
.modern-section .btn-primary,
.modern-section .btn-secondary {
  box-shadow: var(--shadow-professional);
}

.modern-section .btn-secondary {
  background: transparent;
  color: var(--navy-primary);
  border-color: var(--navy-primary);
}

.modern-section .btn-secondary:hover {
  background: var(--navy-primary);
  color: var(--white);
}

/* ============================================
   PROFESSIONAL CARD SYSTEM - COMPLETE REDESIGN
   ============================================ */

.modern-card,
.expertise-card,
.service-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition-smooth);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-200);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.modern-card:hover,
.expertise-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--gray-300);
}

/* Card Image Container - Professional Treatment */
.card-image,
.card-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 60%; /* 5:3 aspect ratio */
  overflow: hidden;
  background: var(--gray-100);
}

.card-image img,
.card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
}

.modern-card:hover .card-image img {
  transform: scale(1.05);
}

/* Professional Card Overlay */
.card-image::after,
.card-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(27,45,79,0) 0%, rgba(27,45,79,0.15) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.modern-card:hover .card-image::after {
  opacity: 1;
}

/* Card Content - Professional Spacing */
.card-content,
.card-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy-primary);
  margin-bottom: 1rem;
}

.card-text,
.card-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
  flex: 1;
}

/* Professional Feature List */
.card-features,
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-features li,
.feature-list li {
  font-size: 0.875rem;
  color: var(--gray-700);
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.6;
}

.card-features li::before,
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background: var(--gold-primary);
  border-radius: 50%;
}

/* Expertise Cards - Specific Improvements */
.expertise-card .card-image {
  padding-top: 55%; /* Adjusted aspect ratio */
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.expertise-card .card-content {
  padding: 1.75rem 1.5rem;
}

.expertise-card .card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  min-height: 2.8em; /* Ensure consistent height */
  line-height: 1.4;
}

.expertise-card .card-text {
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  color: var(--gray-600);
}

.expertise-card .card-features {
  gap: 0.625rem;
}

.expertise-card .card-features li {
  font-size: 0.8125rem;
  padding-left: 1.5rem;
  line-height: 1.5;
}

/* Better responsive behavior for 4-column layout */
@media (min-width: 992px) and (max-width: 1199px) {
  .expertise-card .card-title {
    font-size: 1rem;
  }
  
  .expertise-card .card-text {
    font-size: 0.8125rem;
  }
  
  .expertise-card .card-features li {
    font-size: 0.75rem;
  }
}

/* Stack to 2 columns on tablets */
@media (max-width: 991px) {
  .expertise-card .card-content {
    padding: 2rem 1.75rem;
  }
  
  .expertise-card .card-title {
    font-size: 1.25rem;
    min-height: auto;
  }
  
  .expertise-card .card-text {
    font-size: 0.9375rem;
  }
}

/* ============================================
   PROFESSIONAL SECTION LAYOUTS
   ============================================ */

.modern-section {
  padding: clamp(4rem, 8vh, 8rem) 0;
  position: relative;
}

/* Enhanced dark section styling */
.modern-section.dark-section {
  padding: clamp(5rem, 10vh, 10rem) 0 !important;
  position: relative;
  overflow: hidden;
}

/* Add subtle pattern overlay for depth */
.modern-section.dark-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(200, 160, 92, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(200, 160, 92, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.modern-section.dark-section > .container {
  position: relative;
  z-index: 1;
}

/* Improve spacing in dark section */
.dark-section .section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  line-height: 1.3 !important;
  margin-bottom: 2rem !important;
  font-weight: 700 !important;
}

.dark-section .section-content {
  font-size: 1.0625rem !important;
  line-height: 1.8 !important;
}

.modern-section.dark-section {
  background: var(--gradient-navy-sophisticated) !important;
  color: var(--white) !important;
}

.modern-section.dark-section .section-title {
  color: var(--white) !important;
}

.modern-section.dark-section .section-subtitle {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* FORCE white text in dark sections */
.dark-section,
.dark-section * {
  color: white !important;
}

.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4,
.dark-section h5,
.dark-section h6 {
  color: white !important;
}

.dark-section p {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 1.0625rem !important;
  line-height: 1.75 !important;
}

.dark-section .section-content {
  color: white !important;
}

.dark-section .section-content p {
  color: rgba(255, 255, 255, 0.92) !important;
  margin-bottom: 1.5rem !important;
}

.text-white,
.text-white * {
  color: white !important;
}

.text-white-80,
.text-white-80 * {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* NUCLEAR OVERRIDE - Force white text in dark sections */
section.dark-section p,
section.modern-section.dark-section p,
.dark-section .section-content p,
.modern-section.dark-section .section-content p,
.dark-section p,
.text-white-80 p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.0625rem !important;
  line-height: 1.75 !important;
  margin-bottom: 1.25rem !important;
}

/* Override any layout.css black text */
body .dark-section p,
body .modern-section.dark-section p {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Specific override for the problematic paragraph */
.modern-section.dark-section .section-content p:first-child,
.modern-section.dark-section .section-content p:nth-child(2),
.modern-section.dark-section .section-content p:last-child {
  color: rgba(255, 255, 255, 0.95) !important;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

/* Professional Grid System */
.row.g-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .row.g-4 {
    gap: 2.5rem;
  }
}

/* 3-Column Grid for Service Cards */
.col-md-6.col-lg-3 {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .row.g-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .row.g-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* 3-column override */
  .row.col-lg-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   PROFESSIONAL STATS SECTION (NEW)
   ============================================ */

.stats-section {
  padding: 5rem 0;
  background: var(--gray-50);
  position: relative;
  overflow: hidden;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--navy-primary);
  line-height: 1;
  margin-bottom: 0.75rem;
  background: var(--gradient-gold-subtle);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  display: block;
  font-size: 0.9375rem;
  color: var(--gray-700);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================
   FORM IMPROVEMENTS
   ============================================ */

.modern-input,
input.form-control,
textarea.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--white);
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}

.modern-input:focus,
input.form-control:focus,
textarea.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 4px rgba(200, 160, 92, 0.1);
  background-color: var(--white);
}

.modern-input::placeholder,
input.form-control::placeholder,
textarea.form-control::placeholder {
  color: var(--gray-500);
}

/* ============================================
   PROFESSIONAL ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Animation Classes */
.animate-on-scroll {
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
}

.animate-on-scroll.delay-1 {
  animation-delay: 0.1s;
}

.animate-on-scroll.delay-2 {
  animation-delay: 0.2s;
}

.animate-on-scroll.delay-3 {
  animation-delay: 0.3s;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-white {
  color: var(--white) !important;
}

.text-white-80 {
  color: rgba(255, 255, 255, 0.92) !important;
}

.text-center {
  text-align: center !important;
}

.text-left {
  text-align: left !important;
}

.mb-4 {
  margin-bottom: 2rem !important;
}

.mt-4 {
  margin-top: 2rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

/* ============================================
   RESPONSIVE REFINEMENTS
   ============================================ */

@media (max-width: 768px) {
  .modern-hero {
    min-height: 500px;
    padding: 4rem 0;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .card-content,
  .card-body {
    padding: 1.5rem;
  }
  
  .modern-section {
    padding: 3rem 0;
  }
  
  .section-header {
    margin-bottom: 2.5rem;
  }
}

/* ============================================
   PROFESSIONAL POLISH
   ============================================ */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background-color: var(--gold-primary);
  color: var(--navy-primary);
}

::-moz-selection {
  background-color: var(--gold-primary);
  color: var(--navy-primary);
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@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;
  }
}

/* ============================================
   LEGACY CARD OVERRIDES - PROFESSIONAL UPGRADE
   ============================================ */

/* Fix all-service-panel cards in Focus Areas */
.all-service-panel.style2 {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.all-service-panel.style2:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-elevated);
  border-color: var(--gold-primary);
}

.all-service-panel.style2 figure {
  margin-bottom: 1.5rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.all-service-panel.style2 figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.all-service-panel.style2:hover figure img.normal-icon {
  transform: scale(1.1);
}

.all-service-panel.style2 h5 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy-primary);
  margin-bottom: 1rem;
  letter-spacing: var(--letter-spacing-tight);
}

.all-service-panel.style2 p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--gray-700);
  margin-bottom: 0;
}

/* Remove old icon switching if hover-icon not needed */
.all-service-panel.style2 .hover-icon {
  display: none;
}

/* Ensure consistent card grid spacing */
.row.justify-content-center > [class*="col-"] {
  margin-bottom: 2rem;
}

@media (min-width: 1200px) {
  .row.justify-content-center > [class*="col-xl-4"] {
    flex: 0 0 auto;
    width: 31.333%;
    margin-left: 1%;
    margin-right: 1%;
  }
}

/* Professional content blocks */
.content-block p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--gray-700);
  margin-bottom: 1.25rem;
}

.section-content p {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* Text color utilities for dark sections */
.text-white-80 p {
  opacity: 0.92;
}

/* ============================================
   CRITICAL OVERRIDES - FORCE PROFESSIONAL STYLES
   ============================================ */

/* Force expertise cards to display properly */
.modern-card.expertise-card {
  display: flex !important;
  flex-direction: column !important;
  background: var(--white) !important;
  border-radius: 16px !important;
  overflow: visible !important;
  min-height: 420px !important;
}

.expertise-card .card-image {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  padding-top: 55% !important;
  overflow: hidden !important;
  border-radius: 16px 16px 0 0 !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.expertise-card .card-image img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Force card content to display */
.expertise-card .card-content {
  display: flex !important;
  flex-direction: column !important;
  padding: 1.75rem 1.5rem !important;
  flex: 1 !important;
}

/* Fix card title truncation */
.expertise-card .card-title {
  font-family: var(--font-display) !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--navy-primary) !important;
  margin-bottom: 0.875rem !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  display: block !important;
  width: 100% !important;
}

/* Fix card text */
.expertise-card .card-text {
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  line-height: 1.65 !important;
  color: var(--gray-600) !important;
  margin-bottom: 1.25rem !important;
  display: block !important;
  width: 100% !important;
}

/* Fix feature list display */
.expertise-card .card-features {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.625rem !important;
}

.expertise-card .card-features li {
  font-family: var(--font-body) !important;
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
  color: var(--gray-700) !important;
  padding-left: 1.5rem !important;
  position: relative !important;
  display: block !important;
  width: 100% !important;
}

.expertise-card .card-features li::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 0.5rem !important;
  width: 6px !important;
  height: 6px !important;
  background: var(--gold-primary) !important;
  border-radius: 50% !important;
  display: block !important;
}

/* Force grid layout - CRITICAL */
.row,
.row.g-4 {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -0.75rem !important;
  margin-right: -0.75rem !important;
  width: auto !important;
}

.row.g-4 > [class*="col-"],
.row > [class*="col-"] {
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  margin-bottom: 1.5rem !important;
  float: none !important;
  display: block !important;
}

/* ============================================
   EXPERTISE CARDS - 4 COLUMN FIX
   ============================================ */

/* Mobile: 1 column */
@media (max-width: 575px) {
  .col-sm-6.col-lg-3 {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Small tablets: 2 columns */
@media (min-width: 576px) and (max-width: 991px) {
  .col-sm-6.col-lg-3 {
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
  }
}

/* Desktop: 4 columns (25% each) */
@media (min-width: 992px) {
  .col-sm-6.col-lg-3 {
    flex: 0 0 25% !important;
    width: 25% !important;
    max-width: 25% !important;
  }
  
  .col-lg-3 {
    flex: 0 0 25% !important;
    width: 25% !important;
    max-width: 25% !important;
  }
  
  .col-lg-4 {
    flex: 0 0 33.333333% !important;
    width: 33.333333% !important;
    max-width: 33.333333% !important;
  }
}

/* Large desktop: Keep 4 columns */
@media (min-width: 1200px) {
  .col-sm-6.col-lg-3 {
    flex: 0 0 25% !important;
    width: 25% !important;
    max-width: 25% !important;
  }
}

/* Ensure images are visible and load properly */
.card-image img[src],
.expertise-card img[src] {
  opacity: 1 !important;
  visibility: visible !important;
  max-width: 100% !important;
}

/* Add loading placeholder for broken images */
.card-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f2f5 0%, #dee2e6 100%);
  z-index: -1;
}

/* Fix any width constraints from Bootstrap/legacy CSS */
.modern-card,
.expertise-card {
  max-width: 100% !important;
  width: 100% !important;
}

/* Ensure row contains properly */
.container {
  width: 100% !important;
  max-width: 1670px !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* ============================================
   HEADER FIXES - STICKY ON SCROLL
   ============================================ */

/* Fix header disappearing on scroll */
.header-wrap,
#header-container .header-wrap {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  background: white !important;
  z-index: 99999 !important;
  transition: all 0.3s ease-in-out !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.header-wrap.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  z-index: 99999 !important;
}

/* Ensure header stays above all content */
#header-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 99999 !important;
}

/* Add padding to body/main to compensate for fixed header */
body,
#content-wrap,
main {
  padding-top: 0 !important;
}

.modern-hero {
  margin-top: 90px !important;
}

/* ============================================
   FOCUS AREAS RESPONSIVE GRID FIX
   ============================================ */

/* Fix Focus Areas cards - proper responsive behavior */
.row.justify-content-center {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
}

.row.justify-content-center > [class*="col-"] {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* FORCE proper responsive columns for Focus Areas */
.row.justify-content-center > .col-lg-6.col-xl-4 {
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
}

/* Mobile: 1 column (full width) */
@media (max-width: 767px) {
  .row.justify-content-center > .col-lg-6.col-xl-4 {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Tablet: 2 columns (50% each) */
@media (min-width: 768px) and (max-width: 1199px) {
  .row.justify-content-center > .col-lg-6.col-xl-4 {
    flex: 0 0 50% !important;
    width: 50% !important;
    max-width: 50% !important;
  }
}

/* Desktop: 3 columns (33.33% each) */
@media (min-width: 1200px) {
  .row.justify-content-center > .col-lg-6.col-xl-4 {
    flex: 0 0 33.333333% !important;
    width: 33.333333% !important;
    max-width: 33.333333% !important;
  }
}

/* Extra safety - target all-service-panel parent divs */
.all-service-panel.style2 {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Fix SVG image paths and visibility */
.all-service-panel.style2 figure {
  display: block !important;
  width: 64px !important;
  height: 64px !important;
  margin-bottom: 1.5rem !important;
  flex-shrink: 0 !important;
}

.all-service-panel.style2 figure img {
  display: block !important;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  opacity: 1 !important;
  visibility: visible !important;
  object-fit: contain !important;
}

/* Ensure SVG rendering */
img[src*=".svg"],
img[src$=".svg"] {
  image-rendering: -webkit-optimize-contrast !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* If image fails to load, show colored placeholder */
.all-service-panel.style2 figure img[src*=".svg"]::after {
  content: '';
  display: block;
  width: 64px;
  height: 64px;
  background: var(--gold-primary);
  border-radius: 50%;
}

/* ============================================
   FINAL OVERRIDES - DARK SECTION TEXT
   THIS MUST BE LAST TO OVERRIDE EVERYTHING
   ============================================ */

/* Absolute final override for dark section paragraph text */
.modern-section.dark-section p,
.dark-section .section-content p,
body .modern-section.dark-section .section-content p,
html body .modern-section.dark-section .section-content p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.0625rem !important;
  line-height: 1.75 !important;
}

/* Force all text in dark section to be white */
.dark-section *:not(a):not(button) {
  color: white !important;
}

/* Ensure links remain clickable with proper color */
.dark-section a {
  color: var(--gold-primary) !important;
}

.dark-section a:hover {
  color: var(--white) !important;
}

/* ============================================
   ULTRA FIX - SVG ICONS MUST BE VISIBLE
   THIS OVERRIDES layout.css LINE 349 which sets display:none
   ============================================ */

/* CRITICAL: Override layout.css line 349 that hides .normal-icon by default */
.all-service-panel .normal-icon,
.all-service-panel:hover .normal-icon,
img.normal-icon,
.normal-icon {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;
  object-fit: contain !important;
  position: relative !important;
  z-index: 10 !important;
  pointer-events: auto !important;
}

/* Remove any display:none on hover-icon class */
.hover-icon,
.all-service-panel .hover-icon {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Target Focus Areas section specifically */
.all-service-panel.style2 img.normal-icon,
.all-service-panel.style2 figure img.normal-icon,
.all-service-panel.style2 figure > img {
  display: block !important;
  width: 64px !important;
  height: 64px !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Fix any parent hiding */
.all-service-panel.style2 figure,
.all-service-panel figure {
  overflow: visible !important;
  position: relative !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure SVG elements inside render properly */
.all-service-panel img[src*=".svg"],
.all-service-panel.style2 img[src*=".svg"] {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================================
   WHATSAPP WIDGET - FORCE VISIBILITY
   ============================================ */

.whatsapp-widget {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 999999 !important;
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.whatsapp-button {
  width: 60px !important;
  height: 60px !important;
  background: #25D366 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4) !important;
}

.whatsapp-button svg {
  width: 28px !important;
  height: 28px !important;
  fill: white !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Mobile WhatsApp */
@media (max-width: 768px) {
  .whatsapp-widget {
    bottom: 15px !important;
    right: 15px !important;
  }
  
  .whatsapp-button {
    width: 56px !important;
    height: 56px !important;
  }
  
  .whatsapp-button svg {
    width: 26px !important;
    height: 26px !important;
  }
}

/* ============================================
   LEGACY SECTION MODERNIZATION
   Fix college-like appearance of old sections
   ============================================ */

/* Remove amateur colored underlines */
.line {
  display: inline !important;
}

.line:after,
.line.blue:after,
.line.green:after,
.line.white:after {
  display: none !important;
}

/* Modernize experts-block section */
.experts-block {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%) !important;
  padding: 5rem 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

.experts-block::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: radial-gradient(circle at 20% 50%, rgba(200, 160, 92, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(200, 160, 92, 0.05) 0%, transparent 50%) !important;
  pointer-events: none !important;
}

.experts-block .title {
  position: relative !important;
  z-index: 1 !important;
  margin-bottom: 0 !important;
}

.experts-block h2 {
  color: var(--white) !important;
  font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin-bottom: 2rem !important;
  letter-spacing: -0.02em !important;
}

.experts-block .text {
  position: relative !important;
  z-index: 1 !important;
}

.experts-block .text p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1.0625rem !important;
  line-height: 1.75 !important;
  margin-bottom: 1.25rem !important;
}

/* Modernize all-service-block section */
.all-service-block {
  background: var(--white) !important;
  padding: 5rem 0 !important;
}

.all-service-block .title h2 {
  color: var(--navy-900) !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 700 !important;
  margin-bottom: 3rem !important;
  text-align: center !important;
  letter-spacing: -0.02em !important;
}

/* Portfolio slider modernization */
.portfolio2-slider-nav,
.portfolio-slider-nav {
  display: flex !important;
  gap: 1rem !important;
  justify-content: center !important;
  margin-bottom: 3rem !important;
  flex-wrap: wrap !important;
}

.portfolio2-slider-nav div,
.portfolio-slider-nav div {
  flex: 0 1 auto !important;
  margin: 0 !important;
}

.portfolio2-slider-nav h6,
.portfolio-slider-nav h6 {
  background: var(--white) !important;
  border: 2px solid var(--navy-100) !important;
  border-radius: 50px !important;
  padding: 0.875rem 2rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  color: var(--navy-900) !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  margin: 0 !important;
  white-space: nowrap !important;
  letter-spacing: 0.01em !important;
}

.portfolio2-slider-nav div:hover h6,
.portfolio-slider-nav div:hover h6,
.portfolio2-slider-nav .slick-current h6,
.portfolio-slider-nav .slick-current h6 {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-light) 100%) !important;
  border-color: var(--gold-primary) !important;
  color: var(--navy-900) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(200, 160, 92, 0.25) !important;
}

/* Portfolio slider content */
.portfolio2-slider-for .inner,
.portfolio-slider-for .inner {
  background: var(--white) !important;
  border-radius: 24px !important;
  padding: 3rem !important;
  box-shadow: 0 4px 24px rgba(10, 22, 40, 0.08) !important;
  margin-bottom: 2rem !important;
  display: flex !important;
  gap: 3rem !important;
  align-items: flex-start !important;
}

.portfolio2-slider-for figure,
.portfolio-slider-for figure {
  flex: 0 0 45% !important;
  margin: 0 !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 32px rgba(10, 22, 40, 0.12) !important;
}

.portfolio2-slider-for figure img,
.portfolio-slider-for figure img {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  display: block !important;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.portfolio2-slider-for figure:hover img,
.portfolio-slider-for figure:hover img {
  transform: scale(1.05) !important;
}

.portfolio2-slider-for .text,
.portfolio-slider-for .text {
  flex: 1 !important;
  position: relative !important;
  background: transparent !important;
  padding: 0 !important;
  height: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  display: block !important;
}

.portfolio2-slider-for .text h4,
.portfolio-slider-for .text h4 {
  color: var(--navy-900) !important;
  font-size: clamp(1.5rem, 2.5vw, 2rem) !important;
  font-weight: 700 !important;
  margin-bottom: 1.5rem !important;
  letter-spacing: -0.02em !important;
}

.portfolio2-slider-for .text p,
.portfolio-slider-for .text p {
  color: var(--navy-600) !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  margin-bottom: 1.5rem !important;
}

.portfolio2-slider-for .text ul,
.portfolio-slider-for .text ul {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin-top: 1.5rem !important;
}

.portfolio2-slider-for .text ul li,
.portfolio-slider-for .text ul li {
  background: var(--navy-50) !important;
  color: var(--navy-800) !important;
  padding: 0.625rem 1.25rem !important;
  border-radius: 50px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  border: 1px solid var(--navy-100) !important;
  transition: all 0.3s ease !important;
}

.portfolio2-slider-for .text ul li:hover,
.portfolio-slider-for .text ul li:hover {
  background: var(--gold-light) !important;
  border-color: var(--gold-primary) !important;
  color: var(--navy-900) !important;
  transform: translateY(-2px) !important;
}

/* Responsive adjustments for sliders */
@media (max-width: 991px) {
  .portfolio2-slider-for .inner,
  .portfolio-slider-for .inner {
    flex-direction: column !important;
    padding: 2rem !important;
    gap: 2rem !important;
  }
  
  .portfolio2-slider-for figure,
  .portfolio-slider-for figure {
    flex: 0 0 100% !important;
  }
  
  .portfolio2-slider-nav h6,
  .portfolio-slider-nav h6 {
    font-size: 0.875rem !important;
    padding: 0.75rem 1.5rem !important;
  }
}

@media (max-width: 576px) {
  .experts-block {
    padding: 3rem 0 !important;
  }
  
  .all-service-block {
    padding: 3rem 0 !important;
  }
  
  .portfolio2-slider-nav,
  .portfolio-slider-nav {
    gap: 0.5rem !important;
  }
  
  .portfolio2-slider-nav h6,
  .portfolio-slider-nav h6 {
    font-size: 0.8125rem !important;
    padding: 0.625rem 1.25rem !important;
  }
}
