/* Base styles */
html {
    scroll-behavior: smooth;
}

/* Logo hover animation */
.logo-text-container {
    height: 2.5rem;
    min-width: 120px;
}

@media (min-width: 640px) {
    .logo-text-container {
        min-width: 200px;
    }
}

/* Smooth text fade animation */
.logo-text-primary,
.logo-text-secondary {
    transition: opacity 0.4s ease-in-out;
}

.logo-text-primary {
    opacity: 1;
}

.logo-text-secondary {
    opacity: 0;
}

.group:hover .logo-text-primary {
    opacity: 0;
}

.group:hover .logo-text-secondary {
    opacity: 1;
}

/* Logo image hover - theme-aware coloring */
.logo-hover {
    transition: transform 0.3s ease-out, filter 0.3s ease-out;
}

.group:hover .logo-hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 8px var(--logo-glow, rgba(139, 90, 60, 0.4)));
}

/* Fixed theme selector - bottom right */
.theme-selector-fixed {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

.theme-selector-fixed select {
    appearance: none;
    cursor: pointer;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-selector-fixed select:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.theme-selector-fixed::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    pointer-events: none;
    opacity: 0.6;
}

/* Active nav link */
.nav-active {
    font-weight: 500;
    color: var(--warm-800);
}

/* Service detail cards */
.service-detail {
    scroll-margin-top: 6rem;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, .theme-selector, footer {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
