/* ==========================================================================
   Blog listing page (/blog/)
   Calm, editorial layout: generous white space, hairline borders, small radii,
   no heavy shadows. Built on the shared theme tokens (theme.css).
   ========================================================================== */

/* Balanced corners on this page: softer than square, far tighter than the theme's pill-like defaults. */
.theme-blog main {
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 18px;
    --bl-hair: 1px solid var(--line);
}

/* ---------- Title + search ---------- */
.bl-head {
    padding: clamp(128px, 13vw, 168px) 0 clamp(28px, 3.5vw, 44px);
    background: var(--cream);
    text-align: center;
}
.bl-head .ornament { margin-bottom: 16px; }
.bl-head h1 {
    position: relative;
    margin: 0 auto;
    padding-bottom: 24px;
    font-size: var(--fs-title);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.012em;
}
.bl-head h1 em { color: var(--gold-ink); font-style: italic; font-weight: 400; }
.bl-head h1::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 0;
    width: 80px; height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold-deep) 70%, transparent);
}

.bl-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 560px;
    margin: 30px auto 0;
    padding: 5px 5px 5px 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    transition: border-color .25s, box-shadow .25s;
}
.bl-search:focus-within { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(232, 189, 85, .22); }
.bl-search > .icon { flex: none; width: 19px; height: 19px; color: var(--gold-deep); }
.bl-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 8px;
    border: 0;
    background: transparent;
    color: var(--heading);
    font: 400 16px/1.2 var(--font-body);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
/* The search box shows its own focus ring (:focus-within on the wrapper), so the field itself gets no outline. */
.theme .bl-search input:focus, .theme .bl-search input:focus-visible { outline: 0; box-shadow: none; }
.bl-search input::placeholder { color: #a79b8e; opacity: 1; }
.bl-search input::-webkit-search-cancel-button { display: none; }
.bl-search__clear {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    transition: background .25s, color .25s;
}
.bl-search__clear:hover { background: var(--sand); color: var(--heading); }
.bl-search__clear .icon { width: 16px; height: 16px; }
.bl-search button {
    flex: none;
    padding: 0 26px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
    color: var(--ink);
    font: 700 12px/1 var(--font-body);
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter .25s, transform .25s;
}
.bl-search button:hover { filter: brightness(1.05); transform: translateY(-1px); }

.bl-count {
    min-height: 1.6em;
    margin: 18px 0 0;
    color: var(--muted);
    font: 600 11.5px/1.6 var(--font-body);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.bl-count a { color: var(--gold-ink); text-decoration: underline; text-decoration-color: rgba(188, 140, 63, .5); text-underline-offset: 4px; }
.bl-count a:hover { color: var(--heading); }

/* ---------- Layout ---------- */
.bl-listing { padding: clamp(32px, 4vw, 48px) 0 clamp(48px, 5.5vw, 76px); background: var(--paper); border-top: var(--bl-hair); }
.bl-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(40px, 5vw, 72px);
    align-items: start;
}
.bl-posts { min-width: 0; }

/* Image box: a soft paw placeholder sits underneath, so a missing image still looks intentional. */
.bl-media {
    position: relative;
    display: block;
    border-radius: var(--radius);
    background: var(--sand);
    overflow: hidden;
}
.bl-media__ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(188, 140, 63, .35); }
.bl-media__ph svg { width: 40px; height: 40px; fill: currentColor; stroke: none; }
.bl-media img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.1s var(--ease);
}
.bl-feature:hover .bl-media img, .bl-card:hover .bl-media img { transform: scale(1.04); }

/* Shared text */
.bl-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 0;
    color: var(--gold-ink);
    font: 700 12px/1.4 var(--font-body);
    letter-spacing: .15em;
    text-transform: uppercase;
}
.bl-meta__dot { color: var(--line-strong); }
.theme-blog .bl-feature h2, .theme-blog .bl-card h2 { margin: 12px 0 12px; padding-bottom: 0; color: var(--heading); font-weight: 500; line-height: 1.25; }
.theme-blog .bl-feature h2::after, .theme-blog .bl-card h2::after { display: none; }
.bl-feature h2 a, .bl-card h2 a {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(var(--gold-deep), var(--gold-deep)) 0 100% / 0 1px no-repeat;
    transition: background-size .5s var(--ease), color .3s;
}
.bl-feature h2 a:hover, .bl-card h2 a:hover { color: var(--gold-ink); background-size: 100% 1px; }
.bl-excerpt {
    margin: 0 0 18px;
    color: var(--text);
    font: italic 400 1rem/1.8 var(--font-display);
    letter-spacing: .005em;
}
.bl-read {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: var(--heading);
    font: 700 11.5px/1 var(--font-body);
    letter-spacing: .16em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color .25s;
}
.bl-read .icon { width: 1.2em; height: 1.2em; color: var(--gold-deep); transition: transform .35s var(--ease); }
.bl-read:hover { color: var(--gold-ink); }
.bl-read:hover .icon { transform: translateX(5px); }

/* Featured (latest) article: wide image on top, title and text below, all inside one bordered card. */
.bl-feature {
    display: block;
    margin-bottom: clamp(28px, 3.4vw, 40px);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: border-color .3s, box-shadow .4s var(--ease);
}
.bl-feature:hover { border-color: rgba(188, 140, 63, .6); box-shadow: 0 10px 28px rgba(42, 31, 23, .07); }
.bl-feature .bl-media { aspect-ratio: 2.1 / 1; border-radius: 0; }
.bl-feature__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(24px, 3.2vw, 40px) clamp(24px, 3.6vw, 44px) clamp(28px, 3.4vw, 42px);
}
.bl-feature h2 { margin: 14px 0 14px; font-size: var(--fs-panel); line-height: 1.22; }
.bl-feature .bl-excerpt { max-width: 70ch; font-size: 1.04rem; }

