/*
Theme Name: LD Expert
Description: Blog theme for www.ldexpert.org/blog. Uses the main website's stylesheet; this file only styles block content so posts written in the editor match the original blog design.
Version: 0.1.0
Requires PHP: 8.2
Text Domain: ldexpert
*/

/**
 * Article body: core blocks styled like the website's hand-written posts (fs-md lh-md, fw-bold fs-2 mb-3, ...).
 */
.ldx-entry p,
.ldx-entry li {
    font-size: 18px;
    line-height: 1.75rem;
}

.ldx-entry h2 {
    font-weight: 700;
    font-size: calc(1.325rem + 0.9vw);
    margin: 2rem 0 1rem;
}

.ldx-entry h3 {
    font-weight: 600;
    font-size: calc(1.275rem + 0.3vw);
    margin: 0 0 1rem;
}

.ldx-entry h4 {
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0 0 1rem;
}

@media (min-width: 1200px) {
    .ldx-entry h2 {
        font-size: 2rem;
    }

    .ldx-entry h3 {
        font-size: 1.5rem;
    }
}

.ldx-entry > :first-child {
    margin-top: 0;
}

.ldx-entry ul,
.ldx-entry ol {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ldx-entry .has-text-align-center {
    text-align: center;
}

.ldx-entry .has-bordersubtle-color {
    color: #50a1bf;
}

.ldx-entry .has-primary-color {
    color: #2c5972;
}

.ldx-entry .has-secondary-color {
    color: #162936;
}

/**
 * Bordered image, as used for hero and in-article images on the website.
 */
.ldx-entry .wp-block-image {
    margin: 0 0 2rem;
}

.ldx-entry .wp-block-image img {
    width: auto;
    max-width: 100%;
    height: auto;
}

.ldx-entry .is-style-ldx-framed img {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .ldx-entry .is-style-ldx-framed img {
        padding: 1rem;
    }
}

/**
 * Highlighted call-to-action box (website .bg-lightblue.p-3).
 */
.ldx-entry .is-style-ldx-callout {
    background-color: #f2f9f9;
    padding: 1rem;
    margin: 0.5rem 0 2rem;
}

.ldx-entry .is-style-ldx-callout > :last-child {
    margin-bottom: 0;
}

/**
 * Buttons styled as the website's .btn.btn-primary.
 */
.ldx-entry .wp-block-buttons {
    margin-bottom: 1rem;
}

.ldx-entry .wp-block-button__link {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #fff;
    background-color: #2c5972;
    border: 1px solid #2c5972;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.ldx-entry .wp-block-button__link:hover,
.ldx-entry .wp-block-button__link:focus-visible {
    color: #fff;
    background-color: #254c61;
    border-color: #234759;
}

.ldx-entry .wp-block-quote {
    border-left: 4px solid #50a1bf;
    padding-left: 1rem;
    margin: 0 0 2rem;
}

.ldx-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}
