/* =============================================
   u2m.io Navbar & Footer - Shared Styles
   Uses CSS custom properties from dashboard.css
   ============================================= */

/* --- Site Navbar --- */
.site-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary, #ffffff);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 56px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Logo --- */
.navbar-logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent, #3b82f6);
    text-decoration: none;
}

/* --- Nav Links (Desktop) --- */
.navbar-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary, #666666);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover {
    color: #3b82f6;
}

.nav-link--active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* --- Hamburger (hidden on desktop) --- */
.navbar-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary, #1a1a2e);
    transition: transform 0.3s, opacity 0.3s;
}

/* --- Body padding for fixed navbar --- */
.has-navbar {
    padding-top: 56px;
}

/* --- Mobile (below 768px) --- */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--bg-primary, #ffffff);
        border-bottom: 1px solid var(--border-color, #e5e7eb);
        padding: 1rem 2rem;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar-menu.is-open {
        display: flex;
        max-height: 300px;
    }

    .navbar-hamburger {
        display: flex;
    }

    /* Hamburger to X animation */
    .navbar-hamburger.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .navbar-hamburger.is-active span:nth-child(2) {
        opacity: 0;
    }

    .navbar-hamburger.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-link {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
        border-bottom: none;
    }

    .nav-link--active {
        color: #3b82f6;
        border-bottom: none;
        font-weight: 600;
    }

    .nav-link--active::before {
        content: '';
        display: inline-block;
        width: 3px;
        height: 14px;
        background: #3b82f6;
        border-radius: 2px;
        margin-right: 8px;
        vertical-align: middle;
    }

    .footer-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* --- Site Footer --- */
.site-footer {
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: var(--bg-primary, #ffffff);
    padding: 1.5rem 2rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Footer Main Row --- */
.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-secondary, #666666);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #3b82f6;
}

.footer-copyright {
    color: var(--text-secondary, #666666);
    font-size: 0.875rem;
}

.footer-copyright a {
    font-size: inherit;
}

/* --- Footer External Row --- */
.footer-external {
    margin-top: 0.75rem;
    text-align: center;
}

.footer-ext-link {
    color: var(--text-secondary, #666666);
    text-decoration: none;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: color 0.2s;
}

.footer-ext-link:hover {
    color: #3b82f6;
}

.footer-dot {
    color: var(--text-secondary, #666666);
    opacity: 0.5;
    margin: 0 0.5rem;
    font-size: 0.75rem;
}

/* --- Mobile Footer --- */
@media (max-width: 768px) {
    .footer-main {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }
}

/* --- Extra Small Screens (480px) --- */
@media (max-width: 480px) {
    .navbar-inner {
        padding: 0 1rem;
    }
}

/* --- Chrome CTA Button --- */
.chrome-cta,
.chrome-cta:link,
.chrome-cta:visited {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
    transition: all 0.3s ease;
}

.chrome-cta:hover {
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.5);
    transform: translateY(-1px);
    background: linear-gradient(135deg, #5a95f5, #45b864);
}

.chrome-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

@media (max-width: 768px) {
    .chrome-cta {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}
