/* ── Global polish ── */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img {
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

/* ── Links & interactions ── */

a {
    transition: color 0.2s ease;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration: none;
}

/* ── Post cards ── */

.wp-block-query .wp-block-group {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-query .wp-block-post {
    transition: transform 0.2s ease;
}

.wp-block-query .wp-block-post:hover {
    transform: translateY(-2px);
}

/* Cards with surface background */
.wp-block-query .wp-block-group.has-surface-background-color {
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.wp-block-query .wp-block-group.has-surface-background-color:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* ── Post titles in listings ── */

.wp-block-query .wp-block-post-title a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-block-query .wp-block-post-title a:hover {
    color: var(--wp--preset--color--primary);
}

/* ── Featured images ── */

.wp-block-post-featured-image {
    overflow: hidden;
    border-radius: 8px;
}

.wp-block-post-featured-image img {
    transition: transform 0.4s ease, opacity 0.2s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wp-block-post-featured-image:hover img {
    transform: scale(1.03);
}

/* ── Category badges ── */

.wp-block-post-terms a {
    display: inline-block;
    padding: 0.2em 0.65em;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--background) !important;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1.6;
}

.wp-block-post-terms a:hover {
    background: var(--wp--preset--color--secondary);
    transform: translateY(-1px);
}

/* ── Separator styling ── */

.wp-block-separator {
    opacity: 1;
    border: none;
    height: 1px;
    background: var(--wp--preset--color--surface);
}

.wp-block-separator.has-primary-background-color {
    height: 3px;
    background: var(--wp--preset--color--primary);
}

/* ── Buttons ── */

.wp-block-button__link {
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── Navigation ── */

.wp-block-navigation a {
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.wp-block-navigation a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--wp--preset--color--primary);
    transition: width 0.2s ease;
}

.wp-block-navigation a:hover::after {
    width: 100%;
}

/* ── Blockquote ── */

.wp-block-quote {
    border-left: 3px solid var(--wp--preset--color--primary);
    padding-left: 1.25rem;
    margin-left: 0;
    font-style: italic;
}

.wp-block-quote cite {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--wp--preset--color--muted);
}

/* ── Footer ── */

.wp-block-group.has-foreground-background-color a {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.wp-block-group.has-foreground-background-color a:hover {
    opacity: 0.8;
}

footer .wp-block-categories-list,
footer .wp-block-latest-posts__list {
    list-style: none;
    padding-left: 0;
}

footer .wp-block-categories-list li,
footer .wp-block-latest-posts__list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ── Author box ── */

.wp-block-post-author-biography {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Responsive ── */

@media (max-width: 781px) {
    .wp-block-columns {
        gap: 1.5rem !important;
    }

    .wp-block-post-title {
        font-size: clamp(1.2rem, 4vw, 2rem);
    }
}

/* ── Sticky post badge ── */

.sticky .wp-block-post-title::before {
    content: "★ ";
    color: var(--wp--preset--color--accent);
}

/* ── Selection color ── */

::selection {
    background: #D4890C22;
    color: #1F1A14;
}

/* ── Scrollbar (webkit) ── */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F0E8;
}

::-webkit-scrollbar-thumb {
    background: #918578;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4890C;
}
