/*
 * KalininPro About — spacing aligned with the current Home page
 * Text/HTML is untouched.
 *
 * Rhythm source:
 * - desktop section: 66px
 * - mobile section: 44px
 * - desktop container: 1160px / 48px side reserve
 * - mobile container: 32px side reserve
 * - hero: 36px top / 44px bottom
 */

:root {
    --kpa-purple: #4d3bfe;
    --kpa-purple-dark: #3f30da;
    --kpa-purple-soft: #f0eeff;
    --kpa-purple-faint: #f8f7ff;
    --kpa-ink: #191a1f;
    --kpa-text: #34353c;
    --kpa-muted: #6a6c75;
    --kpa-line: #e5e6eb;
    --kpa-soft: #f6f7fa;
    --kpa-white: #ffffff;
    --kpa-max: 1160px;
    --kpa-radius: 18px;
    --kpa-shadow: 0 16px 38px rgba(25, 26, 31, .07);
}

/* =========================================================
   REBOOT / THEME SAFETY
   ========================================================= */

body.kp-about-template #primary,
body.kp-about-template .content-area,
body.kp-about-template .site-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.kp-about-template #secondary,
body.kp-about-template .sidebar,
body.kp-about-template .widget-area {
    display: none !important;
}

/* =========================================================
   BASE
   ========================================================= */

.kpa,
.kpa *,
.kpa *::before,
.kpa *::after {
    box-sizing: border-box;
}

.kpa {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow-x: clip;
    background: var(--kpa-white);
    color: var(--kpa-ink);
    font-family: inherit;
    line-height: 1.6;
}

.kpa a {
    color: inherit;
    text-decoration: none;
}

.kpa img {
    display: block;
    max-width: 100%;
    height: auto;
}

.kpa h1,
.kpa h2,
.kpa h3,
.kpa p,
.kpa blockquote,
.kpa figure {
    max-width: none;
}

.kpa h1,
.kpa h2,
.kpa h3 {
    font-family: inherit;
}

.kpa-container {
    width: calc(100% - 48px);
    max-width: var(--kpa-max);
    min-width: 0;
    margin: 0 auto;
    padding: 0;
}

.kpa-section {
    width: 100%;
    padding: 66px 0;
    scroll-margin-top: 24px;
}

.kpa-section--soft {
    background: var(--kpa-soft);
}

.kpa-eyebrow {
    margin: 0;
    color: #747680;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.kpa-section-head {
    max-width: 720px;
    margin-bottom: 30px;
}

.kpa-section-head h2 {
    margin: 10px 0 0;
    color: var(--kpa-ink);
    font-size: clamp(32px, 3.7vw, 46px);
    line-height: 1.08;
    letter-spacing: -.038em;
    font-weight: 850;
}

.kpa-section-head--light h2,
.kpa-section-head--light .kpa-eyebrow {
    color: #fff;
}

