/* Компоненты: документы, слайдер главной, карточки новостей */

.docs-grid {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.doc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-1);
    box-sizing: border-box;
}

.doc-card__preview {
    display: block;
    width: 100%;
    max-width: 180px;
}

.doc-card__preview img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid #f3f4f6;
}

.doc-card__body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.doc-card__title {
    margin: var(--space-1) 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    line-height: 1.3;
}

.doc-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    background: #e5e7eb;
    color: #1d4ed8;
    font-weight: 600;
    border: 1px solid #3b82f6;
    border-radius: 0.25rem;
    text-decoration: none;
    box-sizing: border-box;
}

.doc-card__action:hover {
    background: #3b82f6;
    color: #fff;
    border-color: transparent;
}

.home-intro__text {
    width: 75%;
}

.join-form {
    position: relative;
    width: 100%;
    max-width: none;
    margin: var(--space-2) 0 0;
    padding: 1.5rem;
    border: 1px solid #374151;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    scroll-margin-top: 5rem;
}

.join-form__title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    line-height: 1.3;
}

.join-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.join-field {
    min-width: 0;
}

.join-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
}

.join-req {
    color: #f87171;
}

.join-input,
.join-select,
.join-textarea,
.join-file {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    background: #1f2937;
    color: #f3f4f6;
    font-size: 1rem;
    line-height: 1.4;
    min-height: 50px;
}

.join-textarea {
    min-height: 140px;
    resize: vertical;
}

.join-input::placeholder,
.join-textarea::placeholder {
    color: #9ca3af;
}

.join-input:focus,
.join-select:focus,
.join-textarea:focus,
.join-file:focus {
    outline: 2px solid #dc2626;
    outline-offset: 1px;
    border-color: #991b1b;
}

.join-error {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #f87171;
}

.join-note {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

.join-success {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #166534;
    background: #052e16;
    color: #86efac;
    border-radius: 0.75rem;
}

.join-alert {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #7f1d1d;
    background: #450a0a;
    color: #fca5a5;
    border-radius: 0.75rem;
}

.join-hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.join-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #d1d5db;
    font-size: 0.9375rem;
}

.join-consent input {
    margin-top: 0.3rem;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.join-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0.75rem 1.5rem;
    background: #b91c1c;
    color: #fff;
    font-weight: 600;
    border: 0;
    border-radius: 0.75rem;
    cursor: pointer;
}

.join-submit:hover {
    background: #991b1b;
}

.join-page #join-docs {
    scroll-margin-top: 5rem;
    border: 1px solid #374151;
    border-radius: 1rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .join-page div:has(> a[href="#join-form"]) {
        display: none;
    }

    .join-form {
        padding: 2rem;
    }

    .join-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem 1.5rem;
    }

    .join-field--wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .join-page {
        display: grid;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
        gap: 2.5rem 1.5rem;
        align-items: start;
    }

    .join-page__cms,
    .join-page__cms > .space-y-10 {
        display: contents;
    }

    .join-page__cms > .space-y-10 > * {
        margin-top: 0 !important;
    }

    .join-page__cms > .space-y-10 > :not(#join-docs) {
        grid-column: 1 / -1;
    }

    .join-page #join-docs {
        grid-column: 1;
    }

    .join-page .join-form {
        grid-column: 2;
        margin-top: 0;
    }
}

@media (max-width: 1023px) {
    .docs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-intro__text {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .docs-grid {
        grid-template-columns: 1fr;
        gap: var(--space-1);
    }

    .doc-card {
        flex-direction: row;
        align-items: center;
        gap: var(--space-1);
        padding: var(--space-1);
        border: 1px solid #374151;
        border-radius: 0.375rem;
        background: #111827;
    }

    .doc-card__preview {
        flex: 0 0 72px;
        width: 72px;
        max-width: 72px;
    }

    .doc-card__preview img {
        width: 72px;
        height: 72px;
        object-fit: cover;
    }

    .doc-card__body {
        flex: 1 1 auto;
        align-items: stretch;
        min-width: 0;
    }

    .doc-card__title {
        margin: 0 0 0.5rem;
        text-align: left;
        font-size: 0.9375rem;
    }

    .doc-card__action {
        width: 100%;
    }

    /* Слайдер главной */
    .owl-carousel.slider .owl-nav {
        padding: 0 8px;
        top: 50%;
    }

    .owl-carousel.slider .owl-nav > button > span {
        font-size: 40px;
        line-height: 1;
    }

    .owl-carousel.slider .owl-dots {
        bottom: 12px;
        justify-content: center;
        padding-left: 0;
    }

    .owl-carousel.slider .owl-dots > button {
        width: 10px;
        height: 10px;
    }

    .slide-caption {
        width: 100% !important;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0.5rem 0.75rem;
        font-size: 13px;
        font-weight: 600;
        background: rgba(17, 24, 39, 0.85) !important;
        border: 0 !important;
        box-sizing: border-box;
    }

    /* Карточки новостей */
    a.news-card {
        padding: var(--space-1);
        transform: none !important;
    }

    a.news-card:hover {
        transform: none !important;
    }

    .news-card h2 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .news-card .news-card__media {
        flex-direction: row !important;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .news-card .news-card__media img,
    .news-card .news-card__media video {
        width: 64px !important;
        height: 64px;
        object-fit: cover;
        margin: 0 !important;
        flex-shrink: 0;
    }

    .btn-block {
        display: block;
        width: 100%;
    }

    .btn-block button {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .home-featured__logo,
    .home-intro__logo {
        display: block;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .join-submit {
        width: 100%;
    }
}
