/* Subpages: unified layout, aligned with landing (Skeleton + custom.css) */

.subpage-layout .subpage-content.section {
    padding: 2.5rem 1rem 2.5rem;
    text-align: left;
    background: linear-gradient(180deg, #eef7fd 0%, #ffffff 120px);
    border-bottom: none;
}

.subpage-layout .docs-section {
    padding: 0 0 1.5rem;
    text-align: left;
    border-top: none;
    margin-bottom: 0;
}

.subpage-layout .docs-section.contact_form {
    padding-top: 0;
}

.subpage-layout h1,
.subpage-layout h2,
.subpage-layout h3 {
    text-align: left;
    font-family: Neucha, cursive;
    color: #2d4a6f;
}

.subpage-layout h2 {
    margin-bottom: 1rem;
}

.subpage-layout p,
.subpage-layout li,
.subpage-layout label,
.subpage-layout .form {
    text-align: left;
}

.subpage-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px dotted #c5d5e4;
}

.subpage-nav {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.5;
    text-align: left;
}

.subpage-nav a {
    display: inline-block;
    margin: 0 1.25rem 0.25rem 0;
    color: #3d5f8a;
    text-decoration: none;
    border-bottom: 1px solid #b8d4ea;
}

.subpage-nav a:hover {
    color: #2563eb;
}

.subpage-nav:not(:has(a)) {
    display: none;
}

.subpage-toolbar:not(:has(.subpage-nav a)) {
    gap: 0;
    justify-content: flex-end;
}

.subpage-toolbar > .button {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Единый отступ контента перед футером (главная и подстраницы) */
.extra_pages > .section.forma {
    padding-bottom: 2.5rem;
    border-bottom: none;
}

/* Site footer — full width, readable on dark background */
.extra_pages > .site-footer {
    width: 100%;
    box-sizing: border-box;
    background: #3d4f63;
    color: #eef3f8;
    margin: 0;
    padding: 2.75rem 1.5rem;
    text-align: center;
    font-size: 16px;
    line-height: 1.7;
    border: none;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem 1.75rem;
    margin: 0 0 1.25rem;
    padding: 0;
    line-height: 1.7;
    text-align: center;
    width: 100%;
    font-size: 16px;
}

.site-footer-links a {
    color: #c5e4ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(197, 228, 255, 0.35);
    font-size: 16px;
}

.site-footer-links a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.site-footer-copy {
    margin: 0 auto;
    padding: 0;
    color: #d8e2ec;
    font-size: 16px;
    line-height: 1.7;
    text-align: center;
    width: 100%;
    max-width: 48rem;
}

.site-footer-version {
    opacity: 0.85;
    font-size: 14px;
    white-space: nowrap;
}

/* Подстраницы: не наследовать text-align:left от .subpage-layout p */
.subpage-layout > .site-footer,
.subpage-layout > .site-footer p,
.subpage-layout > .site-footer .site-footer-links,
.subpage-layout > .site-footer .site-footer-copy {
    text-align: center;
}

@media (max-width: 549px) {
    .site-footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .site-footer-links a {
        display: block;
    }
}

.text-muted {
    color: #6b7280;
}

.item-intro {
    margin-bottom: 1.25rem;
    line-height: 1.65;
}

.subpage-layout .legal-text {
    text-align: justify;
    line-height: 1.65;
}

.subpage-layout .legal-text a {
    word-break: break-word;
}

.subpage-layout .button,
.subpage-layout .button-primary {
    display: inline-block;
    margin-top: 0.5rem;
}

/* Contact form */
.subpage-layout .contact_form .form input[type="text"],
.subpage-layout .contact_form .form input[type="email"],
.subpage-layout .contact_form .form select,
.subpage-layout .contact_form .form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.subpage-layout .contact_form .send-yourself-copy {
    display: block;
    margin: 1rem 0;
    float: none;
    text-align: left;
}

.subpage-layout .contact_form .button-primary {
    width: auto;
    min-width: 10rem;
}

.subpage-layout .contact_form .contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.subpage-layout .contact_form .contact-turnstile {
    margin: 1rem 0;
}

.subpage-layout .contact_form .error-message {
    color: #c0392b;
    margin-bottom: 1rem;
}

.subpage-layout .success {
    background: #ffd558;
    padding: 1.25rem;
    border-radius: 9px;
    text-align: center;
}

/* Partner */
.partner-card {
    background: #fff;
    border-radius: 9px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(45, 74, 111, 0.08);
}

.partner-grid h3 {
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.partner-grid h4 {
    font-size: 1.35rem;
    padding-top: 0.5rem;
    margin-bottom: 1rem;
}

/* Order result pages */
.order-result {
    max-width: 36rem;
}

.order-result p {
    line-height: 1.65;
}

@media (max-width: 749px) {
    .subpage-layout .subpage-content.section {
        padding: 1.5rem 0.75rem 2rem;
    }

    .extra_pages > .section.forma {
        padding-bottom: 2rem;
    }

    .extra_pages > .site-footer {
        padding: 2.25rem 1rem;
        font-size: 15px;
    }

    .site-footer-links,
    .site-footer-links a,
    .site-footer-copy {
        font-size: 15px;
    }

    .subpage-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 0.75rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .subpage-nav {
        flex: 1 1 auto;
    }

    .subpage-nav a {
        display: inline-block;
        margin: 0 0.75rem 0.25rem 0;
    }

    .subpage-toolbar > .button {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        text-align: center;
    }

    .subpage-layout .contact_form .six.columns,
    .subpage-layout .contact_form .row .columns {
        width: 100%;
        margin-left: 0;
    }

    .partner-grid .seven.columns,
    .partner-grid .five.columns {
        width: 100%;
        margin-left: 0;
    }

    .partner-card {
        margin-top: 1.5rem;
    }

    .header_logo {
        text-align: center;
        display: block;
    }

    .navbar .four.columns {
        text-align: center;
    }

    .signal_icon {
        float: none;
        display: inline-block;
        margin: 0.25rem;
    }
}
