* { box-sizing: border-box; }

:root {
    --bg: #f6ead9;
    --surface: #ffffff;
    --surface-2: #fffbf5;
    --text: #122947;
    --muted: #49607d;
    --primary: #102d57;
    --primary-soft: #1d3e70;
    --link: #2a62b0;
    --link-hover: #1f4d8c;
    --border: #ecdfcd;
    --font-body: "Nunito Sans", Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --font-form-size: 1rem;
    --font-form-line: 1.5;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, #fff7ee 0%, transparent 36%),
        radial-gradient(circle at 90% 10%, #efe2d1 0%, transparent 28%),
        var(--bg);
    line-height: 1.6;
}

.container { width: min(1140px, 92%); margin: 0 auto; }

.site-header {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255, 249, 240, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(220, 205, 184, 0.7);
}

.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px; padding: 14px 0;
}

.brand {
    font-family: "Lobster", cursive;
    font-weight: 400;
    font-size: 1.86rem;
    color: #0f3568;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(255, 255, 255, 0.7);
    letter-spacing: 0;
    line-height: 1;
}
a.brand {
    text-decoration: none;
    color: #0f3568;
}
a.brand:hover {
    color: var(--link-hover);
}
.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(16, 45, 87, 0.2);
    border-radius: 13px;
    background: linear-gradient(180deg, #fffdf9 0%, #f5e9d8 100%);
    box-shadow: 0 10px 22px rgba(16, 45, 87, 0.13);
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.nav-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(16, 45, 87, 0.35);
    box-shadow: 0 12px 24px rgba(16, 45, 87, 0.18);
}
.nav-toggle span {
    position: absolute;
    width: 21px;
    height: 2.5px;
    border-radius: 99px;
    background: var(--primary);
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.main-nav { display: flex; gap: 12px; flex-wrap: wrap; }
.main-nav a {
    color: var(--muted); font-weight: 500; font-size: 0.95rem;
    padding: 8px 10px; border-radius: 9px;
    text-decoration: none;
}
.main-nav a:hover { color: var(--link); background: rgba(16, 45, 87, 0.08); }

.site-header nav:not(.main-nav) a {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 10px;
    border-radius: 9px;
    text-decoration: none;
}
.site-header nav:not(.main-nav) a:hover {
    color: var(--link);
    background: rgba(16, 45, 87, 0.08);
}

a {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: rgba(42, 98, 176, 0.38);
    text-underline-offset: 0.18em;
}
a:hover {
    color: var(--link-hover);
    text-decoration-color: rgba(31, 77, 140, 0.55);
}
a.btn,
a.btn-outline {
    text-decoration: none;
}
a.btn:hover {
    color: #fff;
    text-decoration: none;
}
a.btn-outline:hover {
    color: var(--primary);
    text-decoration: none;
}

.btn {
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: #fff; padding: 12px 17px; cursor: pointer; display: inline-block;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: var(--font-form-line);
    box-shadow: 0 10px 24px rgba(16, 45, 87, 0.22);
}
.btn:hover { transform: translateY(-1px); }

main { padding: 34px 0; }

.breadcrumbs { margin: 0 0 20px; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
}
.breadcrumbs-item { display: inline-flex; align-items: center; }
.breadcrumbs-item:not(:last-child)::after {
    content: "/";
    margin: 0 10px;
    color: rgba(73, 96, 125, 0.55);
    font-weight: 500;
    text-decoration: none;
    pointer-events: none;
}
.breadcrumbs a {
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}
.breadcrumbs a:hover { color: var(--link); }
.breadcrumbs [aria-current="page"] {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 14px 30px rgba(16, 45, 87, 0.08);
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.form { display: grid; gap: 12px; }
.form label {
    display: grid;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    line-height: var(--font-form-line);
}
input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--font-form-size);
    font-weight: 400;
    line-height: var(--font-form-line);
    -webkit-font-smoothing: antialiased;
}
textarea {
    min-height: 9rem;
    resize: vertical;
}
input::placeholder,
textarea::placeholder {
    color: var(--muted);
    opacity: 0.88;
    font-family: var(--font-body);
    font-size: var(--font-form-size);
    font-weight: 400;
}
select {
    cursor: pointer;
    appearance: auto;
}
.error { color: #9b1c1c; }
.contact-form-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
#contact-form {
    scroll-margin-top: 6rem;
}
.contact-form { max-width: min(420px, 100%); }
.contact-form .btn { width: auto; align-self: flex-start; }
.contact-form-title {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 4px;
    letter-spacing: 0.01em;
}
.contact-form input,
.contact-form textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(42, 98, 176, 0.45);
    box-shadow: 0 0 0 3px rgba(42, 98, 176, 0.12);
}
.contact-form-section .admin-hint {
    margin: -4px 0 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: var(--font-form-line);
    color: var(--muted);
    max-width: 42rem;
}
.contact-flash {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: var(--font-form-line);
}
.contact-flash--success { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.contact-flash--error { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.contact-flash--warning { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }
.contact-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
h1, h2, h3 { line-height: 1.25; color: var(--primary); margin-top: 0; letter-spacing: 0.01em; }

.site-footer {
    margin-top: 28px; background: var(--primary); color: #f6efe4; padding: 34px 0 20px;
}
.site-footer a {
    color: #f6efe4;
    text-decoration: none;
}
.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: rgba(246, 239, 228, 0.55);
    text-underline-offset: 0.15em;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.social-links {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}
.social-link:hover {
    background: rgba(255, 255, 255, 0.18);
}
.social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.contact-channels-card {
    margin-top: 22px;
}
.contact-channels-title {
    margin: 0 0 12px;
    font-size: 1.35rem;
    color: var(--primary);
}
.contact-channels-list {
    margin: 0;
    padding-left: 1.25rem;
}
.contact-channels-list a[href^="tel:"] {
    color: var(--link);
    text-decoration: none;
    font-weight: 600;
}
.contact-channels-list a[href^="tel:"]:hover {
    color: var(--link-hover);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.social-links--contacts {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.contact-channels-card .social-link {
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.contact-channels-card .social-link:hover {
    background: #fff;
    border-color: rgba(16, 45, 87, 0.22);
    text-decoration: none;
}
.contact-channels-card .social-link:hover span {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.footer-bottom {
    display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(246, 239, 228, 0.3);
    margin-top: 16px; padding-top: 12px; font-size: 0.95rem;
}

/* Превью в визуальном редакторе (TinyMCE), стили как у .content-html на сайте */
body.mce-content-body.content-html-visual {
    font-family: "Nunito Sans", Inter, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
    line-height: 1.6;
}
body.mce-content-body.content-html-visual p,
body.mce-content-body.content-html-visual li { color: var(--text); }
body.mce-content-body.content-html-visual .lp-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(16, 45, 87, 0.06);
}
body.mce-content-body.content-html-visual h2 { margin-bottom: 10px; color: var(--primary); }
body.mce-content-body.content-html-visual h3 { margin-top: 14px; margin-bottom: 8px; color: var(--primary); }

.content-html p, .content-html li { color: var(--text); }
.content-html .lp-section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(16, 45, 87, 0.06);
}
.content-html h2 {
    margin-bottom: 10px;
}
.content-html h3 {
    margin-top: 14px;
    margin-bottom: 8px;
}

.homepage section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: 0 14px 32px rgba(16, 45, 87, 0.09);
}

.homepage .hero {
    background: #ffffff;
}

.homepage .kicker {
    display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--primary); background: rgba(16, 45, 87, 0.1);
    padding: 6px 10px; border-radius: 999px; margin-bottom: 12px;
}

.homepage .hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 12px; max-width: 740px; }
.homepage .lead { font-size: 1.1rem; color: var(--muted); max-width: 760px; }
.homepage .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.homepage .hero-layout {
    display: grid;
    grid-template-columns: 1.2fr minmax(0, 0.8fr);
    gap: 18px;
    align-items: center;
}
.homepage .hero-photo {
    margin: 0;
    justify-self: end;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(16, 45, 87, 0.16);
    background: #fff;
    box-shadow: 0 18px 38px rgba(16, 45, 87, 0.16);
    aspect-ratio: 4 / 5;
    max-height: 420px;
    width: min(100%, calc(420px * 4 / 5));
    max-width: 100%;
}
.homepage .hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: cover;
}

