/* ==========================================================================
   Blog — listing (home.php) + single post (single.php)
   Brand tokens from global.css: --primary-color #f00004, --dark #141414,
   --heading-color #141414, --text-color #4a4a4a, --border-color #e6e6e6,
   fonts --font-head (Roboto Slab) / --font-body (Jost).
   ========================================================================== */

/* ---- Post banner: keep the title readable over a photo ------------------ */
.page-banner--post .page-banner__title { max-width: 60rem; }
.page-banner--post .eyebrow--badge { letter-spacing: .08em; }

/* ==========================================================================
   Listing grid
   ========================================================================== */
.sp-blog__grid {
   display: grid;
   grid-template-columns: repeat(3, 1fr);
   gap: 2rem;
}
@media (max-width: 991.98px) { .sp-blog__grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (max-width: 575.98px)  { .sp-blog__grid { grid-template-columns: 1fr; } }

.sp-blog-card {
   display: flex;
   flex-direction: column;
   background: #fff;
   border: 1px solid var(--border-color);
   border-radius: 0;                     /* live uses sharp corners */
   overflow: hidden;
   transition: transform .25s ease, box-shadow .25s ease;
}
.sp-blog-card:hover {
   transform: translateY(-4px);
   box-shadow: 0 18px 40px rgba(20, 20, 20, .12);
}

.sp-blog-card__media {
   position: relative;
   display: block;
   aspect-ratio: 16 / 10;
   overflow: hidden;
}
.sp-blog-card__media img {
   width: 100%; height: 100%;
   object-fit: cover;
   transition: transform .5s ease;
}
.sp-blog-card:hover .sp-blog-card__media img { transform: scale(1.05); }

.sp-blog-card__cat {
   position: absolute; left: 0; bottom: 0;
   background: var(--primary-color);
   color: #fff;
   font-family: var(--font-body);
   font-size: .78rem; font-weight: 600;
   letter-spacing: .03em; text-transform: uppercase;
   padding: .45rem .9rem;
}

.sp-blog-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.6rem 1.5rem 1.75rem; }

.sp-blog-card__meta {
   display: flex; align-items: center; gap: .5rem;
   font-family: var(--font-body);
   font-size: .85rem; color: var(--text-color);
   margin-bottom: .55rem;
}
.sp-blog-card__dot { color: var(--primary-color); }

.sp-blog-card__title {
   font-family: var(--font-head);
   font-size: 1.4rem; line-height: 1.25; font-weight: 700;
   margin: 0 0 .7rem;
}
.sp-blog-card__title a { color: var(--heading-color); }
.sp-blog-card__title a:hover { color: var(--primary-color); }

.sp-blog-card__excerpt {
   color: var(--text-color);
   font-size: 1rem; line-height: 1.65;
   margin: 0 0 1.25rem;
}

.sp-blog-card__more {
   margin-top: auto;
   align-self: flex-start;
   font-family: var(--font-body);
   font-weight: 700; font-size: .9rem;
   letter-spacing: .02em; text-transform: uppercase;
   color: var(--primary-color);
}
.sp-blog-card__more span { transition: transform .2s ease; display: inline-block; }
.sp-blog-card__more:hover { color: var(--primary-hover); }
.sp-blog-card__more:hover span { transform: translateX(4px); }

/* ==========================================================================
   Pagination (shared with archive/search)
   ========================================================================== */
