@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* =========================================================
   Blog Listing Page
   ========================================================= */

.blog-listing-wrap {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 60px clamp(24px, 3vw, 56px) 80px;
}

.blog-listing-title {
  font-family: alternate-gothic-atf, alternate-gothic-extra-cond, 'Arial Narrow', sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(2.8rem, 5vw, 4.5rem) !important;
  text-transform: uppercase;
  color: var(--ps-blue) !important;
  margin: 0 0 48px !important;
}

.blog-post-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 3vw, 52px) clamp(28px, 2.4vw, 44px);
  margin-top: 0 !important;
  margin-bottom: 56px;
  padding: 0 !important;
  list-style: none !important;
}

.blog-post-grid > li {
  margin: 0 !important;
  padding: 0 !important;
  align-self: start;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-card-image img,
.blog-card-image figure {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 16px;
  background: #e8ecf5;
}

.blog-card-image:not(:has(img)) {
  aspect-ratio: 16 / 9;
  background: #e8ecf5;
  border-radius: 6px;
  margin-bottom: 16px;
}

.blog-card-date {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.8rem !important;
  color: var(--ps-blue) !important;
  margin: 0 0 8px !important;
  text-transform: none;
  letter-spacing: 0.01em;
}

.blog-card-title a,
.blog-card-title {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  color: var(--ps-blue) !important;
  text-decoration: none !important;
  text-transform: none !important;
  margin: 0 0 10px !important;
}

@media (hover: hover) {
  .blog-card-title a:hover {
    color: rgb(var(--ps-blue-rgb) / 0.84) !important;
  }
}

.blog-card-excerpt p,
.blog-card-excerpt {
  font-family: 'Inter', sans-serif !important;
  font-size: 0.92rem !important;
  color: var(--ps-blue) !important;
  line-height: 1.6 !important;
  margin: 0 0 12px !important;
}

.blog-card-excerpt .wp-block-post-excerpt__more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ps-blue);
  text-decoration: none;
}

.blog-card-excerpt .wp-block-post-excerpt__more-link::after {
  content: '→';
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (hover: hover) {
  .blog-card-excerpt .wp-block-post-excerpt__more-link:hover::after,
  .blog-card-excerpt .wp-block-post-excerpt__more-link:focus-visible::after {
    transform: translateX(6px);
  }
}

.wp-block-query-pagination {
  font-family: 'Inter', sans-serif;
  justify-content: center;
  gap: 8px;
}

.wp-block-query-pagination a,
.wp-block-query-pagination span {
  color: var(--ps-blue) !important;
}

@media (max-width: 900px) {
  .blog-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-listing-wrap { padding: 40px 20px 60px; }
  .blog-post-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Blog Single Post — Full-width Hero
   ========================================================= */

/* Main reset */
main:has(.blog-hero-full) {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Hero */
.blog-hero-full {
  position: relative;
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  min-height: 65vh;
  padding-top: calc(var(--ps-prime-panel-h, 58px) + (2 * var(--ps-prime-top, 1.5rem)) + 32px) !important;
  overflow: hidden;
  background: #1a2a5e;
  display: flex;
  align-items: flex-end;
}

/* Featured image */
.blog-hero-full .wp-block-post-featured-image,
.blog-hero-full .blog-hero-img {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.blog-hero-full .wp-block-post-featured-image img,
.blog-hero-full .blog-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay */
.blog-hero-full::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 20, 50, 0.82) 0%,
    rgba(10, 20, 50, 0.35) 55%,
    rgba(10, 20, 50, 0.10) 100%
  );
  z-index: 1;
}

/* Title */
body .blog-hero-full h1,
body .blog-hero-full .wp-block-post-title,
body .blog-hero-full .blog-hero-title {
  position: relative;
  z-index: 2;
  font-family: "alternate-gothic-extra-cond", 'Arial Narrow', sans-serif !important;
  font-weight: 700 !important;
  font-size: 4.5rem !important;
  line-height: 0.95 !important;
  letter-spacing: 0.01em !important;
  color: #ffffff !important;
  text-transform: none !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 clamp(24px, 5vw, 72px) clamp(36px, 5vw, 60px) !important;
  max-width: 60% !important;
}

@media (max-width: 768px) {
  body .blog-hero-full h1,
  body .blog-hero-full .wp-block-post-title,
  body .blog-hero-full .blog-hero-title {
    font-size: 2.8rem !important;
    max-width: 100% !important;
  }
}

/* =========================================================
   Blog Single Post — Content Body
   ========================================================= */

.blog-post-wrap,
.blog-post-wrap *,
.blog-post-wrap .wp-block-post-content,
.blog-post-wrap .wp-block-post-content * {
  text-align: left !important;
}

.blog-post-wrap {
  max-width: 750px !important;
  margin-left: clamp(24px, 5vw, 72px) !important;
  margin-right: auto !important;
  padding: 48px 0 80px;
}

.blog-post-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--ps-blue);
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 36px;
}

.blog-post-wrap h2 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem) !important;
  line-height: 1.25 !important;
  color: var(--ps-blue) !important;
  text-transform: none !important;
  margin: 44px 0 12px !important;
}

.blog-post-wrap h3 {
  font-family: 'Inter', sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: var(--ps-blue) !important;
  text-transform: none !important;
  margin: 28px 0 8px !important;
}

.blog-post-wrap p,
.blog-post-wrap li {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ps-blue);
  margin: 0 0 20px;
}

.blog-post-wrap a {
  color: var(--ps-blue);
}

.blog-post-wrap ul,
.blog-post-wrap ol {
  padding-left: 24px;
  margin: 0 0 20px;
}

.blog-post-wrap li { margin-bottom: 8px; }

.blog-post-wrap strong {
  font-weight: 700;
  color: var(--ps-blue);
}

.blog-post-wrap hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 44px 0;
}

@media (max-width: 768px) {
  .blog-hero-full { min-height: 60vh; }
  .blog-post-wrap {
    max-width: none !important;
    margin-left: 24px !important;
    margin-right: 24px !important;
    padding: 36px 0 60px;
  }
}
