/*
Theme Name: keystone
Theme URI: 
Author: 
Author URI: 
Description: A WordPress Full Site Editing theme.
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: my-theme
Tags: full-site-editing, block-patterns
*/

@import url('assets/fonts/fonts.css');

:root {
  /* Colors */
  --color-rsm-blue: #009cde;
  --color-rsm-green: #3f9c35;
  --color-voa-blue: #3a79b7;
  --font-merriweather: "Merriweather", Georgia, Times, "Times New Roman", serif;
  --font-skolar-fallback: "Roboto Condensed", "Arial Narrow", Arial, "Arial Unicode MS", Helvetica, sans-serif;
  --color-charcoal-grey: #515356;
  --color-white: #ffffff;
  --color-light-grey-surface: #f0f0f0;
  --color-mid-grey-border: #cdcecf;
  --color-muted-grey: #b8b8b9;
  --color-dark-text: #333333;

  /* Typography — match original RSM stack exactly */
  --font-prelo-stack: Prelo, "Noto Sans", "Noto Sans Georgian", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans JP", "Noto Sans TC", "Noto Sans SC", "Noto Sans KR", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-section-heading-large-family: var(--font-prelo-stack);
  --font-section-heading-large-size: 36px;
  --font-section-heading-large-weight: 200;
  --font-section-heading-large-line-height: 43.2px;
  --font-section-heading-medium-family: var(--font-prelo-stack);
  --font-section-heading-medium-size: 24px;
  --font-section-heading-medium-weight: 300;
  --font-section-heading-medium-line-height: 28.8px;
  --font-nav-item-family: var(--font-prelo-stack);
  --font-nav-item-size: 18px;
  --font-nav-item-weight: 300;
  --font-nav-item-line-height: 24px;
  --font-body-default-family: var(--font-prelo-stack);
  --font-body-default-size: 16px;
  --font-body-default-weight: 300;
  --font-body-default-line-height: 24px;
  --font-body-small-family: var(--font-prelo-stack);
  --font-body-small-size: 14px;
  --font-body-small-weight: 300;
  --font-body-small-line-height: 24px;
  --font-label-bold-family: var(--font-prelo-stack);
  --font-label-bold-size: 12px;
  --font-label-bold-weight: 700;
  --font-label-bold-line-height: 14.4px;
  --font-caption-family: var(--font-prelo-stack);
  --font-caption-size: 12px;
  --font-caption-weight: 300;
  --font-caption-line-height: 14.4px;

  /* Spacing */
  --spacing-xs: 5px;
  --spacing-sm: 8px;
  --spacing-md-sm: 9px;
  --spacing-md: 10px;
  --spacing-md-lg: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  --spacing-2xl: 40px;
  --spacing-3xl: 48px;
  --spacing-4xl: 70px;
  --spacing-5xl: 80px;

  /* Border Radius */
  --radius-pill: 34px;
  --radius-none: 0px;
}