.kpa-section-lead {
    max-width: 640px !important;
    margin: -8px 0 28px;
    color: var(--kpa-muted);
    font-size: 16px;
    line-height: 1.62;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.kpa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.kpa-btn {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 19px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    transition:
        transform .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.kpa-btn:hover {
    transform: translateY(-1px);
}

.kpa-btn--primary {
    background: var(--kpa-purple);
    color: #fff !important;
    box-shadow: 0 8px 20px rgba(77, 59, 254, .16);
}

.kpa-btn--primary:hover {
    background: var(--kpa-purple-dark);
}

.kpa-btn--secondary {
    border-color: var(--kpa-line);
    background: #fff;
    color: var(--kpa-ink) !important;
}

.kpa-btn--secondary:hover {
    border-color: #c8c9d0;
}

.kpa-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

@media (max-width: 700px) {
    .kpa-create-actions {
        flex-direction: column;
    }

    .kpa-create-actions .kpa-btn {
        width: 100%;
    }
}

/* =========================================================
   HERO
   ========================================================= */

.kpa-hero {
    padding: 36px 0 44px;
    border-bottom: 1px solid #efeff3;
    background: linear-gradient(180deg, #fff 0%, #fcfcff 100%);
}

.kpa-hero__grid {
    min-width: 0;
}

.kpa-hero__grid--photo {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(230px, .58fr);
    gap: 52px;
    align-items: center;
}

.kpa-hero__grid--text {
    display: block;
    max-width: 900px;
}

/* убираем старую декоративную "фиолетовую карточку",
   если она осталась от прошлой версии CSS */
.kpa-hero__grid--text::before,
.kpa-hero__grid--text::after,
.kpa-hero__copy::before,
.kpa-hero__copy::after {
    content: none !important;
    display: none !important;
}

.kpa-hero__copy {
    min-width: 0;
    max-width: 900px;
}

.kpa-hero h1 {
    max-width: 880px;
    margin: 14px 0 0;
    color: var(--kpa-ink);
    font-size: clamp(42px, 4.5vw, 58px);
    line-height: 1.015;
    letter-spacing: -.048em;
    font-weight: 880;
}

.kpa-hero__lead {
    max-width: 700px !important;
    margin: 22px 0 0;
    color: var(--kpa-text);
    font-size: clamp(18px, 1.6vw, 21px);
    line-height: 1.52;
    letter-spacing: -.012em;
    font-weight: 700;
}

.kpa-hero__sub {
    max-width: 650px !important;
    margin: 12px 0 0;
    color: var(--kpa-muted);
    font-size: 15px;
    line-height: 1.62;
}

.kpa-photo {
    width: 100%;
    max-width: 310px;
    justify-self: end;
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--kpa-purple-soft);
    box-shadow: 0 15px 36px rgba(25, 26, 31, .09);
}

.kpa-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 18%;
}

/* =========================================================
   STORY
   ========================================================= */

.kpa-story {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(250px, .62fr);
    gap: 56px;
    align-items: start;
}

.kpa-story--second {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 38px;
    padding-top: 0;
    border-top: 0;
}

.kpa-story--second .kpa-prose {
    max-width: none;
    padding: 22px;
    border: 1px solid var(--kpa-line);
    border-top: 3px solid var(--kpa-purple);
    border-radius: var(--kpa-radius);
    background: #fff;
}

.kpa-prose {
    min-width: 0;
    max-width: 700px;
}

.kpa-prose h3 {
    margin: 0 0 12px;
    color: var(--kpa-ink);
    font-size: 20px;
    line-height: 1.22;
    letter-spacing: -.025em;
    font-weight: 830;
}

.kpa-prose p {
    margin: 0 0 16px;
    color: var(--kpa-text);
    font-size: 15px;
    line-height: 1.66;
}

.kpa-prose p:last-child {
    margin-bottom: 0;
}

.kpa-prose__lead {
    color: var(--kpa-ink) !important;
    font-size: 18px !important;
    line-height: 1.55 !important;
    letter-spacing: -.015em;
    font-weight: 700;
}

.kpa-quote {
    margin: 0;
    padding: 24px;
    border: 1px solid #dedbff;
    border-radius: var(--kpa-radius);
    background: var(--kpa-purple-soft);
}

.kpa-quote p {
    margin: 0;
    color: var(--kpa-ink);
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: -.025em;
    font-weight: 800;
}

/* =========================================================
   APPROACH
   ========================================================= */

.kpa-cards {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.kpa-cards--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpa-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--kpa-line);
    border-radius: var(--kpa-radius);
    background: #fff;
}

.kpa-card__num {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 10px;
    background: var(--kpa-purple-soft);
    color: var(--kpa-purple);
    font-size: 10px;
    font-weight: 900;
}

.kpa-card h3 {
    margin: 0;
    color: var(--kpa-ink);
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -.028em;
    font-weight: 830;
}

.kpa-card p {
    margin: 10px 0 0;
    color: var(--kpa-muted);
    font-size: 14px;
    line-height: 1.58;
}

.kpa-big-quote {
    max-width: 820px !important;
    margin: 34px 0 0;
    padding: 4px 0 4px 22px;
    border: 0;
    border-left: 3px solid var(--kpa-purple);
    background: transparent;
    color: var(--kpa-ink);
    font-size: clamp(25px, 2.8vw, 34px);
    line-height: 1.22;
    letter-spacing: -.034em;
    font-weight: 850;
}

