/* Logo sizing — works even if other CSS fails to load (Hostinger-safe) */
img.logo-img {
    max-height: 42px;
    max-width: 130px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.header .logo,
.header .logo-link {
    flex: 0 0 auto;
    max-width: 130px;
    line-height: 0;
}

.site-footer .footer-brand .logo-img {
    max-height: 36px;
    max-width: 120px;
}

.driver-logo .logo-img {
    max-height: 36px;
    max-width: 120px;
}

.sidebar-header .logo-img {
    max-height: 32px;
    max-width: 110px;
}

/* Logo hover & click animations */
a:has(> .logo-img),
.logo:has(> .logo-img) {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

img.logo-img {
    transform-origin: center center;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.3s ease;
    will-change: transform;
}

a:has(> .logo-img):hover .logo-img,
.logo:has(> .logo-img):hover .logo-img {
    transform: scale(1.05) translateY(-1px);
    filter: drop-shadow(0 4px 10px rgba(26, 95, 42, 0.22));
}

a:has(> .logo-img):active .logo-img,
.logo:has(> .logo-img):active .logo-img {
    transform: scale(0.96);
    transition-duration: 0.12s;
    filter: drop-shadow(0 2px 6px rgba(26, 95, 42, 0.2));
}

a.logo-animate-click .logo-img,
.logo.logo-animate-click .logo-img {
    animation: logoClickPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoClickPop {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(0.92);
    }
    55% {
        transform: scale(1.06) translateY(-1px);
    }
    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    img.logo-img,
    a.logo-animate-click .logo-img,
    .logo.logo-animate-click .logo-img {
        animation: none;
        transition: none;
    }

    a:has(> .logo-img):hover .logo-img,
    .logo:has(> .logo-img):hover .logo-img {
        transform: none;
        filter: none;
    }
}