/* Article grid: borderless cards, image on top */
.bl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 52px) clamp(24px, 3vw, 40px); }
.bl-card[hidden] { display: none; }
.bl-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
    transition: border-color .3s, box-shadow .4s var(--ease);
}
.bl-card:hover { border-color: rgba(188, 140, 63, .6); box-shadow: 0 10px 28px rgba(42, 31, 23, .07); }
.bl-card .bl-media { aspect-ratio: 3 / 2; border-radius: 0; }
.bl-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 22px 24px 26px; }
.bl-card h2 { font-size: var(--fs-card); }
.bl-card .bl-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .98rem;
}

.bl-more { margin-top: clamp(36px, 4vw, 52px); text-align: center; }
.bl-more button {
    padding: 15px 34px;
    border: 1px solid rgba(188, 140, 63, .6);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--heading);
    font: 700 11.5px/1 var(--font-body);
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .25s, border-color .25s, color .25s;
}
.bl-more button:hover { background: rgba(232, 189, 85, .16); border-color: var(--gold-deep); color: var(--gold-ink); }

.bl-empty {
    margin: 0;
    padding: 48px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    font: italic 400 1.08rem/1.7 var(--font-display);
    text-align: center;
}

/* ---------- Sidebar ---------- */
.bl-aside { display: grid; gap: 40px; }
.theme-blog .bl-news h2, .theme-blog .bl-latest h2 {
    position: relative;
    margin: 0 0 16px;
    padding-bottom: 14px;
    font-size: var(--fs-card);
    font-weight: 500;
}
.theme-blog .bl-news h2::after, .theme-blog .bl-latest h2::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 44px; height: 2px;
    background: linear-gradient(90deg, var(--gold-deep), var(--gold) 60%, transparent);
}

.bl-news {
    padding: 26px 24px 24px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--sand);
}
.bl-news p { margin: 0 0 18px; color: var(--text); font: italic 400 .98rem/1.75 var(--font-display); }
.bl-news__form { display: grid; gap: 10px; }
.bl-news__form input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--heading);
    font: 400 15px/1.3 var(--font-body);
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}
/* Newsletter field: keep only its own gold border + soft ring, not the browser/theme outline on top. */
.theme .bl-news__form input:focus-visible { outline: 0; }
.bl-news__form input::placeholder { color: #a79b8e; opacity: 1; }
.bl-news__form input:focus { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(232, 189, 85, .22); }
.bl-news__form button {
    padding: 14px 20px;
    border: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
    color: var(--ink);
    font: 700 12px/1 var(--font-body);
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter .25s, transform .25s;
}
.bl-news__form button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.bl-news__msg {
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font: 500 14px/1.5 var(--font-body);
    outline: none;
}
.bl-news__msg--success { background: #e9f4ec; color: #1f5a33; border: 1px solid #b9dcc4; }
.bl-news__msg--error { background: #fbece9; color: #8a2f21; border: 1px solid #efc4bb; }

.bl-latest ol { margin: 0; padding: 0; list-style: none; }
.bl-latest li {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-top: var(--bl-hair);
}
.bl-latest li:first-child { border-top: 0; padding-top: 4px; }
.bl-latest__img {
    position: relative;
    display: block;
    width: 76px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    background: var(--sand);
    overflow: hidden;
}
.bl-latest__img .bl-media__ph svg { width: 22px; height: 22px; }
.bl-latest__img img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.bl-latest li:hover .bl-latest__img img { transform: scale(1.08); }
.bl-latest__title {
    display: block;
    color: var(--heading);
    font: 500 .98rem/1.35 var(--font-display);
    text-decoration: none;
    transition: color .25s;
}
.bl-latest__title:hover { color: var(--gold-ink); }
.bl-latest__date { display: block; margin-top: 5px; color: var(--muted); font: 600 11.5px/1.2 var(--font-body); letter-spacing: .13em; text-transform: uppercase; }

@media (min-width: 1101px) {
    /* Sticky, never its own scroll box: if the sidebar is taller than the screen, theme.js lifts it so its end stays reachable. */
    .bl-aside { position: sticky; top: var(--bl-top, 104px); align-self: start; }
}
.bl-aside > * { min-width: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .bl-layout { grid-template-columns: minmax(0, 1fr); }
    .bl-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 28px; }
}
@media (max-width: 900px) {
    .bl-head { padding-top: 112px; }
    .bl-feature .bl-media { aspect-ratio: 16 / 10; }
    .bl-feature__body { padding: 22px 22px 26px; }
}
@media (max-width: 700px) {
    .bl-grid { grid-template-columns: minmax(0, 1fr); }
    .bl-aside { grid-template-columns: minmax(0, 1fr); }
    .bl-search { flex-wrap: nowrap; padding-left: 14px; }
    .bl-search button { padding: 0 18px; }
    .bl-read { padding-block: 10px; }
    .bl-count { letter-spacing: .1em; }
}
@media (hover: none) {
    .bl-feature:hover .bl-media img, .bl-card:hover .bl-media img { transform: none; }
    .bl-feature:hover, .bl-card:hover { box-shadow: none; }
}