/* Prelo @font-face definitions — downloaded from original RSM site */
@font-face {
  font-family: Prelo;
  src: url("assets/fonts/Prelo-Light.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Prelo;
  src: url("assets/fonts/Prelo-Book.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Prelo;
  src: url("assets/fonts/Prelo-Medium.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Prelo;
  src: url("assets/fonts/Prelo-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Creattion;
  src: url("assets/fonts/Creattion.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
.wp-site-blocks {
  min-height: auto !important;
  height: auto !important;
}

body {
  margin: 0;
}

.wp-site-blocks {
  padding-top: 0;
  padding-bottom: 0;
}

/* Remove default block gap between main content and footer/template parts */
.wp-site-blocks > * + * {
  margin-block-start: 0 !important;
}

footer,
.wp-block-template-part {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

img {
  max-width: 100%;
  height: auto;
}

/* 去除 footer 下方多余空白 */
.site-footer,
footer,
.wp-block-group.alignfull.has-light-grey-surface-background-color {
  margin-bottom: 0 !important;
}

/* Hero banner — single pre-composited image with fixed 2.95:1 aspect ratio */
.wp-block-cover.hero-banner {
  position: relative;
  min-height: auto !important;
  height: auto !important;
  aspect-ratio: 2399 / 812;
  overflow: visible;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  z-index: 2;
}

main.wp-block-group {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove the block gap between the hero and the following section */
main.wp-block-group > .wp-block-cover.hero-banner {
  margin-bottom: 0 !important;
}

main.wp-block-group > .wp-block-cover.hero-banner + .wp-block-group.alignfull {
  margin-top: 0 !important;
}

.hero-banner .wp-block-cover__image-background {
  object-fit: cover;
  object-position: center;
}

.hero-banner .wp-block-cover__inner-container {
  width: 100%;
  max-width: 100%;
  min-height: auto !important;
  height: 100% !important;
  padding: 0 !important;
  overflow: visible;
}

.hero-content {
  position: relative;
  width: 100%;
  min-height: auto;
  height: 100%;
  overflow: visible;
}

/* Headline box positioned at the bottom-left, riding the image edge */
.hero-text-wrapper.wp-block-group {
  position: absolute;
  left: 3.5%;
  top: auto;
  bottom: -36px;
  transform: none;
  z-index: 4;
  width: 550px;
  font-size: 16px;
  overflow: visible;
}

/* Signature placed on the left, vertically around the upper-middle of the portrait */
.hero-name {
  position: absolute;
  left: 5%;
  top: 22%;
  bottom: auto;
  z-index: 2;
  text-align: left;
}

.hero-name .hero-name-title {
  font-family: Creattion, cursive;
  font-size: 48px;
  font-weight: 500;
  font-style: normal;
  color: var(--color-white);
  line-height: 1;
  margin: 0;
}

.hero-name .hero-name-subtitle {
  margin: 0;
}

.hero-name .hero-name-subtitle a {
  font-size: 14px;
  font-weight: 300;
  color: var(--color-white);
  text-decoration: none;
}

.hero-name .hero-name-subtitle a:hover {
  text-decoration: underline;
}

@media (max-width: 781px) {
  .hero-banner,
  .hero-content {
    min-height: auto !important;
  }

  .hero-text-wrapper {
    left: 5%;
    top: auto;
    bottom: 0;
    transform: none;
    width: auto;
    max-width: 85%;
  }

  .wp-block-heading.hero-highlight {
    font-size: 1.5em;
  }

  .hero-name {
    left: 5%;
    right: auto;
    top: 8%;
    bottom: auto;
    text-align: left;
  }

  .hero-name .hero-name-title {
    font-size: 32px;
  }
}

/* Hero decorative bars */
.hero-text-wrapper .hero-rec-top,
.hero-text-wrapper .hero-rec-bottom {
  position: absolute;
  margin: 0;
  padding: 0;
}

.hero-text-wrapper .hero-rec-top {
  width: 15px;
  height: 27px;
  top: -27px;
  right: 5px;
  background-color: var(--color-rsm-blue);
}

.hero-text-wrapper .hero-rec-bottom {
  width: 25px;
  height: 25px;
  margin-left: -25px;
  margin-top: 1px;
  background-color: var(--color-rsm-blue);
  overflow: hidden;
}

/* Hero headline — matches reference layout */
.wp-block-heading.hero-highlight {
  display: inline;
  margin: 0;
  font-weight: 300;
  font-size: 2em;
  background-color: var(--color-rsm-blue);
  color: var(--color-white);
  padding: 0 10px 2px 10px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 卡片阴影 — 提高优先级确保生效 */
.wp-block-group.has-card-shadow,
.has-card-shadow {
  box-shadow: rgba(0, 0, 0, 0.075) 0px 2px 4px 0px;
}

/* 卡片标签样式 */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 0;
}

.card-tags .card-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-rsm-blue);
  text-decoration: none;
}

.card-tags .card-tag:hover {
  text-decoration: underline;
}

/* 按钮 hover */
button,
.wp-block-button__link,
input[type="submit"] {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Newsletter button override */
.newsletter-button .wp-block-button__link {
  background-color: var(--color-white);
  color: var(--color-dark-text);
  border-radius: 0 !important;
  font-weight: 500;
  padding: 12px 24px;
  width: auto;
  min-width: 210px;
}

.newsletter-button .wp-block-button__link:hover {
  background-color: var(--color-rsm-blue);
  color: var(--color-white);
}

/* Remove gaps above/below the newsletter green band */
main.wp-block-group > .wp-block-group.alignfull.has-rsm-green-background-color {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ======================== News page ======================== */

/* VOA typography base for the news page */
.voa-news-page {
  font-family: var(--font-merriweather) !important;
  font-size: 16px;
  line-height: 1.5;
  color: #222f3a;
}

.voa-news-page .wp-block-heading,
.voa-news-page .wp-block-paragraph,
.voa-news-page .wp-block-button__link,
.voa-news-page .wp-block-image {
  font-family: var(--font-merriweather) !important;
}

.voa-news-page .wp-block-heading {
  border-bottom: none !important;
  box-shadow: none !important;
}

.voa-news-page .news-section-heading,
.voa-news-page .news-top-label,
.voa-news-page .news-more-label,
.voa-news-page .news-sidebar-title,
.voa-news-page .news-sidebar-item-meta,
.voa-news-page .news-sidebar-stats,
.voa-news-page .news-section-arrow,
.voa-news-page .news-sidebar-arrow,
.voa-news-page .news-sidebar-button .wp-block-button__link {
  font-family: var(--font-skolar-fallback) !important;
}

/* Section headings */
.news-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-mid-grey-border);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.news-section-heading {
  font-size: 22px !important;
  font-weight: 400 !important;
  color: #768492 !important;
  margin: 0;
  text-transform: none;
}

.news-section-heading a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-section-heading a:hover {
  color: var(--color-voa-blue);
}

.news-section-arrow,
.news-sidebar-arrow {
  font-size: 24px;
  font-weight: 300;
  color: #768492 !important;
  margin: 0;
}

.news-section-heading-line {
  font-size: 20px !important;
  border-bottom: 1px solid var(--color-mid-grey-border);
  padding-bottom: 8px;
}

/* Featured top story cover */
.news-featured-cover {
  width: 100% !important;
  min-height: 400px !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

.news-featured-cover .wp-block-cover__background {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 80%
  ) !important;
  opacity: 1 !important;
}

.news-featured-cover .wp-block-cover__inner-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 400px;
  padding: 24px;
}

.news-featured-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
}

.news-featured-title a {
  color: var(--color-white);
  text-decoration: none;
}

.news-featured-title a:hover {
  text-decoration: underline;
}

/* Top stories side list */
.news-top-columns > .wp-block-column {
  min-width: 0;
}

/* Single-post queries must not inherit the global 3-column grid */
.wp-block-query.news-query-top-stories-main .wp-block-post-template,
.wp-block-query.news-query-all-about-america .wp-block-post-template {
  display: block !important;
  grid-template-columns: none !important;
}

.wp-block-query .wp-block-post-template.news-top-list {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  gap: 14px;
}

.news-top-list > li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
}

.news-top-list > li .news-top-thumb,
.news-top-list > li .wp-block-post-featured-image.news-top-thumb {
  width: 120px;
  height: 80px;
  margin: 0;
  overflow: hidden;
}

.news-top-list > li .news-top-thumb img,
.news-top-list > li .wp-block-post-featured-image.news-top-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-top-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-voa-blue);
  margin: 0 0 4px;
  line-height: 1;
  letter-spacing: 0.3px;
}

.news-top-label a {
  color: var(--color-voa-blue);
  text-decoration: none;
}

.news-top-label .wp-block-post-terms__separator,
.news-top-label .wp-block-post-terms__separator ~ a {
  display: none;
}

.news-top-title {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.news-top-title a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-top-title a:hover {
  color: var(--color-voa-blue);
}

/* More From VOA — two-column text list */
.wp-block-query .wp-block-post-template.news-more-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 28px 40px;
  padding: 0;
  list-style: none;
}

.wp-block-query .wp-block-post-template.news-more-grid > li {
  width: 100% !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  text-align: left !important;
  padding: 8px 0;
}

.wp-block-query .wp-block-post-template.news-more-grid > li .wp-block-post-terms,
.wp-block-query .wp-block-post-template.news-more-grid > li .wp-block-post-title {
  text-align: left !important;
}

.news-more-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-voa-blue);
  margin: 0 0 4px;
  letter-spacing: 0.3px;
}

