/* Performance and Optimization Styles */

/* Optimize font loading */
@font-face {
  font-family: 'Open Sans';
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  font-display: swap;
}

/* Optimize images */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* Reduce layout shifts */
.hero-section {
  min-height: 100vh;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Critical CSS for above-the-fold content */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 997;
  background: rgba(40, 58, 90, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.5s;
}

.navbar {
  padding: 0;
}

.navbar ul {
  margin: 0;
  padding: 0;
  display: flex;
  list-style: none;
  align-items: center;
}

.navbar li {
  position: relative;
}

.navbar a {
  display: flex;
  align-items: center;
  padding: 10px 0 10px 30px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  transition: 0.3s;
  text-decoration: none;
}

.navbar a:hover,
.navbar .active {
  color: #007bff;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section h2 {
    font-size: 1.2rem;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .header,
  .language-selector,
  .back-to-top {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
}

/* Error handling for missing images */
img[src=""],
img:not([src]) {
  opacity: 0;
}

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

/* Optimize third-party content */
iframe {
  loading: lazy;
}

/* Preload critical resources */
.preload-critical {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
}

