/*
Theme Name: Delphi Blog
Theme URI: https://delphi-decks.com/blog/
Author: Delphi Construction
Description: Blog theme matching the delphi-decks.com static site (header, footer, fonts and colors are shared with /assets/css/style.css).
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: delphi-blog
*/

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
.blog-hero {
  background-color: #2d4191;
  position: relative;
  overflow: hidden;
  height: 60vh;
  min-height: 380px;
  max-height: 620px;
}

.blog-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.blog-hero .container {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 3rem;
  text-align: center;
}

.blog-hero h1 {
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
}

.blog-hero p {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0;
}

.blog-hero--single h1 {
  font-size: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero .post-meta {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .blog-hero { height: 55vh; }
  .blog-hero h1 { font-size: 2.5rem; }
  .blog-hero--single h1 { font-size: 2rem; }
  .blog-hero p { font-size: 1.15rem; }
}

/*--------------------------------------------------------------
# Post cards
--------------------------------------------------------------*/
.blog-list {
  background-color: #F5F4F2;
}

.post-card {
  background: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post-card__img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #bbb6b0;
}

.post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card__cat {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a85700;
}

.post-card__title {
  font-size: 1.6rem;
  margin: 0.4rem 0 0.75rem;
}

.post-card__title a {
  color: #2d4191;
}

.post-card__title a:hover {
  color: #fc8900;
  text-decoration: none;
}

.post-card__excerpt {
  font-size: 1rem;
  color: #333;
  flex: 1;
  margin-bottom: 0.5rem;
}

.post-card__more {
  font-size: 0.95rem;
  font-weight: 700;
  color: #a85700;
  text-transform: uppercase;
}

.post-card__more:hover {
  color: #2d4191;
  text-decoration: none;
}

.post-date {
  font-size: 0.85rem;
  color: #666;
}

/*--------------------------------------------------------------
# Pagination
--------------------------------------------------------------*/
.blog-pagination .nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 1rem;
}

.blog-pagination .page-numbers {
  display: inline-block;
  min-width: 44px;
  padding: 0.6rem 0.9rem;
  text-align: center;
  background: #fff;
  color: #2d4191;
  font-weight: 600;
}

.blog-pagination .page-numbers.current,
.blog-pagination a.page-numbers:hover {
  background: #2d4191;
  color: #fff;
  text-decoration: none;
}

/*--------------------------------------------------------------
# Single post content
--------------------------------------------------------------*/
.post-content {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #222;
}