.news-more-label a {
  color: var(--color-voa-blue);
  text-decoration: none;
}

.news-more-label .wp-block-post-terms__separator,
.news-more-label .wp-block-post-terms__separator ~ a {
  display: none;
}

.news-more-title {
  margin: 0;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.55;
}

.news-more-title a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-more-title a:hover {
  color: var(--color-voa-blue);
}

/* From VOA's Language Services — blue sidebar */
.news-sidebar {
  background-color: #3a79b7;
  color: var(--color-white);
  padding: 22px;
}

.news-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.news-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-white);
  margin: 0;
}

.news-sidebar-arrow {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.news-sidebar-item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.news-sidebar-thumb {
  flex-shrink: 0;
  width: 70px;
  height: 50px;
  margin: 0;
}

.news-sidebar-thumb img {
  width: 70px;
  height: 50px;
  object-fit: cover;
}

.news-sidebar-item-meta {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 4px;
  letter-spacing: 0.3px;
}

.news-sidebar-item-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-white);
  margin: 0;
}

.news-sidebar-stats {
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin: 18px 0;
}

.news-sidebar-stats strong {
  color: var(--color-white);
}

.news-sidebar-button .wp-block-button__link {
  background-color: #133e7c;
  color: var(--color-white);
  border-radius: 0;
  border: none;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  width: 100%;
  text-align: center;
}

