/*
 * Shared country rendering for the canonical International blogPosts component.
 * Country content may differ, but the visual grammar stays inherited and identical.
 */

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts {
  padding: 80px 0 clamp(80px, 8vw, 112px);
  background: var(--intl-surface, var(--pvs-main-white));
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-eyebrow {
  display: none;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-flex-copy h2 {
  width: 100%;
  margin: 0;
  color: var(--intl-heading, var(--pvs-nd-ink));
  font-size: var(--intl-h2-font-size, clamp(32px, 3.4vw, 44px));
  font-weight: var(--intl-heading-weight, 700);
  line-height: 1.05;
  white-space: normal;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-rich-copy {
  width: min(100%, 760px);
  color: var(--intl-body, var(--pvs-main-body));
  font-size: var(--intl-body-font-size, clamp(15px, 1.3vw, 18px));
  line-height: var(--intl-body-line-height, 1.5);
}

/*
 * Compatibility for an already-materialized page whose stored provenance predates
 * renderer-derived source classes. Only a section with the governed current Blog
 * component can enter this branch; new renders receive intl-flex-source-blogPosts.
 */
.intl-home:not(.intl-blog-page)
  .intl-flex-section:not(.intl-flex-source-blogPosts):has(.intl-flex-blog-cards[data-cms-blog-feed-source="current"]) {
  padding: 80px 0 clamp(80px, 8vw, 112px);
  background: var(--pvs-main-white);
}

.intl-home:not(.intl-blog-page)
  .intl-flex-section:not(.intl-flex-source-blogPosts):has(.intl-flex-blog-cards[data-cms-blog-feed-source="current"])
  .intl-eyebrow {
  display: none;
}

.intl-home:not(.intl-blog-page)
  .intl-flex-section:not(.intl-flex-source-blogPosts):has(.intl-flex-blog-cards[data-cms-blog-feed-source="current"])
  .intl-flex-copy h2 {
  width: 100%;
  margin: 0;
  color: var(--pvs-nd-ink);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
}

/*
 * Historical US output may still carry local title textStyles inline. The
 * inherited component owns these four properties, so the compatibility reset
 * restores the same Cairo title contract while the next render drops the inline
 * declarations entirely.
 */
:where(
  .intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-flex-copy h2[style],
  .intl-home:not(.intl-blog-page)
    .intl-flex-section:not(.intl-flex-source-blogPosts):has(.intl-flex-blog-cards[data-cms-blog-feed-source="current"])
    .intl-flex-copy h2[style]
) {
  position: static;
  transform: none;
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.05;
}

.intl-home:not(.intl-blog-page)
  .intl-flex-section:not(.intl-flex-source-blogPosts):has(.intl-flex-blog-cards[data-cms-blog-feed-source="current"])
  .intl-rich-copy {
  width: min(100%, 760px);
  text-align: center;
  color: var(--pvs-main-body);
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card,
.intl-news-template-catalog .intl-blog-card {
  position: relative;
  min-height: 500px;
  border: var(--intl-card-border, 1px solid var(--pvs-main-line));
  border-radius: var(--intl-radius, 8px);
  background: var(--intl-surface, var(--pvs-main-white));
  color: var(--intl-body, var(--pvs-main-body));
  box-shadow: var(--intl-card-elevation, none);
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card {
  grid-template-rows: minmax(205px, max-content) 1fr;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card:hover,
.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card:focus-visible,
.intl-news-template-catalog .intl-blog-card:is(:hover, :focus-visible) {
  box-shadow: 0 8px 16px color-mix(in srgb, var(--pvs-main-ink) 16%, transparent);
  transform: translateY(-3px);
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card-content,
.intl-news-template-catalog .intl-blog-card-content {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-meta,
.intl-news-template-catalog .intl-blog-meta {
  position: absolute;
  top: 0;
  transform: translateY(-50%);
  left: 20px;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pvs-nd-blue);
  color: var(--cms-flex-block-text-color, var(--intl-on-dark-heading, #f9f9fb));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card h3,
.intl-news-template-catalog .intl-blog-card h3 {
  color: var(--cms-flex-block-text-color, var(--intl-heading, var(--pvs-main-ink)));
  font-size: clamp(20px, 1.75vw, 24px);
  line-height: 1.3;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-copy,
.intl-news-template-catalog .intl-blog-copy {
  color: var(--cms-flex-block-text-color, var(--intl-body, var(--pvs-main-body)));
  font-size: var(--intl-body-font-size, clamp(15px, 1.3vw, 17px));
  line-height: var(--intl-body-line-height, 1.45);
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-date,
.intl-news-template-catalog .intl-blog-date {
  display: block;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--intl-body, var(--pvs-main-body)) 16%, transparent);
  color: var(--cms-flex-block-text-color, var(--intl-body-muted, var(--intl-body, var(--pvs-main-body))));
  font-size: 14px;
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts.intl-section-tone-light .intl-blog-card {
  --intl-body: var(--intl-on-dark-body, var(--pvs-main-white));

  border: 0;
  border-radius: 30px;
  background: var(--pvs-main-blue-deep, var(--pvs-main-blue));
  color: var(--intl-on-dark-body, var(--pvs-main-white));
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts.intl-section-tone-light .intl-blog-card h3 {
  color: var(--cms-flex-block-text-color, var(--intl-on-dark-heading, var(--pvs-main-white)));
}

.intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts.intl-section-tone-light .intl-blog-card :is(.intl-blog-copy, .intl-blog-date) {
  color: var(--cms-flex-block-text-color, var(--intl-on-dark-body, var(--pvs-main-white)));
}

/*
 * PVS Connect is a governed, portable presentation. Its visual identity belongs
 * to the feed instead of the active tenant, so a country copy stays identical
 * to the approved International component.
 */
.intl-home:not(.intl-blog-page)
  .intl-flex-source-blogPosts
  .intl-flex-blog-cards[data-cms-blog-feed-presentation="pvs-connect"]
  .intl-blog-card,
.intl-news-template-catalog [data-cms-blog-feed-presentation="pvs-connect"] .intl-blog-card {
  --intl-body: color-mix(in srgb, var(--pvs-main-white) 78%, transparent);

  border: 0;
  border-radius: 30px;
  background: var(--pvs-nd-blue-deep, var(--pvs-main-blue-deep, var(--pvs-main-blue)));
  color: var(--cms-flex-block-text-color, var(--pvs-main-white));
  box-shadow: none;
}

.intl-home:not(.intl-blog-page)
  .intl-flex-source-blogPosts
  .intl-flex-blog-cards[data-cms-blog-feed-presentation="pvs-connect"]
  .intl-blog-card h3,
.intl-news-template-catalog [data-cms-blog-feed-presentation="pvs-connect"] .intl-blog-card h3 {
  color: var(--pvs-main-white);
}

.intl-home:not(.intl-blog-page)
  .intl-flex-source-blogPosts
  .intl-flex-blog-cards[data-cms-blog-feed-presentation="pvs-connect"]
  .intl-blog-card :is(.intl-blog-copy, .intl-blog-date),
.intl-news-template-catalog [data-cms-blog-feed-presentation="pvs-connect"] .intl-blog-card :is(.intl-blog-copy, .intl-blog-date) {
  color: var(--cms-flex-block-text-color, var(--intl-body));
}

.intl-home:not(.intl-blog-page)
  .intl-flex-source-blogPosts
  .intl-flex-blog-cards[data-cms-blog-feed-presentation="pvs-connect"]
  .intl-blog-date,
.intl-news-template-catalog [data-cms-blog-feed-presentation="pvs-connect"] .intl-blog-date {
  border-top-color: color-mix(in srgb, var(--pvs-main-white) 16%, transparent);
}

@media (width < 641px) {
  .intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts,
  .intl-home:not(.intl-blog-page)
    .intl-flex-section:not(.intl-flex-source-blogPosts):has(.intl-flex-blog-cards[data-cms-blog-feed-source="current"]) {
    padding-bottom: 64px;
  }

  .intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-grid,
  .intl-news-template-catalog .intl-blog-grid {
    grid-template-columns: 1fr;
  }

  .intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card,
  .intl-news-template-catalog .intl-blog-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intl-home:not(.intl-blog-page) .intl-flex-source-blogPosts .intl-blog-card,
  .intl-news-template-catalog .intl-blog-card {
    transition: none;
  }
}
