/* Top Navigation iOS Liquid Glass Aesthetic */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: clamp(60px, 10vh, 80px);
    background: var(--surface-glass, rgba(255, 255, 255, 0.45));
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-bottom: 1px solid var(--surface-border, rgba(255, 255, 255, 0.35));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 5vw, 2.5rem);
    z-index: 2000;
    padding-top: env(safe-area-inset-top, 0);
    transition: height 0.3s ease;
}

.top-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-heading, #1d1d1f);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

/* Target the image directly since it has class 'nav-logo' */
.top-nav img.nav-logo {
    height: 64px;
    width: auto;
}

.top-nav .nav-links {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
}

.top-nav .nav-link {
    text-decoration: none;
    color: var(--text-body, #424245);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
}

.top-nav .nav-link:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary, #007aff);
}

.top-nav .nav-link.active {
    color: var(--primary, #007aff);
    font-weight: 600;
}

body {
    padding-top: calc(clamp(60px, 10vh, 80px) + 2rem + env(safe-area-inset-top, 0));
}

/* Extra padding for mobile stacked nav */
@media (max-width: 600px) {
    body {
        padding-top: 100px !important;
        /* Adjusted for compact header */
    }
}

/* Dark mode support removed by user request */

@media (max-width: 600px) {
    .top-nav {
        /* Allow height to grow for stacked layout */
        height: auto;
        min-height: 80px;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding-bottom: 12px;
    }

    .top-nav .nav-brand {
        /* Center brand */
        margin-right: 0;
    }

    .top-nav .nav-links {
        /* Move links below */
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .top-nav .nav-link {
        font-size: 0.85rem;
        padding: 6px 12px;
        background: rgba(0, 0, 0, 0.03);
        /* Subtle bg for buttons */
    }

    /* Keep the text visible but maybe smaller? Or keep hiding it if preferred. 
       User asked to center the logo. 
       Usually centering strictly the image is enough. */
    .top-nav .nav-logo {
        justify-content: center;
        padding-top: 6px;
    }

    .top-nav img.nav-logo {
        height: 48px !important;
        /* Directly set to 48px (slightly smaller than 64px) */
        width: auto;
    }

    .top-nav .nav-title {
        display: none !important;
        /* Force hide the RESQ text */
    }
}