/* Раздел «Загрузки» (плагин decastelli-forms, страница /zagruzki/).
   Не конфликтует с темой: собственный namespace dc-dl-/dc-gate-. Кнопки —
   штатные .btn/.btn--accent темы (акцент var(--color-accent)). */

.dc-dl {
    margin: 0;
}

.dc-dl__intro {
    max-width: 680px;
    margin: 0 0 40px;
    color: var(--color-text-secondary, #555);
    line-height: 1.8;
}

.dc-dl__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 32px;
}

.dc-dl__card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dc-dl__cover {
    aspect-ratio: 7 / 10;
    overflow: hidden;
    background: #f4f2ef;
}

.dc-dl__cover img {
    display: block;
    width: 100%;
    height: auto;
}

.dc-dl__cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--font-heading, inherit);
    font-size: 2rem;
    color: var(--color-accent, #6B5A47);
}

.dc-dl__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 20px 20px 24px;
}

.dc-dl__kind {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent, #6B5A47);
}

.dc-dl__title {
    margin: 0;
    font-family: var(--font-heading, inherit);
    font-size: 1.25rem;
    line-height: 1.3;
}

.dc-dl__note {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary, #555);
}

.dc-dl__meta {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #777);
}

.dc-dl__btn {
    align-self: flex-start;
    margin-top: auto;
}

/* --- Гейт-диалог --- */

.dc-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.dc-gate__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 16, 0.72);
}

.dc-gate__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: var(--color-surface, #fff);
    padding: 32px 28px 28px;
}

.dc-gate__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--color-text, #101010);
    cursor: pointer;
    padding: 4px;
}

.dc-gate__title {
    margin: 0 0 10px;
    font-family: var(--font-heading, inherit);
    font-size: 1.3rem;
    line-height: 1.3;
    padding-right: 24px;
}

.dc-gate__note {
    margin: 0 0 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--color-text-secondary, #555);
}

.dc-gate__field {
    margin-bottom: 12px;
}

.dc-gate__field input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #fff;
    font-size: 0.95rem;
}

.dc-gate__field input:focus {
    outline: none;
    border-color: var(--color-accent, #6B5A47);
}

.dc-gate__check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-secondary, #555);
    cursor: pointer;
}

.dc-gate__check input {
    margin-top: 2px;
    accent-color: var(--color-accent, #6B5A47);
    flex: none;
}

.dc-gate__submit {
    margin-top: 8px;
}

.dc-gate__msg {
    margin: 16px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.dc-gate__msg--error {
    color: #b3261e;
}

body.dc-gate-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .dc-dl__grid {
        gap: 24px;
    }
}
