@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* Font loading fallback */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Inter'), local('Inter-Regular');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Poppins'), local('Poppins-SemiBold');
}

/* Base styles */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
  color: #212529 !important;
  background-color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
}

/* Ensure all text is visible */
h1, h2, h3, h4, h5, h6 {
  color: #212529;
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-weight: 700;
}

p, span, div, li, a {
  color: inherit;
}

/* Explicit text colors for Tailwind classes */
.text-dark-900 {
  color: #212529 !important;
}

.text-dark-800 {
  color: #343a40 !important;
}

.text-dark-700 {
  color: #495057 !important;
}

.text-dark-600 {
  color: #6c757d !important;
}

.text-dark-500 {
  color: #adb5bd !important;
}

.text-dark-400 {
  color: #ced4da !important;
}

.text-primary-600 {
  color: #dc2626 !important;
}

.text-primary-700 {
  color: #b91c1c !important;
}

.text-primary-100 {
  color: #fee2e2 !important;
}

.text-accent-600 {
  color: #0284c7 !important;
}

.text-accent-100 {
  color: #e0f2fe !important;
}

.text-white {
  color: #ffffff !important;
}

/* Background colors */
.bg-primary-600 {
  background-color: #dc2626 !important;
}

.bg-primary-700 {
  background-color: #b91c1c !important;
}

.bg-primary-100 {
  background-color: #fee2e2 !important;
}

.bg-primary-50 {
  background-color: #fef2f2 !important;
}

.bg-accent-600 {
  background-color: #0284c7 !important;
}

.bg-accent-100 {
  background-color: #e0f2fe !important;
}

.bg-accent-50 {
  background-color: #f0f9ff !important;
}

.bg-dark-50 {
  background-color: #f8f9fa !important;
}

.bg-dark-100 {
  background-color: #e9ecef !important;
}

.bg-white {
  background-color: #ffffff !important;
}

.bg-dark-900 {
  background-color: #212529 !important;
}

.bg-dark-800 {
  background-color: #343a40 !important;
}

/* Border colors */
.border-dark-100 {
  border-color: #e9ecef !important;
}

.border-dark-200 {
  border-color: #dee2e6 !important;
}

.border-dark-300 {
  border-color: #ced4da !important;
}

.border-dark-800 {
  border-color: #343a40 !important;
}

* {
  box-sizing: border-box;
}

/* Components */
.gradient-text {
  background: linear-gradient(to right, #dc2626, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.glass-effect {
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding-top: 10rem;
    padding-bottom: 10rem;
  }
}

.container-custom {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
}

.text-balance {
  text-wrap: balance;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
  background: #dc2626;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #b91c1c;
}

/* Animated background patterns */
.animated-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  width: 100%;
  max-width: 100%;
}

.animated-bg::before,
.animated-bg::after {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  max-width: none;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.1) 0%, transparent 70%);
  animation: rotate-slow 30s linear infinite;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.animated-bg::after {
  animation-direction: reverse;
  animation-duration: 40s;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
}

@keyframes rotate-slow {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Gradient mesh background */
.gradient-mesh {
  background: 
    radial-gradient(at 0% 0%, rgba(220, 38, 38, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(220, 38, 38, 0.1) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(14, 165, 233, 0.1) 0px, transparent 50%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delayed {
  animation: fadeIn 1s ease-out 0.3s both;
}

.animate-slide-up {
  animation: slideUp 1s ease-out;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Smooth scroll for anchor links */
html {
  scroll-padding-top: 80px;
}

/* Active nav link */
.nav-link.active {
  color: #dc2626;
  font-weight: 600;
}

/* Responsive fixes */
section {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.grid,
.flex {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Form styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  ring: 2px;
  ring-color: #dc2626;
}

/* Responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
    color: #212529 !important;
  }
  
  h2 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    color: #212529 !important;
  }
  
  h3 {
    font-size: 1.5rem !important;
    color: #212529 !important;
  }
  
  p {
    color: #495057 !important;
  }
}

/* Ensure all text elements have proper color */
section {
  color: #212529 !important;
}

section p {
  color: #495057 !important;
}

section h1,
section h2,
section h3,
section h4,
section h5,
section h6 {
  color: #212529 !important;
}

/* Ensure all sections have visible content */
section * {
  visibility: visible !important;
}

/* Fix empty or missing content */
section:empty::before {
  content: '';
  display: block;
  height: 1px;
}

/* Fix gradient text fallback */
.gradient-text {
  background: linear-gradient(to right, #dc2626, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #dc2626; /* Fallback color */
  display: inline-block;
}

/* Ensure buttons have visible text */
button,
a.button {
  color: inherit;
}

/* Fix form elements */
input,
textarea,
select {
  color: #212529 !important;
  background-color: #ffffff !important;
}

input::placeholder,
textarea::placeholder {
  color: #6c757d !important;
}

/* Ensure all headings are visible */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  color: #212529 !important;
  line-height: 1.2;
}

/* Ensure paragraphs are visible */
p {
  color: #495057 !important;
  line-height: 1.6;
}

/* Ensure spans and divs inherit or have explicit colors */
span:not(.gradient-text) {
  color: inherit;
}

/* Fix links */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: inherit;
}

/* Fix lists */
ul, ol, li {
  color: inherit;
}

/* Ensure buttons have visible text */
button {
  color: inherit;
  font-family: inherit;
}

/* Fix opacity classes */
.text-white\/90 {
  color: rgba(255, 255, 255, 0.9) !important;
}

.text-white\/70 {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Ensure font-display class works */
.font-display {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif !important;
}

/* Fix counter numbers */
.counter {
  color: inherit !important;
  font-weight: 700;
}

/* Ensure all service cards have visible text */
.bg-gradient-to-br.text-white * {
  color: #ffffff !important;
}

.bg-white *:not(.text-primary-600):not(.text-accent-600):not(.text-white) {
  color: #495057 !important;
}

/* Fix footer text */
footer.text-white * {
  color: #ffffff !important;
}

footer .text-dark-400 {
  color: #ced4da !important;
}

/* Ensure labels are visible */
label {
  color: #495057 !important;
  font-weight: 600;
}

/* Fix option text in select */
select option {
  color: #212529 !important;
  background-color: #ffffff !important;
}

/* Force visibility for all text elements */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure icons are visible */
i, .fas, .fab, .far, .fal {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

/* Fix any hidden elements */
[style*="display: none"],
[hidden] {
  display: none !important;
}

/* Ensure visible elements are actually visible */
section,
div,
p,
span,
h1, h2, h3, h4, h5, h6,
a,
button,
li,
ul,
ol {
  opacity: 1 !important;
}

/* Fix any zero-height or zero-width text */
.text-5xl,
.text-6xl,
.text-7xl {
  min-height: 1em;
  line-height: 1.1;
}

/* Ensure counters are visible */
.counter {
  display: block;
  min-height: 1.2em;
  font-size: inherit;
}

/* Fix gradient backgrounds that might hide text */
.bg-gradient-to-br,
.bg-gradient-to-b,
.bg-gradient-to-r {
  position: relative;
}

.bg-gradient-to-br *,
.bg-gradient-to-b *,
.bg-gradient-to-r * {
  position: relative;
  z-index: 1;
}