.post-content h2 { font-size: 2.1rem; color: #2d4191; margin: 2.5rem 0 1rem; }
.post-content h3 { font-size: 1.6rem; color: #a85700; margin: 2rem 0 0.75rem; }
.post-content h4 { font-size: 1.3rem; color: #2d4191; margin: 1.5rem 0 0.5rem; }
.post-content p,
.post-content ul,
.post-content ol { margin-bottom: 1.4rem; }
.post-content a { color: #2d4191; text-decoration: underline; text-decoration-color: #fc8900; text-underline-offset: 3px; }
.post-content a:hover { color: #a85700; }
.post-content img { max-width: 100%; height: auto; }
.post-content figure { margin: 2rem 0; }
.post-content figcaption { font-size: 0.9rem; color: #666; text-align: center; margin-top: 0.5rem; }
.post-content blockquote {
  border-left: 4px solid #fc8900;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-style: italic;
  margin: 2rem 0;
}
.post-content .alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.post-content .alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.post-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.post-content .alignwide,
.post-content .alignfull { max-width: 100%; }
.post-content table { width: 100%; margin-bottom: 1.5rem; font-size: 1rem; }
.post-content th,
.post-content td { border: 1px solid #ddd; padding: 0.6rem; }
.post-content::after { content: ""; display: table; clear: both; }

@media (max-width: 575px) {
  .post-content .alignleft,
  .post-content .alignright { float: none; margin: 1rem 0; }
}

.post-tags a {
  display: inline-block;
  font-size: 0.9rem;
  background: #F5F4F2;
  color: #2d4191;
  padding: 0.3rem 0.75rem;
  margin: 0 0.4rem 0.4rem 0;
}

/*--------------------------------------------------------------
# Call to action
--------------------------------------------------------------*/
.post-cta {
  background: #2d4191;
  color: #fff;
  padding: 2.5rem;
  text-align: center;
}

.post-cta h2 { color: #fff; font-size: 2rem; }
.post-cta p { font-size: 1.1rem; }

.post-cta .btn-primary {
  border: none;
  padding: 0.8rem 2rem;
  font-weight: 700;
  text-transform: uppercase;
}

.post-cta .btn-primary:hover {
  background-color: #fff;
  color: #2d4191;
}

/*--------------------------------------------------------------
# Prev / next
--------------------------------------------------------------*/
.post-nav {
  font-size: 1rem;
  border-top: 1px solid #e5e5e5;
  padding-top: 1.5rem;
}

.post-nav a { color: #2d4191; font-weight: 600; }
.post-nav a:hover { color: #fc8900; text-decoration: none; }
.post-nav small { display: block; color: #777; text-transform: uppercase; font-size: 0.75rem; }

/* Accessibility */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* Keep the fixed header below the WP admin bar when logged in */
.admin-bar #header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar #header { top: 46px; }
}

/*--------------------------------------------------------------
# Breadcrumbs
--------------------------------------------------------------*/
.breadcrumbs-bar {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0.85rem 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.breadcrumbs li { color: #666; }
.breadcrumbs li + li::before { content: "\203A"; margin: 0 0.6rem; color: #bbb6b0; }
.breadcrumbs a { color: #2d4191; }
.breadcrumbs a:hover { color: #fc8900; text-decoration: none; }
.breadcrumbs li[aria-current] {
  max-width: 45ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/*--------------------------------------------------------------
# Category filter
--------------------------------------------------------------*/
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-filter a {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #2d4191;
  border: 1px solid #ddd;
  border-radius: 999px;
}

.cat-filter a:hover,
.cat-filter a.is-active {
  background: #2d4191;
  border-color: #2d4191;
  color: #fff;
  text-decoration: none;
}

/*--------------------------------------------------------------
# Featured card + meta
--------------------------------------------------------------*/
.post-card__meta { display: flex; align-items: center; gap: 0.6rem; }

.post-card__badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #a85700;
  color: #fff;
  padding: 0.2rem 0.55rem;
}

.post-card--featured .post-card__img { aspect-ratio: 16 / 8; }
.post-card--featured .post-card__title { font-size: 2.2rem; }
.post-card--featured .post-card__excerpt { font-size: 1.1rem; }

@media (max-width: 575px) {
  .post-card--featured .post-card__title { font-size: 1.7rem; }
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.blog-sidebar { font-size: 1rem; }

.sidebar-widget {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-widget__title {
  font-size: 1.35rem;
  line-height: 1.2;
  color: #2d4191;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid #fc8900;
  display: inline-block;
}

.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }

.sidebar-search { display: flex; }

.sidebar-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #ccc;
  border-right: 0;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
}

.sidebar-search input:focus { outline: 2px solid #fc8900; outline-offset: -2px; }

.sidebar-search button {
  border: 0;
  background: #a85700;
  color: #fff;
  width: 48px;
}

.sidebar-search button:hover { background: #2d4191; }

.sidebar-cta { background: #2d4191; color: #fff; }
.sidebar-cta .sidebar-widget__title { color: #fff; }
.sidebar-cta p { font-size: 1rem; }
.sidebar-cta .btn-primary { border: 0; font-weight: 700; text-transform: uppercase; padding: 0.7rem; }
.sidebar-cta .btn-primary:hover { background: #fff; color: #2d4191; }
.sidebar-cta__phone {
  display: block;
  text-align: center;
  margin-top: 0.85rem;
  color: #fff;
  font-weight: 700;
}
.sidebar-cta__phone:hover { color: #fc8900; text-decoration: none; }

.sidebar-list li { border-bottom: 1px solid #f0f0f0; }
.sidebar-list li:last-child { border-bottom: 0; }

.sidebar-list a {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  color: #333;
}

.sidebar-list a:hover { color: #fc8900; text-decoration: none; }

.sidebar-list span {
  font-size: 0.8rem;
  background: #F5F4F2;
  color: #2d4191;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  align-self: center;
}

.sidebar-recent li {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.sidebar-recent li:last-child { margin-bottom: 0; }

.sidebar-recent__img {
  flex: 0 0 72px;
  height: 72px;
  overflow: hidden;
  background: #bbb6b0;
}

.sidebar-recent__img img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-recent__title {
  display: block;
  color: #2d4191;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.sidebar-recent__title:hover { color: #fc8900; text-decoration: none; }


/*--------------------------------------------------------------
# Share links
--------------------------------------------------------------*/
.share-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-links__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-right: 0.25rem;
}

.share-links__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  background: #2d4191;
  transition: transform 0.15s, opacity 0.15s;
}

.share-links__btn:hover { color: #fff; transform: translateY(-2px); opacity: 0.9; text-decoration: none; }
.share-links__btn--facebook { background: #1877f2; }
.share-links__btn--x { background: #000; }
.share-links__btn--linkedin { background: #0a66c2; }
.share-links__btn--pinterest { background: #e60023; }
.share-links__btn--email { background: #5f5a54; }
.share-links__btn--copy { background: #a85700; cursor: pointer; }
.share-links__btn--copy.is-copied { background: #28a745; }

/*--------------------------------------------------------------
# Table of contents
--------------------------------------------------------------*/
.post-toc {
  background: #F5F4F2;
  border-left: 4px solid #fc8900;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.post-toc__title {
  font-family: "Fjalla One", sans-serif;
  font-size: 1.25rem;
  color: #2d4191;
  margin-bottom: 0.5rem !important;
}

.post-toc ol { margin: 0; padding-left: 1.25rem; }
.post-toc li { margin-bottom: 0.3rem; }
.post-content .post-toc a { color: #2d4191; text-decoration: none; }
.post-content .post-toc a:hover { color: #fc8900; text-decoration: underline; }

.post-content h2[id] { scroll-margin-top: 170px; }

/*--------------------------------------------------------------
# Author box + hero category
--------------------------------------------------------------*/
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: #F5F4F2;
  padding: 1.5rem;
}

.author-box__avatar { border-radius: 50%; flex: 0 0 auto; }
.author-box p { margin: 0; }
.author-box__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #777; }
.author-box__name { font-family: "Fjalla One", sans-serif; font-size: 1.4rem; color: #2d4191; }
.author-box__bio { font-size: 1rem; color: #444; margin-top: 0.35rem !important; }

@media (max-width: 575px) {
  .author-box { flex-direction: column; }
}

.post-hero-cat {
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem !important;
}

/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10000;
  background: #2d4191;
  color: #fff;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
}

.skip-link:focus { top: 1rem; color: #fff; }

.blog-list a:focus-visible,
.blog-sidebar a:focus-visible,
.post-content a:focus-visible,
.breadcrumbs a:focus-visible,
.share-links__btn:focus-visible,
.cat-filter a:focus-visible,
.btn:focus-visible,
.sidebar-search button:focus-visible {
  outline: 3px solid #fc8900;
  outline-offset: 2px;
}

#main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  .post-card,
  .share-links__btn { transition: none; }
  .post-card:hover,
  .share-links__btn:hover { transform: none; }
}

/* Mobile spacing */
@media (max-width: 575px) {
  .post-card__body { padding: 1.25rem; }
  .post-card__title { font-size: 1.45rem; }
  .post-content { font-size: 1.05rem; }
  .post-content h2 { font-size: 1.75rem; }
  .post-content h3 { font-size: 1.4rem; }
  .post-cta { padding: 1.75rem 1.25rem; }
  .post-cta h2 { font-size: 1.6rem; }
  .sidebar-widget { padding: 1.25rem; }
  .blog-hero .post-meta { font-size: 0.85rem; }
}

/* Pull quotes: the site-wide blockquote style is sized for hero copy */
.post-content blockquote,
.post-content blockquote p {
  font-size: 1.3rem;
  line-height: 1.5;
  color: #2d4191;
}
.post-content blockquote p:last-child { margin-bottom: 0; }

@media (max-width: 575px) {
  .post-content blockquote,
  .post-content blockquote p { font-size: 1.15rem; }
  .share-links__label { display: none; }
  .share-links { gap: 0.45rem; }
}

/* On phones the post already ends with an estimate CTA right above the sidebar */
@media (max-width: 991px) {
  .single .sidebar-cta { display: none; }
}
