/* Logo Styles Enhancement */

/* Ensure logo link has proper display while keeping header rhythm stable */
.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    min-height: 135px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.logo img,
.logo-image {
    width: auto;
    height: auto;
    max-height: 135px;
    aspect-ratio: auto;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
}

/* Stabilize header height so a new logo doesn't resize the container unexpectedly */
header nav,
.nav-container {
    min-height: 70px;
    align-items: center;
}

/* Logo hover effect */
.logo:hover .logo-image {
    transform: scale(1.08);
}

/* Background transitions are now handled exclusively by redesign-styles.css */

/* SVG specific transparency */
svg.logo-image,
.logo svg {
    background-color: transparent !important;
    background: transparent !important;
}

/* Remove backgrounds from wrappers */
.logo-wrapper,
.logo-container,
a.logo,
a[href="/"] img {
    background-color: transparent;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Text fallback styling */
.logo:not(:has(img)) {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--text-primary, #f8fafc);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .logo {
        min-height: 112px;
        width: 112px;
        height: 112px;
        padding: 0;
    }

    .logo img,
    .logo-image {
        width: 112px;
        height: 112px;
        max-height: 112px;
        max-width: 112px;
        transform: scale(1.05);
    }
}

@media (max-width: 480px) {
    .logo {
        min-height: 104px;
        width: 104px;
        height: 104px;
        padding: 0;
    }

    .logo img,
    .logo-image {
        width: 104px;
        height: 104px;
        max-height: 104px;
        max-width: 104px;
        transform: scale(1.08);
    }
}

/* Dark Mode Logo Adaptation */
body.dark .logo-image,
[data-theme="dark"] .logo-image {
    /* Option B: Keep original colors, just brighter + glow to pop against dark bg */
    filter: brightness(1.2) drop-shadow(0 0 1px rgba(255, 255, 255, 0.5)) !important;
}