.sp-pagination { margin-top: 3.5rem; }
.sp-pagination .nav-links {
   display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem;
}
.sp-pagination .page-numbers {
   display: inline-flex; align-items: center; justify-content: center;
   min-width: 46px; height: 46px; padding: 0 .5rem;
   font-family: var(--font-body); font-weight: 600;
   color: var(--heading-color);
   border: 1px solid var(--border-color);
   background: #fff;
   transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.sp-pagination .page-numbers:hover { border-color: var(--primary-color); color: var(--primary-color); }
.sp-pagination .page-numbers.current {
   background: var(--primary-color); border-color: var(--primary-color); color: #fff;
}
.sp-pagination .page-numbers.dots { border-color: transparent; }

/* ==========================================================================
   Single post
   ========================================================================== */
.sp-single__figure { margin-bottom: 2rem; overflow: hidden; }
.sp-single__figure img { width: 100%; height: auto; display: block; }

.sp-single__content { color: var(--text-color); font-size: 1.08rem; line-height: 1.8; }
.sp-single__content > * + * { margin-top: 1.35rem; }
.sp-single__content h2 { font-family: var(--font-head); font-size: 1.9rem; color: var(--heading-color); margin-top: 2.5rem; }
.sp-single__content h3 { font-family: var(--font-head); font-size: 1.45rem; color: var(--heading-color); margin-top: 2rem; }
.sp-single__content p { margin: 0; }
.sp-single__content a { color: var(--primary-color); text-decoration: underline; text-underline-offset: 3px; }
.sp-single__content a:hover { color: var(--primary-hover); }
.sp-single__content ul,
.sp-single__content ol { padding-left: 1.3rem; }
.sp-single__content li { margin-bottom: .55rem; }
.sp-single__content ul li::marker { color: var(--primary-color); }
.sp-single__content blockquote {
   margin: 2rem 0;
   padding: 1.2rem 1.6rem;
   border-left: 4px solid var(--primary-color);
   background: #f7f7f7;
   font-size: 1.15rem; font-style: italic; color: var(--heading-color);
}
.sp-single__content img { max-width: 100%; height: auto; }

.sp-single__tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sp-single__tags-label { font-weight: 700; color: var(--heading-color); margin-right: .25rem; }
.sp-single__tags a {
   display: inline-block; padding: .35rem .85rem;
   background: #f2f2f2; color: var(--text-color);
   font-size: .85rem; border-radius: 0;
}
.sp-single__tags a:hover { background: var(--primary-color); color: #fff; }

.sp-single__nav {
   display: flex; justify-content: space-between; gap: 1rem;
   margin-top: 3rem; padding-top: 2rem;
   border-top: 1px solid var(--border-color);
}
.sp-single__nav a {
   display: flex; flex-direction: column; gap: .25rem;
   font-family: var(--font-head); font-weight: 700; color: var(--heading-color);
   max-width: 46%;
}
.sp-single__nav-next { text-align: right; margin-left: auto; }
.sp-single__nav a span {
   font-family: var(--font-body); font-weight: 600; font-size: .8rem;
   letter-spacing: .03em; text-transform: uppercase; color: var(--primary-color);
}
.sp-single__nav a:hover { color: var(--primary-color); }

/* ---- Sidebar ------------------------------------------------------------ */
.sp-single__sidebar { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 992px) { .sp-single__sidebar { padding-left: 1rem; } }

.sp-widget { background: #fff; border: 1px solid var(--border-color); padding: 1.6rem 1.5rem; }
.sp-widget__title {
   font-family: var(--font-head); font-size: 1.25rem; font-weight: 700;
   color: var(--heading-color); margin: 0 0 1.1rem;
   padding-bottom: .7rem; position: relative;
}
.sp-widget__title::after {
   content: ""; position: absolute; left: 0; bottom: 0;
   width: 42px; height: 3px; background: var(--primary-color);
}

.sp-widget--search .search-form,
.sp-widget--search form { display: flex; gap: .5rem; }
.sp-widget--search input[type="search"],
.sp-widget--search .search-field {
   flex: 1; min-width: 0; padding: .65rem .8rem;
   border: 1px solid var(--border-color); background: #fff; color: var(--heading-color);
}
.sp-widget--search button,
.sp-widget--search .search-submit {
   padding: .65rem 1rem; border: 0; background: var(--primary-color); color: #fff;
   font-weight: 600; cursor: pointer;
}
.sp-widget--search button:hover,
.sp-widget--search .search-submit:hover { background: var(--primary-hover); }

.sp-widget__posts { list-style: none; margin: 0; padding: 0; }
.sp-widget__posts li + li { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.sp-widget__posts a { display: flex; gap: .85rem; align-items: center; }
.sp-widget__posts img { width: 66px; height: 66px; object-fit: cover; flex: none; }
.sp-widget__post-title { display: block; font-family: var(--font-head); font-weight: 700; font-size: .98rem; line-height: 1.3; color: var(--heading-color); }
.sp-widget__posts a:hover .sp-widget__post-title { color: var(--primary-color); }
.sp-widget__post-date { display: block; font-size: .8rem; color: var(--text-color); margin-top: .25rem; }

.sp-widget__cats { list-style: none; margin: 0; padding: 0; }
.sp-widget__cats li { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--border-color); }
.sp-widget__cats li:last-child { border-bottom: 0; }
.sp-widget__cats a { color: var(--text-color); font-family: var(--font-body); }
.sp-widget__cats a:hover { color: var(--primary-color); }
.sp-widget__cats span { font-size: .8rem; color: #fff; background: var(--primary-color); min-width: 24px; text-align: center; padding: .1rem .45rem; }

.sp-widget--cta { border: 0; text-align: left; background: var(--dark); }
.sp-widget--cta .sp-widget__title { color: #fff; }
.sp-widget--cta p { color: rgba(255,255,255,.85); margin: 0 0 1.25rem; line-height: 1.6; }

@media (max-width: 991.98px) {
   .sp-single__sidebar { margin-top: 1rem; }
   .sp-single__nav a { max-width: 48%; }
}
