/* Enhanced Navigation Logo Styling */

/* Brand/Logo Container */
.navbar-brand {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color) !important;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1052;
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
}

.navbar-brand:hover {
  color: var(--light-text) !important;
  transform: scale(1.05);
}

/* Logo Image Styling */
.navbar-brand img.brand-text {
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: brightness(1);
}

/* Logo hover effects */
.navbar-brand:hover img.brand-text {
  filter: brightness(1.2);
  transform: scale(1.05);
}

/* Text Brand Styling (fallback when no logo) */
.navbar-brand .brand-text:not(img) {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
}

.navbar-brand .brand-text:not(img)::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.navbar-brand:hover .brand-text:not(img)::after {
  width: 100%;
}

/* Responsive Logo Sizing */
@media (max-width: 1200px) {
  .navbar-brand img.brand-text {
    max-height: 36px;
  }

  .navbar-brand .brand-text:not(img) {
    font-size: 1.8rem;
  }
}

@media (max-width: 992px) {
  .navbar-brand img.brand-text {
    max-height: 35px;
  }

  .navbar-brand .brand-text:not(img) {
    font-size: 1.7rem;
  }
}

@media (max-width: 768px) {
  .navbar-brand {
    padding: 0.25rem 0;
  }

  .navbar-brand img.brand-text {
    max-height: 32px;
  }

  .navbar-brand .brand-text:not(img) {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand img.brand-text {
    max-height: 30px;
  }

  .navbar-brand .brand-text:not(img) {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .navbar-brand img.brand-text {
    max-height: 28px;
  }

  .navbar-brand .brand-text:not(img) {
    font-size: 1.4rem;
  }
}

/* Dark/Light theme compatibility */
@media (prefers-color-scheme: dark) {
  .navbar-brand img.brand-text {
    filter: brightness(1.1);
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navbar-brand img.brand-text {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Loading state for logo */
.navbar-brand img.brand-text[src=""] {
  display: none;
}

/* Error handling - show text fallback if image fails */
.navbar-brand img.brand-text:not([src]),
.navbar-brand img.brand-text[src=""] {
  display: none;
}

.navbar-brand img.brand-text + .brand-text-fallback {
  display: none;
}

/* When image fails to load, show text fallback */
.navbar-brand:has(img.brand-text:not([src])) .brand-text-fallback,
.navbar-brand:has(img.brand-text[src=""]) .brand-text-fallback {
  display: inline-block;
}

/* Scrolled navbar logo adjustments */
.navbar.scrolled .navbar-brand img.brand-text {
  max-height: 35px;
}

.navbar.scrolled .navbar-brand .brand-text:not(img) {
  font-size: 1.8rem;
}

/* Animation for logo appearance */
@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar-brand img.brand-text {
  animation: logoFadeIn 0.6s ease-out;
}

/* Logo with text combination (if you want both logo and text) */
.navbar-brand.logo-with-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand.logo-with-text img.brand-text {
  max-height: 35px;
}

.navbar-brand.logo-with-text .brand-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-color);
}

/* Accessibility improvements */
.navbar-brand img.brand-text {
  alt: attr(alt);
}

.navbar-brand:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Print styles */
@media print {
  .navbar-brand img.brand-text {
    max-height: 30px;
    filter: grayscale(1);
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .navbar-brand,
  .navbar-brand img.brand-text,
  .navbar-brand .brand-text:not(img)::after {
    transition: none;
    animation: none;
  }

  .navbar-brand:hover {
    transform: none;
  }
}

svg.w-5.h-5 {
    width: 20px;
    text: black;
}