.btn-outline {
    display: inline-block; padding: 11px 16px; border-radius: 12px;
    border: 1px solid var(--primary); color: var(--primary);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: var(--font-form-line);
    background: rgba(255, 255, 255, 0.7);
}

.homepage .trust-line {
    margin-top: 16px; font-size: 0.95rem; color: var(--muted);
    border-top: 1px dashed var(--border); padding-top: 12px;
}

.homepage .grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }

.homepage .feature, .homepage .service-card, .homepage .mini-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
    border: 1px solid #e9dbc7; border-radius: 14px; padding: 16px;
    box-shadow: 0 6px 18px rgba(16, 45, 87, 0.05);
}

.homepage .service-card h3, .homepage .feature strong { font-size: 1.04rem; color: var(--primary); }
.homepage .service-card p, .homepage .feature p { margin-bottom: 8px; color: var(--muted); }
.homepage .service-thumb {
    margin: -4px -4px 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5d8c7;
}
.homepage .service-thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.icon-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.icon-title h3,
.icon-title strong {
    margin: 0;
    line-height: 1.25;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
    line-height: 1;
}

.icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(16, 45, 87, 0.1);
    color: var(--primary);
}

.homepage .cta {
    background: linear-gradient(135deg, #132f57 0%, #26497a 100%);
    border-color: #173866;
    color: #f8efe2;
}
.homepage .cta h2, .homepage .cta p { color: #f8efe2; }
.homepage .cta .btn { background: #f4e6d3; color: #14345d; box-shadow: none; }
.homepage .cta a.btn:hover { color: #14345d; }

/* TinyMCE: превью главной (как .homepage на сайте) */
body.mce-content-body.homepage-visual {
    font-family: "Nunito Sans", Inter, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    max-width: 960px;
    margin: 0 auto;
    padding: 12px;
    line-height: 1.6;
}
body.mce-content-body.homepage-visual section {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
    margin-bottom: 20px;
    box-shadow: 0 14px 32px rgba(16, 45, 87, 0.09);
}
body.mce-content-body.homepage-visual .hero { background: #ffffff; }
body.mce-content-body.homepage-visual .kicker {
    display: inline-block; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--primary); background: rgba(16, 45, 87, 0.1);
    padding: 6px 10px; border-radius: 999px; margin-bottom: 12px;
}
body.mce-content-body.homepage-visual .hero h1 { font-size: clamp(1.5rem, 3vw, 2.4rem); margin-bottom: 12px; max-width: 740px; color: var(--primary); }
body.mce-content-body.homepage-visual .lead { font-size: 1.1rem; color: var(--muted); max-width: 760px; }
body.mce-content-body.homepage-visual .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
body.mce-content-body.homepage-visual .hero-layout {
    display: grid;
    grid-template-columns: 1.2fr minmax(0, 0.8fr);
    gap: 18px;
    align-items: center;
}
body.mce-content-body.homepage-visual .hero-photo {
    margin: 0;
    justify-self: end;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(16, 45, 87, 0.16);
    background: #fff;
    box-shadow: 0 18px 38px rgba(16, 45, 87, 0.16);
    aspect-ratio: 4 / 5;
    max-height: 320px;
    width: min(100%, 280px);
    max-width: 100%;
}
body.mce-content-body.homepage-visual .hero-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
body.mce-content-body.homepage-visual .trust-line {
    margin-top: 16px; font-size: 0.95rem; color: var(--muted);
    border-top: 1px dashed var(--border); padding-top: 12px;
}
body.mce-content-body.homepage-visual .grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
body.mce-content-body.homepage-visual .feature,
body.mce-content-body.homepage-visual .service-card,
body.mce-content-body.homepage-visual .mini-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%);
    border: 1px solid #e9dbc7; border-radius: 14px; padding: 16px;
    box-shadow: 0 6px 18px rgba(16, 45, 87, 0.05);
}
body.mce-content-body.homepage-visual .service-card h3,
body.mce-content-body.homepage-visual .feature strong { font-size: 1.04rem; color: var(--primary); }
body.mce-content-body.homepage-visual .service-thumb {
    margin: -4px -4px 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5d8c7;
}
body.mce-content-body.homepage-visual .service-thumb img { display: block; width: 100%; height: auto; }
body.mce-content-body.homepage-visual .cta {
    background: linear-gradient(135deg, #132f57 0%, #26497a 100%);
    border-color: #173866;
    color: #f8efe2;
}
body.mce-content-body.homepage-visual .cta h2,
body.mce-content-body.homepage-visual .cta p { color: #f8efe2; }
body.mce-content-body.homepage-visual .cta .btn { background: #f4e6d3; color: #14345d; box-shadow: none; }
body.mce-content-body.homepage-visual .cta a.btn:hover { color: #14345d; }

@media (max-width: 760px) {
    .site-header .container {
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        position: relative;
    }
    .brand {
        font-size: 1.56rem;
        flex: 1;
    }
    .nav-toggle {
        display: inline-flex;
        flex-shrink: 0;
    }
    .site-header.nav-ready .main-nav,
    .site-header.nav-ready .btn {
        display: none;
    }
    .site-header.nav-ready.nav-open .main-nav {
        display: grid;
        gap: 8px;
        width: 100%;
        margin-top: 6px;
        padding: 14px;
        border-radius: 14px;
        border: 1px solid rgba(16, 45, 87, 0.12);
        background: linear-gradient(180deg, #fffdf9 0%, #fff3e2 100%);
        box-shadow: 0 14px 30px rgba(16, 45, 87, 0.1);
        animation: nav-drop 0.2s ease-out;
        order: 3;
    }
    .site-header.nav-ready.nav-open .main-nav a {
        padding: 10px 12px;
        border-radius: 10px;
        font-weight: 600;
        color: var(--link);
        background: rgba(16, 45, 87, 0.04);
    }
    .site-header.nav-ready.nav-open .btn {
        display: inline-block;
        width: 100%;
        text-align: center;
        margin-top: 8px;
        order: 4;
    }
    .site-header.nav-ready.nav-open .nav-toggle span:nth-child(1) {
        top: 21px;
        transform: rotate(45deg);
    }
    .site-header.nav-ready.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .site-header.nav-ready.nav-open .nav-toggle span:nth-child(3) {
        top: 21px;
        transform: rotate(-45deg);
    }
    .homepage section { padding: 20px; border-radius: 16px; }
    .homepage .hero-layout { grid-template-columns: 1fr; }
    .homepage .hero-photo {
        justify-self: center;
        margin-left: auto;
        margin-right: auto;
    }
}

@keyframes nav-drop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Админка: сырой HTML без CKEditor (сохраняет классы и структуру лендингов) */
.admin-html-source {
    width: 100%;
    min-height: 22rem;
    padding: 12px 14px;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    resize: vertical;
}
.admin-hint {
    margin: -6px 0 16px;
    font-size: 13px;
    color: var(--muted);
    max-width: 72ch;
}

/* Блоки дипломов и сертификатов (about/education) */
.education-page-heading {
    margin: 0 0 18px;
    font-size: clamp(1.45rem, 4vw, 1.75rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
    letter-spacing: 0.01em;
}
.docs-doc-block {
    margin-top: 18px;
}
.education-page-heading + .docs-doc-block {
    margin-top: 0;
}
.docs-doc-title {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
    letter-spacing: 0.01em;
}
.docs-doc-desc {
    margin: 0 0 18px;
    font-size: 0.98rem;
    line-height: 1.62;
    color: var(--text);
}
.docs-doc-zoom {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
    text-align: left;
    border-radius: 14px;
    transition: transform 0.2s ease;
}
.docs-doc-zoom:focus-visible {
    outline: 3px solid rgba(42, 98, 176, 0.45);
    outline-offset: 4px;
}
.docs-doc-zoom:hover {
    transform: translateY(-2px);
}
.docs-doc-zoom:hover .docs-doc-zoom-frame {
    box-shadow: 0 14px 32px rgba(16, 45, 87, 0.16);
    border-color: rgba(42, 98, 176, 0.25);
}
.docs-doc-zoom-frame {
    display: inline-block;
    max-width: min(260px, 88vw);
    max-height: 320px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-2);
    box-shadow: 0 10px 24px rgba(16, 45, 87, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 0;
}
.docs-doc-zoom-frame img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 320px;
    display: block;
    vertical-align: middle;
    object-fit: contain;
}
.docs-doc-zoom-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 500;
}
.docs-lightbox {
    max-width: min(96vw, 920px);
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(16, 45, 87, 0.35);
}
.docs-lightbox::backdrop {
    background: rgba(18, 41, 71, 0.62);
    backdrop-filter: blur(4px);
}
.docs-lightbox-inner {
    padding: 12px 12px 16px;
}
.docs-lightbox-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 10px;
}
.docs-lightbox-close {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--primary);
    cursor: pointer;
}
.docs-lightbox-close:hover {
    border-color: rgba(42, 98, 176, 0.35);
    background: #fff;
}
.docs-lightbox-stage {
    min-width: 0;
}
.docs-lightbox-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(78vh, 900px);
    object-fit: contain;
    margin: 0 auto;
    border-radius: 10px;
}

/* Страница /about/education - аккуратные превью дипломов */
.content-page[data-slug="about/education"] .content-html {
    display: grid;
    gap: 14px;
}
.content-page[data-slug="about/education"] .content-html .lp-doc-figure {
    margin: 10px 0 2px;
    width: auto;
    max-width: 100%;
    display: inline-block;
}
.content-page[data-slug="about/education"] .content-html .lp-doc-thumb,
.content-page[data-slug="about/education"] .content-html .lp-doc-figure img[src^="/images/docs/"] {
    display: block;
    width: auto;
    max-width: min(100%, 520px);
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    box-shadow: 0 8px 24px rgba(16, 45, 87, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.content-page[data-slug="about/education"] .content-html .lp-doc-figure.docs-portrait img[src^="/images/docs/"] {
    max-height: 460px;
    max-width: min(100%, 340px);
}
.content-page[data-slug="about/education"] .content-html .lp-doc-figure.docs-square img[src^="/images/docs/"] {
    max-height: 380px;
    max-width: min(100%, 380px);
}
.content-page[data-slug="about/education"] .content-html .lp-doc-figure.docs-landscape img[src^="/images/docs/"] {
    max-height: 320px;
    max-width: min(100%, 560px);
}
.content-page[data-slug="about/education"] .content-html .lp-doc-thumb:hover,
.content-page[data-slug="about/education"] .content-html .lp-doc-figure img[src^="/images/docs/"]:hover {
    transform: translateY(-1px);
    border-color: rgba(42, 98, 176, 0.35);
    box-shadow: 0 12px 26px rgba(16, 45, 87, 0.16);
}
@media (max-width: 640px) {
    .content-page[data-slug="about/education"] .content-html .lp-doc-figure {
        width: 100%;
    }
}

.admin-flash {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    margin: 12px 0 0;
}
.admin-flash--success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
}
.admin-flash--error {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th {
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-table tbody tr:hover {
    background: var(--surface-2);
}
.muted {
    color: var(--muted);
    font-size: 13px;
    word-break: break-all;
}
