/* Logo Browser Compatibility CSS */
/* Ensures proper logo display across all browsers and devices */

/* Base logo styles for cross-browser compatibility */
.header .logo {
  display: flex !important;
  align-items: center !important;
  line-height: 1 !important;
  text-decoration: none !important;
  position: relative !important;
}

.header .logo img {
  display: block !important;
  max-height: 75px !important;
  width: auto !important;
  height: auto !important;
  margin-right: 8px !important;
  object-fit: contain !important;
  object-position: center !important;
  /* Ensure visibility */
  opacity: 1 !important;
  visibility: visible !important;
  /* Prevent image distortion */
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  /* Smooth rendering */
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

/* Safari specific fixes */
@supports (-webkit-appearance: none) {
  .header .logo img {
    -webkit-transform: translateZ(0) !important;
    transform: translateZ(0) !important;
  }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
  .header .logo img {
    image-rendering: -moz-crisp-edges !important;
  }
}

/* Edge/IE specific fixes */
@supports (-ms-ime-align: auto) {
  .header .logo img {
    -ms-interpolation-mode: bicubic !important;
  }
}

/* Responsive logo sizing */
@media (min-width: 1200px) {
  .header .logo img {
    max-height: 85px !important;
  }
}

@media (min-width: 1400px) {
  .header .logo img {
    max-height: 90px !important;
  }
}

@media (min-width: 1600px) {
  .header .logo img {
    max-height: 95px !important;
  }
}

/* Mobile logo adjustments */
@media (max-width: 991.98px) {
  .header .logo img {
    max-height: 65px !important;
  }
}

@media (max-width: 767.98px) {
  .header .logo img {
    max-height: 55px !important;
  }
}

@media (max-width: 575.98px) {
  .header .logo img {
    max-height: 50px !important;
  }
}

/* High DPI display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .header .logo img {
    image-rendering: -webkit-optimize-contrast !important;
  }
}

/* Ensure logo is always visible during page load */
.header .logo img[src*="logo.svg"] {
  min-width: 120px !important;
  min-height: 40px !important;
}

/* Fallback for SVG support issues */
.no-svg .header .logo img[src*="logo.svg"] {
  background-image: url('../img/logo.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

/* Print styles */
@media print {
  .header .logo img {
    max-height: 60px !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
  .header .logo img {
    filter: brightness(1) !important;
  }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  .header .logo img {
    transition: none !important;
    animation: none !important;
  }
}

/* Focus states for accessibility */
.header .logo:focus {
  outline: 2px solid #00a0de !important;
  outline-offset: 2px !important;
}

.header .logo:focus img {
  opacity: 0.9 !important;
}

/* Hover effects */
.header .logo:hover img {
  opacity: 0.95 !important;
  transition: opacity 0.2s ease !important;
}

/* Loading state */
.header .logo img[loading="eager"] {
  content-visibility: visible !important;
}

/* Ensure logo container has proper dimensions */
.header .branding {
  min-height: 80px !important;
  display: flex !important;
  align-items: center !important;
}

/* Additional visibility fixes */
.header .logo {
  z-index: 1000 !important;
  position: relative !important;
}

/* Ensure logo loads immediately */
.header .logo img {
  /* Force immediate loading for critical logo */
  loading: eager !important;
  /* Prevent lazy loading delays */
  content-visibility: visible !important;
  /* Ensure proper stacking */
  z-index: inherit !important;
}

/* Fix for potential SVG rendering issues */
.header .logo img[src$=".svg"] {
  /* Ensure SVG renders properly */
  width: auto !important;
  height: auto !important;
  /* Fix potential SVG scaling issues */
  max-width: none !important;
  /* Ensure SVG is not hidden */
  display: block !important;
}

/* Fallback for browsers that don't support fetchpriority */
@supports not (loading: eager) {
  .header .logo img {
    /* Alternative loading strategy */
    decoding: sync !important;
  }
}

/* Fix for sticky header logo */
.header.sticky-top .logo img {
  transition: max-height 0.3s ease !important;
}

/* Scrolled state adjustments */
.header.scrolled .logo img {
  max-height: 60px !important;
}

@media (min-width: 1200px) {
  .header.scrolled .logo img {
    max-height: 70px !important;
  }
}