/* =============================================================================
   LibParl v3 — single-style.css
   ============================================================================= */

.lp-single { max-width: 780px; margin: 0 auto; padding: 48px 24px 64px; }

.lp-single__back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: #787c82;
    text-decoration: none; margin-bottom: 32px; transition: color .15s;
}
.lp-single__back:hover { color: #1d2327; }
.lp-single__back svg { flex-shrink: 0; }

.lp-single__cat {
    display: inline-block; font-size: 11px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--lp-accent); margin-bottom: 12px;
}
.lp-single__title {
    font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: #1d2327;
    font-family: 'Nunito Sans', sans-serif;
    line-height: 1.1; letter-spacing: -.03em; margin-bottom: 16px;
}
.lp-single__meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 13px; color: #787c82; margin-bottom: 28px; flex-wrap: wrap;
    font-family: 'Open Sans', sans-serif;
}
.lp-single__meta-dot { color: #dcdcde; }

.lp-single__img {
    width: 100%; border-radius: 12px; display: block;
    margin-bottom: 36px; aspect-ratio: 16/9; object-fit: cover;
}

.lp-single__body {
    font-size: 17px; line-height: 1.8; color: #2c2c2c;
    font-family: 'Open Sans', sans-serif; font-weight: 400;
}
.lp-single__body p { margin-bottom: 1.4em; }
.lp-single__body h2 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 22px; font-weight: 800; color: #1d2327;
    margin: 2em 0 .6em; letter-spacing: -.02em;
}
.lp-single__body h3 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px; font-weight: 700; color: #1d2327;
    margin: 1.6em 0 .5em;
}
.lp-single__body a { color: var(--lp-accent); text-decoration: underline; text-underline-offset: 3px; }
.lp-single__body a:hover { text-decoration: none; }
.lp-single__body ul, .lp-single__body ol { margin: 0 0 1.4em 1.4em; }
.lp-single__body li { margin-bottom: .4em; }
.lp-single__body blockquote {
    border-left: 3px solid var(--lp-accent); margin: 2em 0; padding: 12px 20px;
    background: #f9f9f9; border-radius: 0 8px 8px 0;
    font-style: italic; color: #555;
}
.lp-single__body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1em 0; }
.lp-single__body figure { margin: 2em 0; }
.lp-single__body figcaption { font-size: 13px; color: #787c82; text-align: center; margin-top: 8px; }

/* Newsletter PDF box */
.lp-newsletter-box {
    margin: 32px 0; padding: 20px 24px;
    background: #f9f9f9; border-radius: 10px; border: 1px solid #e8e8e8;
}
.lp-newsletter-box__title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px; font-weight: 800; color: #1d2327; margin-bottom: 6px;
}
.lp-newsletter-box__desc {
    font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 14px;
    font-family: 'Open Sans', sans-serif;
}
.lp-newsletter-box__btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; background: var(--lp-accent); color: #fff;
    border-radius: 7px; font-family: 'Open Sans', sans-serif;
    font-size: 13px; font-weight: 700; text-decoration: none; margin-bottom: 8px;
}
.lp-newsletter-box__btn:hover { opacity: .9; color: #fff; }
.lp-newsletter-box__note {
    font-size: 11px; color: #aaa; margin-top: 8px;
    font-family: 'Open Sans', sans-serif;
}

/* Share */
.lp-single__share {
    display: flex; align-items: center; gap: 10px;
    margin-top: 48px; padding-top: 24px;
    border-top: 1px solid #f0f0f1; flex-wrap: wrap;
}
.lp-single__share-label {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: #787c82;
    font-family: 'Open Sans', sans-serif;
}
.lp-single__share-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
    text-decoration: none; border: 1px solid #dcdcde; color: #1d2327;
    transition: border-color .15s; font-family: 'Open Sans', sans-serif;
}
.lp-single__share-btn:hover { border-color: #1d2327; }
.lp-single__share-icon { height: 13px; width: auto; filter: brightness(0); opacity: .55; }
.lp-single__share-btn:hover .lp-single__share-icon { opacity: .9; }

/* Related */
.lp-related { border-top: 1px solid #f0f0f1; padding: 48px 24px 64px; max-width: 1200px; margin: 0 auto; }
.lp-related__title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px; font-weight: 800; color: #1d2327; margin-bottom: 24px;
    letter-spacing: -.02em;
}
.lp-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .lp-related__grid { grid-template-columns: 1fr; } }
.lp-related__card {
    display: block; text-decoration: none; border: 1px solid #e8e8e8;
    border-radius: 10px; overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.lp-related__card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.lp-related__card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #f0f0f1; }
.lp-related__card-body { padding: 14px 16px; }
.lp-related__card-date { font-size: 11px; color: #787c82; margin-bottom: 4px; font-family: 'Open Sans', sans-serif; }
.lp-related__card-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px; font-weight: 700; color: #1d2327; line-height: 1.3;
}
/* =============================================================================
   Galleries (photo albums)
   WP's [gallery] ships almost no layout CSS of its own in a block theme
   context, so images stacked full-width vertically. Force a real grid.
   ============================================================================= */
.lp-single__body .gallery {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 24px 0 !important;
}
.lp-single__body .gallery.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.lp-single__body .gallery.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) {
    .lp-single__body .gallery,
    .lp-single__body .gallery.gallery-columns-3,
    .lp-single__body .gallery.gallery-columns-4 { grid-template-columns: repeat(2, 1fr); }
}
.lp-single__body .gallery-item {
    width: auto !important; margin: 0 !important; float: none !important;
}
.lp-single__body .gallery-item img,
.lp-single__body .gallery img {
    width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: cover;
    border-radius: 10px; display: block; border: none !important;
    transition: transform .25s;
}
.lp-single__body .gallery-item a:hover img { transform: scale(1.03); }
.lp-single__body .gallery-icon { margin: 0; }
.lp-single__body .gallery-caption { font-size: 12px; color: #787c82; margin-top: 4px; }

/* Same treatment for the block editor's gallery block */
.lp-single__body .wp-block-gallery.has-nested-images {
    display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
@media (max-width: 700px) {
    .lp-single__body .wp-block-gallery.has-nested-images { grid-template-columns: repeat(2, 1fr); }
}
.lp-single__body .wp-block-gallery.has-nested-images figure.wp-block-image {
    width: 100% !important; margin: 0 !important;
}
.lp-single__body .wp-block-gallery.has-nested-images figure.wp-block-image img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px;
}

/* =============================================================================
   Inserted content images
   WordPress inserts at whatever size the office picked in the media dialog
   (often "Medium"), so images landed small and inconsistent mid-article.
   Force the standard insert sizes to fill the column — thumbnails and
   floated/aligned images keep their natural size deliberately.
   ============================================================================= */
.lp-single__body img.size-medium,
.lp-single__body img.size-medium_large,
.lp-single__body img.size-large,
.lp-single__body img.size-full,
.lp-single__body figure.wp-block-image:not(.alignleft):not(.alignright) img,
.lp-single__body p > img:only-child {
    width: 100%;
    height: auto;
    border-radius: 10px;
}
/* Keep small/aligned media at natural size */
.lp-single__body img.size-thumbnail,
.lp-single__body img.alignleft,
.lp-single__body img.alignright,
.lp-single__body .alignleft img,
.lp-single__body .alignright img {
    width: auto;
    max-width: 50%;
}
.lp-single__body figure.wp-block-image { margin: 1.6em 0; }

/* =============================================================================
   Self-contained HTML widgets pasted into post content
   Theme body styles (paragraph margins, link underlines, image rules) leak
   into hand-built widgets and break their layout. Scope them out.
   ============================================================================= */
.lp-single__body .rp p { margin-bottom: 0; }
.lp-single__body .rp a { text-decoration: none; }
.lp-single__body .rp a:hover { text-decoration: underline; }
.lp-single__body .rp img { margin: 0; border-radius: 0; width: auto; }
.lp-single__body .rp button { font-family: inherit; }
.lp-single__body .rp br { display: none; }