/**
 * AdsZilla design system — общий chrome (лендинг + кабинет).
 * Требует tokens.css (--ds-*). Тема: html[data-theme].
 */

/* ——— Glass navigation ——— */
.nav,
.cabinet-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--ds-nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--ds-border);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    height: var(--ds-nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cabinet-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: var(--ds-nav-height);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.logo,
.cabinet-logo-text,
.cabinet-footer-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--ds-primary) 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
}

.logo svg {
    width: 32px;
    height: 32px;
}

.cabinet-logo-text {
    display: inline;
}

.cabinet-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-links a,
.cabinet-nav-link {
    text-decoration: none;
    color: var(--ds-text-muted);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-links a::after,
.cabinet-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ds-primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover,
.cabinet-nav-link:hover,
.cabinet-nav-link.is-active {
    color: var(--ds-text);
}

.nav-links a:hover::after,
.cabinet-nav-link:hover::after,
.cabinet-nav-link.is-active::after {
    width: 100%;
}

.theme-toggle,
.cabinet-theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--ds-border);
    background: var(--ds-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ds-text-muted);
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    flex-shrink: 0;
}

.theme-toggle:hover,
.cabinet-theme-toggle:hover {
    background: var(--ds-primary);
    color: #fff;
    border-color: var(--ds-primary);
    transform: rotate(20deg);
}

/* CTA в nav (только лендинг) */
.nav-cta {
    background: linear-gradient(135deg, var(--ds-primary) 0%, var(--ds-primary-light) 100%);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.2;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.nav-cta:focus-visible {
    outline: 2px solid var(--ds-primary-light);
    outline-offset: 3px;
}

.nav-cta:active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ——— Footer ——— */
footer,
.cabinet-footer {
    background: var(--ds-bg);
    border-top: 1px solid var(--ds-border);
}

footer {
    padding: 80px 24px 32px;
}

.cabinet-footer {
    padding: 64px 24px 32px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 64px;
    max-width: 1280px;
    margin: 0 auto 64px;
}

.cabinet-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    max-width: 1280px;
    margin: 0 auto 48px;
}

.footer-brand p,
.cabinet-footer-brand p {
    color: var(--ds-text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-top: 16px;
}

.footer-col h4,
.cabinet-footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ds-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Unbounded', sans-serif;
}

.cabinet-footer-col h4 {
    margin-bottom: 16px;
}

.footer-col a,
.cabinet-footer-col a {
    display: block;
    color: var(--ds-text-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    transition: color 0.2s, transform 0.2s;
}

.cabinet-footer-col a {
    padding: 6px 0;
}

.footer-col a:hover,
.cabinet-footer-col a:hover {
    color: var(--ds-primary);
    transform: translateX(4px);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid var(--ds-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--ds-text-tertiary);
}

.cabinet-footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--ds-border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--ds-text-tertiary);
}

@media (max-width: 900px) {
    .cabinet-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .cabinet-footer-grid {
        grid-template-columns: 1fr;
    }

    .cabinet-nav-container {
        padding: 0 16px;
    }
}