.news-sidebar-button .wp-block-button__link:hover {
  background-color: #0f2f5e;
  color: var(--color-white);
}

/* All About America */
.news-america-featured,
.news-america-featured.wp-block-post-featured-image {
  margin: 0;
  max-width: none;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.news-america-featured img,
.news-america-featured.wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-america-title {
  margin: 14px 0 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.35;
}

.news-america-title a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-america-title a:hover {
  color: var(--color-voa-blue);
}

.wp-block-query .wp-block-post-template.news-other-list {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 24px 32px;
  padding: 0;
  list-style: none;
}

.wp-block-query .wp-block-post-template.news-other-list > li {
  width: 100% !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  text-align: left !important;
  padding: 8px 0;
}

.wp-block-query .wp-block-post-template.news-other-list > li .wp-block-post-title {
  text-align: left !important;
}

.news-other-title {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

.news-other-title a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-other-title a:hover {
  color: var(--color-voa-blue);
}

/* Triple columns (VOA Explains / Special Reports / Worth Watching) */
.wp-block-query .wp-block-post-template.news-triple-query {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px;
  padding: 0;
  list-style: none;
}

.wp-block-query .wp-block-post-template.news-triple-query > li {
  width: 100% !important;
  margin: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.news-triple-query > li .news-triple-thumb,
.news-triple-query > li .wp-block-post-featured-image.news-triple-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 75px;
  margin: 0;
  overflow: hidden;
}

.news-triple-query > li .news-triple-thumb img,
.news-triple-query > li .wp-block-post-featured-image.news-triple-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-triple-title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.news-triple-title a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-triple-title a:hover {
  color: var(--color-voa-blue);
}

/* Video section */
.wp-block-query .wp-block-post-template.news-video-query {
  display: flex !important;
  flex-direction: row !important;
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 8px;
  list-style: none;
}

.wp-block-query .wp-block-post-template.news-video-query > li {
  width: 240px !important;
  flex-shrink: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.news-video-query > li .news-video-thumb,
.news-video-query > li .wp-block-post-featured-image.news-video-thumb {
  position: relative;
  width: 240px;
  height: 135px;
  margin: 0;
  overflow: hidden;
}

.news-video-query > li .news-video-thumb img,
.news-video-query > li .wp-block-post-featured-image.news-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-video-query > li .news-video-thumb::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 32px;
  height: 22px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
}

.news-video-query > li .news-video-thumb::before {
  content: "";
  position: absolute;
  left: 19px;
  bottom: 15px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent #ffffff;
  z-index: 1;
}

.news-video-title {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.news-video-title a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.news-video-title a:hover {
  color: var(--color-voa-blue);
}

/* News page responsive adjustments */
@media (max-width: 781px) {
  .wp-block-query .wp-block-post-template.news-more-grid,
  .wp-block-query .wp-block-post-template.news-other-list {
    grid-template-columns: 1fr !important;
  }

  .news-sidebar {
    margin-top: 32px;
  }

  .wp-block-query .wp-block-post-template.news-triple-query {
    flex-direction: column !important;
  }

  .wp-block-query .wp-block-post-template.news-video-query {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .news-featured-title {
    font-size: 22px;
  }
}

/* Header 样式 */
.site-header {
  position: relative;
  z-index: 100;
}

.header-top-bar {
  min-height: 38px;
}

.header-top-bar .wp-block-group {
  min-height: 38px;
}

.header-contrast-toggle {
  margin: 0;
}

.header-contrast-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-left: 6px;
}

.header-contrast-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.header-contrast-switch .slider {
  display: inline-flex;
  align-items: center;
  position: relative;
  width: 56px;
  height: 22px;
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 34px;
  transition: background-color 0.2s ease;
  padding: 0 6px;
}

.header-contrast-switch input:checked + .slider {
  background-color: rgba(255, 255, 255, 0.45);
}

.header-contrast-switch .circle {
  position: absolute;
  left: 3px;
  width: 16px;
  height: 16px;
  background-color: #7ed321;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.header-contrast-switch input:checked + .slider .circle {
  transform: translateX(34px);
}

.header-contrast-switch .label {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1;
}

.header-worldwide-dropdown {
  gap: 4px;
  color: var(--color-white);
}

.header-worldwide-select {
  background: transparent;
  border: 0;
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 700;
  appearance: none;
  padding-right: 1.25rem;
  padding-left: 0.25rem;
  cursor: pointer;
}

.header-worldwide-select option {
  color: var(--color-dark-text);
}

.header-main {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.075);
}

.site-header-logo {
  margin: 0;
}

.site-header-logo img {
  width: 120px;
  height: auto;
}

.header-search {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid var(--color-charcoal-grey);
  margin-right: 24px;
}

.header-search-input {
  width: 120px;
  border: 0;
  padding: 4px 8px;
  font-size: 0.875rem;
  color: var(--color-charcoal-grey);
  background: transparent;
  outline: none;
}

.header-search-input::placeholder {
  color: var(--color-charcoal-grey);
  opacity: 0.7;
}

.header-search-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23515356' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
}

/* Featured Insights cards — title and tags overlaid on image */
.featured-card-cover {
  min-height: 280px !important;
}

.featured-card-cover .wp-block-cover__image-background {
  object-fit: cover;
  object-position: center;
}

.featured-card-cover .wp-block-cover__background {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.4) 35%,
    transparent 65%
  ) !important;
  opacity: 1 !important;
}

