/* CMS pages (front.page) — builder content + shortcodes */

.dri-cms {
    background: #fff;
    padding: 48px 0 96px;
}

.dri-cms__container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 3px;
}

.dri-cms__card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(var(--brand-rgb), .10);
    overflow: hidden;
}

.dri-cms__cover {
    aspect-ratio: 21 / 8;
    background: var(--brand-soft);
    overflow: hidden;
}

.dri-cms__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dri-cms__body {
    padding: 44px 52px 36px;
}

/* ---------- Content typography ---------- */
.dri-cms__content {
    color: var(--brand-ink);
    font-size: 17px;
    line-height: 1.9;
}

.dri-cms__content > .row:last-child,
.dri-cms__content > :last-child {
    margin-bottom: 0 !important;
}

.dri-cms__content p {
    margin: 0 0 1.1em;
}

.dri-cms__content h1,
.dri-cms__content h2,
.dri-cms__content h3,
.dri-cms__content h4,
.dri-cms__content h5 {
    color: var(--brand-plum);
    font-weight: 800;
    line-height: 1.35;
    margin: 1.5em 0 .6em;
}

.dri-cms__content h1 { font-size: 32px; }
.dri-cms__content h2 { font-size: 28px; }
.dri-cms__content h3 { font-size: 23px; }
.dri-cms__content h4 { font-size: 20px; }
.dri-cms__content h5 { font-size: 18px; }

.dri-cms__content .builder-block > :first-child,
.dri-cms__content > :first-child {
    margin-top: 0;
}

/* Centered builder headings become section headings (pill style stays for centered text/links). */
.dri-cms__content .builder-block-text :is(h1, h2, h3, h4).ql-align-center {
    display: block;
    width: auto;
    background: none;
    color: var(--brand-plum);
    padding: 0 0 16px;
    margin: 0 auto 26px;
    border-radius: 0;
    text-align: center;
    position: relative;
}

.dri-cms__content .builder-block-text :is(h1, h2, h3, h4).ql-align-center::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: var(--brand-action);
    transform: translateX(-50%);
}

.dri-cms__content a:not(.ql-align-center a):not([class*="btn"]):not([class*="dri-"]) {
    color: var(--brand-action);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dri-cms__content ul,
.dri-cms__content ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

.dri-cms__content ul {
    list-style: disc;
}

.dri-cms__content ol {
    list-style: decimal;
}

.dri-cms__content li {
    display: list-item;
    list-style: inherit;
}

.dri-cms__content li {
    margin-bottom: .35em;
}

.dri-cms__content ul li::marker {
    color: var(--brand-action);
}

.dri-cms__content blockquote {
    border-left: 4px solid var(--brand-action);
    background: var(--brand-surface);
    border-radius: 0 14px 14px 0;
    color: var(--brand-ink);
    font-style: italic;
    margin: 1.6em 0;
    padding: 16px 24px;
}

.dri-cms__content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.dri-cms__content .builder-block-image {
    text-align: center;
}

.dri-cms__content .builder-image-caption {
    color: var(--brand-muted);
    font-size: 14px;
    margin-top: 10px;
}

.dri-cms__content iframe,
.dri-cms__content video {
    max-width: 100%;
    border: 0;
    border-radius: 14px;
}

.dri-cms__content hr {
    border: 0;
    height: 1px;
    background: var(--brand-border);
    margin: 2em 0;
    opacity: 1;
}

/* Plain tables typed into the editor */
.dri-cms__content .builder-block-text table:not(.dri-table-shortcode__table) {
    width: 100%;
    margin: 1.4em 0;
    border-collapse: collapse;
    font-size: 15px;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    overflow: hidden;
}

.dri-cms__content .builder-block-text table:not(.dri-table-shortcode__table) :is(th, td) {
    border: 1px solid #f1e6d7;
    border-width: 1px;
    padding: 10px 14px;
}

.dri-cms__content .builder-block-text table:not(.dri-table-shortcode__table) th {
    background: #fbf3e6;
    color: var(--brand-hover);
}

/* Shortcode table sits flush inside the card */
.dri-cms__content .dri-table-shortcode:first-child {
    margin-top: 0;
}

/* ---------- Footer meta ---------- */
.dri-cms__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px dashed var(--brand-border);
}

.dri-cms__meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--brand-muted);
    font-size: 14px;
}

.dri-cms__meta-list i {
    color: var(--brand-action);
    margin-right: 6px;
}

.dri-cms__share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-ink);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 18px;
    transition: all .2s ease;
}

.dri-cms__share:hover {
    border-color: var(--brand-action);
    color: var(--brand-action);
}

@media (max-width: 767px) {
    .dri-cms {
        padding: 28px 0 70px;
    }

    .dri-cms__card {
        border-radius: 18px;
    }

    .dri-cms__body {
        padding: 26px 18px 24px;
    }

    .dri-cms__content {
        font-size: 16px;
    }

    .dri-cms__content h1 { font-size: 26px; }
    .dri-cms__content h2 { font-size: 23px; }
    .dri-cms__content h3 { font-size: 20px; }

    .dri-cms__meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
