/* ========================================================================
   KnigaNet global variables and footer
   ======================================================================== */
:root {
    --kn-bg: #f8fafc;
    --kn-surface: #ffffff;
    --kn-surface-soft: #f1f5f9;
    --kn-ink: #172033;
    --kn-muted: #64748b;
    --kn-line: #e2e8f0;
    --kn-accent: #c27a2c;
    --kn-accent-strong: #8a4d16;
    --kn-accent-rgb: 194, 122, 44;
    --kn-accent-soft: #fff3df;
    --kn-slate: #475569;
    --kn-hero-glow: #c27a2c;
    --kn-card-status-bg: #4f6f52;
    --kn-library-bg: rgba(255, 255, 255, .82);
    --kn-library-icon: #172033;
    --kn-card-meta-bg: rgba(15, 23, 42, .24);
    --kn-card-rating: #f4b63f;
    --kn-card-like: #ef5b45;
    --kn-slider-overlay-rgb: 23, 32, 51;
    --kn-slider-overlay-opacity: .68;
    --kn-radius: 22px;
    --kn-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.kn-site-footer-container {
    padding: 14px 0 14px !important;
    background: transparent !important;
}

.site-footer.kn-site-footer {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    background: transparent !important;
    color: #4a5568 !important;
}

.site-footer.kn-site-footer a {
    color: inherit;
    text-decoration: none;
}

.kn-site-footer .site-footer-inner {
    width: 100% !important;
    max-width: none !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.kn-site-footer__shell {
    width: min(100% - 20px, 1980px);
    margin: 0 auto;
    padding: 12px;
    border: 1px solid rgba(177, 191, 201, 0.45);
    border-radius: 22px;
    background:
        linear-gradient(rgba(177, 191, 201, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(177, 191, 201, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 86% 18%, rgba(2, 174, 201, 0.09), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #fbfdfe 54%, #f3f9fb 100%);
    background-size: 46px 46px, 46px 46px, auto, auto;
    box-shadow: 0 12px 34px rgba(74, 85, 104, 0.06);
}

.kn-site-footer__top {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.58fr);
    gap: 10px;
    margin-bottom: 10px;
}

.kn-site-footer__brand,
.kn-site-footer__contact,
.kn-site-footer__panel,
.kn-site-footer__bottom {
    border: 1px solid rgba(177, 191, 201, 0.34);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 26px rgba(74, 85, 104, 0.05);
    backdrop-filter: blur(10px);
}

.kn-site-footer__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 14px 18px;
    border-radius: 18px;
}

.kn-site-footer__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--kn-accent, #02aec9), #4a5568);
    color: #fff !important;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.04em;
    box-shadow: 0 8px 18px rgba(2, 174, 201, 0.14);
}

.kn-site-footer__eyebrow {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    margin-bottom: 6px;
    color: #3d786f;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.kn-site-footer__brand h2 {
    max-width: 820px;
    margin: 0 0 6px;
    color: #1f2937;
    font-size: clamp(20px, 1.75vw, 30px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0;
}

.kn-site-footer__brand p,
.kn-site-footer__contact p,
.kn-site-footer__notice p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.kn-site-footer__contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
    padding: 14px 18px;
    border-radius: 18px;
}

.kn-site-footer__contact a {
    display: inline-block;
    margin-bottom: 8px;
    color: #4a5568 !important;
    font-size: clamp(16px, 1.25vw, 22px);
    font-weight: 900;
    line-height: 1.1;
    word-break: break-word;
}

.kn-site-footer__middle {
    display: grid;
    grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1.55fr) minmax(245px, 0.48fr);
    gap: 10px;
    margin-bottom: 10px;
}

.kn-site-footer__panel {
    padding: 12px;
    border-radius: 17px;
}

.kn-site-footer__docs {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.kn-site-footer__link-card,
.kn-site-footer__nav-grid a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    gap: 7px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.72);
    color: #5b6678 !important;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.kn-site-footer__link-card {
    padding: 7px 10px;
}

.kn-site-footer__nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 7px 8px;
}

.kn-site-footer__nav-grid a {
    padding: 7px 9px;
}

.kn-site-footer__link-card:hover,
.kn-site-footer__nav-grid a:hover {
    transform: translateY(-2px);
    color: #1f2937 !important;
    box-shadow: 0 12px 26px rgba(74, 85, 104, 0.08);
}

.kn-site-footer__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #718096;
}

.kn-site-footer__icon svg {
    display: block;
    width: 13px;
    height: 13px;
}

.kn-site-footer__notice {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-height: 112px;
}

.kn-site-footer__age {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(191, 138, 64, 0.12);
    color: #9b6725;
    font-size: 13px;
    font-weight: 900;
}

.kn-site-footer__notice strong {
    display: block;
    color: #1f2937;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.18;
}

.kn-site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 34px;
    padding: 8px 14px;
    border-radius: 14px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .kn-site-footer__top,
        .kn-site-footer__middle {
            grid-template-columns: 1fr;
        }
    
        .kn-site-footer__nav-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
}

@media (max-width: 700px) {
    .kn-site-footer-container {
            padding: 12px 0 !important;
        }
    
        .kn-site-footer__shell {
            width: min(100% - 20px, 100%);
            padding: 10px;
            border-radius: 20px;
        }
    
        .kn-site-footer__brand {
            align-items: flex-start;
            flex-direction: column;
            min-height: 0;
            padding: 16px;
            border-radius: 17px;
        }
    
        .kn-site-footer__logo {
            width: 48px;
            height: 48px;
            flex-basis: 48px;
            border-radius: 15px;
            font-size: 18px;
        }
    
        .kn-site-footer__brand h2 {
            font-size: 22px;
            line-height: 1.08;
        }
    
        .kn-site-footer__brand p,
        .kn-site-footer__contact p,
        .kn-site-footer__notice p {
            font-size: 12px;
        }
    
        .kn-site-footer__contact,
        .kn-site-footer__panel {
            min-height: 0;
            padding: 14px;
            border-radius: 17px;
        }
    
        .kn-site-footer__contact a {
            margin-bottom: 8px;
            font-size: 17px;
        }
    
        .kn-site-footer__nav-grid {
            grid-template-columns: 1fr;
        }
    
        .kn-site-footer__bottom {
            align-items: flex-start;
            flex-direction: column;
            padding: 18px 20px;
            font-size: 14px;
        }
}