.featured-card-cover .wp-block-cover__inner-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  padding: 16px;
}

.featured-card-content {
  margin-top: auto;
}

.featured-card-title {
  margin: 0;
}

.featured-card-title a {
  color: var(--color-white);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.3;
  text-decoration: underline;
}

.featured-card-title a:hover {
  text-decoration: none;
}

.featured-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 8px;
}

.featured-card-tags::before {
  content: "\25A0";
  color: var(--color-rsm-blue);
  font-size: 8px;
  line-height: 1;
  margin-right: 6px;
}

.featured-card-tags a {
  color: var(--color-white);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.featured-card-tags a:hover {
  text-decoration: underline;
}

.featured-card-tags .wp-block-post-terms__separator {
  color: var(--color-white);
  margin: 0 6px;
}

/* Query Loop featured cards layout — force 3 equal columns */
.wp-block-query .wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
  list-style: none;
}

.wp-block-query .wp-block-post-template > li {
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 781px) {
  .wp-block-query .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

/* Footer 辅助样式 */
.footer-tagline-image {
  margin: 0;
}

.footer-tagline-image img {
  width: 305px;
  height: auto;
}

.footer-services-row {
  border-top: 1px solid var(--color-mid-grey-border);
  border-bottom: 1px solid var(--color-mid-grey-border);
}

.site-footer a,
footer a,
.footer-services-row a {
  color: var(--color-charcoal-grey);
  text-decoration: none;
}

.site-footer a:hover,
footer a:hover,
.footer-services-row a:hover {
  text-decoration: underline;
}

/* 滚动动画 */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* prefers-reduced-motion：禁用所有动画 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-animate="fade-up"] {
    opacity: 1;
    transform: translateY(0);
  }
}
