/*
 * Editorial sections — зураг → гарчиг/тайлбар дараалалтай мөрүүд. Цогцолборын
 * танилцуулга ба үйлчилгээний хуудас хуваалцана
 * (templates/public/components/_editorial_sections.html.twig).
 */

/* Image first in the DOM/mobile reading order, alternating image/text columns
   on wider screens. */
.ub-editorial {
    display: flex;
    flex-direction: column;
    gap: clamp(var(--ub-space-5xl), 7vw, var(--ub-space-7xl));
}

.ub-editorial__row {
    display: grid;
    gap: clamp(var(--ub-space-2xl), 4vw, var(--ub-space-5xl));
    align-items: center;
}

.ub-editorial__media {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: var(--ub-radius-md);
    background: var(--ub-color-section-soft);
}

.ub-editorial__image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.ub-editorial__copy {
    min-width: 0;
}

.ub-editorial__title {
    margin: 0 0 var(--ub-space-l);
    color: var(--ub-color-heading);
    font-family: var(--ub-font-display);
    font-size: clamp(var(--ub-text-xl), 2.5vw, var(--ub-text-3xl));
    font-weight: 600;
    line-height: var(--ub-leading-display);
    letter-spacing: var(--ub-tracking-display);
}

.ub-editorial__body {
    color: var(--ub-color-body);
    font-size: var(--ub-text-md);
    line-height: var(--ub-leading-body);
}

.ub-editorial__body > :first-child {
    margin-top: 0;
}

.ub-editorial__body > :last-child {
    margin-bottom: 0;
}

.ub-editorial__body p,
.ub-editorial__body ul,
.ub-editorial__body ol {
    margin: 0 0 var(--ub-space-l);
}

.ub-editorial__body ul,
.ub-editorial__body ol {
    padding-inline-start: var(--ub-space-2xl);
}

.ub-editorial__body ul { list-style-type: disc; }
.ub-editorial__body ol { list-style-type: decimal; }

.ub-editorial__body a {
    color: var(--ub-color-brand-text);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

@media (min-width: 768px) {
    .ub-editorial__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ub-editorial__row--reverse .ub-editorial__media {
        grid-column: 2;
        grid-row: 1;
    }

    .ub-editorial__row--reverse .ub-editorial__copy {
        grid-column: 1;
        grid-row: 1;
    }
}