.kpa-approach-note {
    max-width: 760px !important;
    margin: 20px 0 0;
    color: var(--kpa-muted);
    font-size: 14px;
    line-height: 1.62;
}

/* =========================================================
   CREDIBILITY
   ========================================================= */

.kpa-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    border: 0;
}

.kpa-stat {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--kpa-line);
    border-radius: var(--kpa-radius);
    background: #fff;
}

.kpa-stat:first-child {
    padding-left: 22px;
}

.kpa-stat + .kpa-stat {
    border-left: 1px solid var(--kpa-line);
}

.kpa-stat strong {
    display: block;
    color: var(--kpa-ink);
    font-size: 28px;
    line-height: 1;
    letter-spacing: -.04em;
}

.kpa-stat span {
    display: block;
    margin-top: 8px;
    color: var(--kpa-muted);
    font-size: 12px;
    line-height: 1.45;
}

.kpa-credentials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid var(--kpa-line);
    border-radius: var(--kpa-radius);
    background: var(--kpa-soft);
}

.kpa-credentials p {
    margin: 0;
    padding: 20px;
    color: var(--kpa-muted);
    font-size: 13px;
    line-height: 1.58;
}

.kpa-credentials p + p {
    border-left: 1px solid var(--kpa-line);
}

/* =========================================================
   EDUCATION / QUALIFICATIONS
   ========================================================= */

.kpa-education {
    width: fit-content;
    max-width: 100%;
    margin-top: 14px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Когда раскрыто — контент может занять всю ширину */
.kpa-education[open] {
    width: 100%;
}

.kpa-education__toggle {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0 0 10px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--kpa-purple);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.kpa-education__toggle::-webkit-details-marker {
    display: none;
}

.kpa-education__toggle::marker {
    content: "";
}

.kpa-education__toggle:hover {
    background: transparent;
}

.kpa-education__toggle > span:first-child {
    color: var(--kpa-purple);
}

.kpa-education__arrow {
    flex: 0 0 auto;
    display: inline-block;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--kpa-purple);
    font-size: 16px;
    line-height: 1;
    transition: transform .18s ease;
}

.kpa-education[open] .kpa-education__arrow {
    transform: rotate(90deg);
}

.kpa-education__content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 34px;
    padding: 6px 18px 22px;
    border-top: 1px solid var(--kpa-line);
    background: #fafaff;
}

.kpa-education__group {
    min-width: 0;
	margin: 0 0 10px;
    padding: 20px 0 4px;
}

.kpa-education__group:nth-child(n + 3) {
    margin-top: 6px;
    border-top: 1px solid var(--kpa-line);
}

.kpa-education__group h3 {
    margin: 0;
    color: var(--kpa-ink);
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: -.015em;
    font-weight: 820;
}

.kpa-education__group ul {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.kpa-education__group li {
    position: relative;
    margin: 0;
    padding-left: 16px;
    color: var(--kpa-muted);
    font-size: 13px;
    line-height: 1.55;
}

.kpa-education__group li + li {
    margin-top: 7px;
}

.kpa-education__group li::before {
    content: "";
    position: absolute;
    top: .65em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--kpa-purple);
}

@media (max-width: 700px) {
    .kpa-education {
        margin-top: 10px;
        border-radius: 15px;
    }

    .kpa-education__toggle {
        padding: 15px 16px;
        font-size: 13px;
    }

    .kpa-education__content {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 2px 16px 18px;
    }

    .kpa-education__group {
        padding: 17px 0 3px;
    }

    .kpa-education__group + .kpa-education__group {
        margin-top: 6px;
        border-top: 1px solid var(--kpa-line);
    }

    .kpa-education__group h3 {
        font-size: 15px;
    }

    .kpa-education__group li {
        font-size: 13px;
    }
}

/* =========================================================
   HUMAN
   ========================================================= */

.kpa-human {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 40px;
    align-items: center;
}

.kpa-human .kpa-prose {
    max-width: 700px;
}

.kpa-human__card {
    padding: 24px;
    border-radius: var(--kpa-radius);
    background: var(--kpa-ink);
    box-shadow: var(--kpa-shadow);
}

.kpa-human__card p {
    margin: 0 0 14px;
    color: rgba(255,255,255,.76);
    font-size: 14px;
    line-height: 1.6;
}

.kpa-human__card p:last-child {
    margin-bottom: 0;
    color: #fff;
    font-size: 16px;
    line-height: 1.52;
    font-weight: 720;
}

/* =========================================================
   CREATE
   ========================================================= */

.kpa-cards--links .kpa-card {
    border-top: 3px solid var(--kpa-purple);
}

.kpa-inline-action {
    margin-top: 20px;
}

.kpa-text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--kpa-purple) !important;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 850;
}

.kpa-text-link span {
    transition: transform .18s ease;
}

.kpa-text-link:hover span {
    transform: translateX(3px);
}

/* =========================================================
   PRINCIPLES
   ========================================================= */

.kpa-principles {
    padding: 66px 0;
    background: var(--kpa-purple);
}

.kpa-principles__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.kpa-principles__grid article {
    min-width: 0;
    padding: 20px;
    border-radius: 14px;
    background: rgba(20, 15, 65, .18);
	border: 1px solid rgba(255, 255, 255, .01);
}

.kpa-principles__grid article:nth-child(odd),
.kpa-principles__grid article:nth-last-child(-n+2) {
    border-right: 1px solid rgba(255,255,255,.01);
    border-bottom: 1px solid rgba(255,255,255,.01);
}

.kpa-principles__grid h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.22;
    letter-spacing: -.02em;
}

.kpa-principles__grid p {
    margin: 8px 0 0;
    color: rgba(255,255,255,.74);
    font-size: 13px;
    line-height: 1.55;
}

/* =========================================================
   FINAL
   ========================================================= */

.kpa-final {
    padding: 52px 0 58px;
    background: #fff;
}

.kpa-final__box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 40px;
    align-items: center;
    padding: 30px;
    border-radius: var(--kpa-radius);
    background: var(--kpa-ink);
    box-shadow: var(--kpa-shadow);
}

.kpa-final__copy {
    max-width: 720px;
}

.kpa-final__copy h2 {
    max-width: 680px !important;
    margin: 8px 0 0;
    color: #fff;
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.kpa-final__copy > p:last-child {
    max-width: 660px !important;
    margin: 12px 0 0;
    color: rgba(255,255,255,.68);
    font-size: 14px;
    line-height: 1.6;
}

.kpa-actions--final {
    min-width: 235px;
    flex-direction: column;
    margin-top: 0;
}

.kpa-final__box .kpa-btn--secondary {
    border-color: rgba(255,255,255,.20);
    background: transparent;
    color: #fff !important;
}

.kpa-final__note {
    margin: 12px 0 0;
    color: var(--kpa-muted);
    font-size: 11px;
    line-height: 1.45;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
    .kpa-hero__grid--photo {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 40px;
    }

    .kpa-story {
        gap: 40px;
    }

    .kpa-human {
        gap: 32px;
    }
}

@media (max-width: 700px) {
    .kpa-container {
        width: calc(100% - 32px);
    }

    .kpa-section {
        padding: 44px 0;
    }

    .kpa-hero {
        padding: 30px 0 34px;
    }

    .kpa-hero__grid--photo {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .kpa-photo {
        width: min(100%, 320px);
        max-width: none;
        justify-self: start;
        border-radius: 16px;
    }

    .kpa-hero h1 {
        margin-top: 10px;
        font-size: 38px;
        line-height: 1.03;
    }

    .kpa-hero__lead {
        margin-top: 17px;
        font-size: 16px;
        line-height: 1.5;
    }

    .kpa-hero__sub {
        margin-top: 10px;
        font-size: 14px;
    }

    .kpa-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 22px;
    }

    .kpa-btn {
        width: 100%;
        min-height: 46px;
        padding: 12px 16px;
    }

    .kpa-section-head {
        margin-bottom: 22px;
    }

    .kpa-section-head h2 {
        margin-top: 8px;
        font-size: 30px;
        line-height: 1.08;
    }

    .kpa-section-lead {
        margin: -4px 0 22px;
        font-size: 14px;
        line-height: 1.55;
    }

    .kpa-story,
    .kpa-story--second,
    .kpa-cards--3,
    .kpa-stats,
    .kpa-credentials,
    .kpa-human,
    .kpa-principles__grid,
    .kpa-final__box {
        grid-template-columns: 1fr;
    }

    .kpa-story {
        gap: 22px;
    }

    .kpa-story--second {
        gap: 10px;
        margin-top: 30px;
    }

    .kpa-story--second .kpa-prose {
        padding: 18px;
        border-radius: 15px;
    }

    .kpa-prose h3 {
        margin-bottom: 10px;
        font-size: 19px;
    }

    .kpa-prose p {
        margin-bottom: 13px;
        font-size: 14px;
        line-height: 1.62;
    }

    .kpa-prose__lead {
        font-size: 16px !important;
        line-height: 1.52 !important;
    }

    .kpa-quote {
        padding: 20px;
        border-radius: 15px;
    }

    .kpa-quote p {
        font-size: 19px;
        line-height: 1.4;
    }

    .kpa-cards {
        gap: 10px;
    }

    .kpa-card {
        padding: 18px;
        border-radius: 15px;
    }

    .kpa-card__num {
        margin-bottom: 14px;
    }

    .kpa-card h3 {
        font-size: 19px;
    }

    .kpa-card p {
        margin-top: 8px;
        font-size: 13px;
    }

    .kpa-big-quote {
        margin-top: 26px;
        padding-left: 17px;
        font-size: 24px;
    }

    .kpa-approach-note {
        margin-top: 16px;
        font-size: 13px;
    }

    .kpa-stats {
        gap: 10px;
    }

    .kpa-stat,
    .kpa-stat:first-child {
        padding: 18px;
        border: 1px solid var(--kpa-line);
        border-radius: 15px;
    }

    .kpa-stat + .kpa-stat {
        border-left: 1px solid var(--kpa-line);
    }

    .kpa-stat strong {
        font-size: 26px;
    }

    .kpa-credentials {
        gap: 0;
        margin-top: 10px;
        border-radius: 15px;
    }

    .kpa-credentials p {
        padding: 17px;
        font-size: 13px;
    }

    .kpa-credentials p + p {
        border-top: 1px solid var(--kpa-line);
        border-left: 0;
    }

    .kpa-human {
        gap: 20px;
    }

    .kpa-human__card {
        padding: 20px;
        border-radius: 15px;
    }

    .kpa-inline-action {
        margin-top: 16px;
    }

    .kpa-principles {
        padding: 44px 0;
    }

    .kpa-principles__grid {
        gap: 8px;
    }

    .kpa-principles__grid article {
        padding: 18px;
        border-radius: 13px;
    }

    .kpa-final {
        padding: 36px 0 40px;
    }

    .kpa-final__box {
        gap: 22px;
        padding: 22px 18px;
        border-radius: 15px;
    }

    .kpa-final__copy h2 {
        font-size: 28px;
        line-height: 1.1;
    }

    .kpa-final__copy > p:last-child {
        margin-top: 10px;
        font-size: 13px;
    }

    .kpa-actions--final {
        min-width: 0;
        flex-direction: column;
    }
}

@media (max-width: 390px) {
    .kpa-container {
        width: calc(100% - 24px);
    }

    .kpa-hero {
        padding-top: 26px;
    }

    .kpa-hero h1 {
        font-size: 35px;
    }

    .kpa-section-head h2 {
        font-size: 28px;
    }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.kpa a:focus-visible {
    outline: 3px solid rgba(77, 59, 254, .22);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .kpa *,
    .kpa *::before,
    .kpa *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (min-width: 701px) {
    .kpa-human {
        align-items: start;
    }
}