/* Category-only presentation; preserve homepage components and editorial data. */
/* Equal hit areas and line boxes for numbers and RTL navigation arrows. */
.ph-category-page .ph-pagination .nav-links { align-items: center; }
.ph-category-page .ph-pagination .nav-links > .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-width: 44px; height: 44px; margin: 0; padding: 0 10px;
  flex: 0 0 auto; font-size: 14px; line-height: 1; vertical-align: middle;
  transform: none; transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.ph-category-page .ph-pagination .nav-links > :is(.prev,.next) { width: 44px; padding: 0; }
.ph-category-page .ph-pagination .nav-links > .page-numbers:is(:hover,:focus-visible) { transform: none; }
.ph-category-page .ph-pagination :is(.prev,.next) svg { display: block; flex: none; width: 20px; height: 20px; }
/* GeneratePress adds lateral main margins on small screens to an already full-width template. */
@media (max-width: 1023px) {
  body.category .site-main.ph-category-page { margin-inline: 0; }
}
.ph-channel { margin: 0 0 22px; min-width: 0; color: var(--ph-color-text-primary); }
.ph-channel a { color: inherit; text-decoration: none; }
.ph-channel a:focus-visible { outline: 2px solid var(--ph-color-news-blue); outline-offset: 3px; }
.ph-channel__masthead { margin: 0 0 14px; padding: 0; }
.ph-channel h1 { margin: 0; color: var(--ph-color-text-primary); font-size: clamp(22px, 2vw, 28px); font-weight: 850; line-height: 1.55; }
.ph-channel__top { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.ph-channel__top--single { grid-template-columns: minmax(0, 1fr); }
.ph-channel__lead { min-width: 0; align-self: start; }
.ph-channel__lead-link { display: block; position: relative; isolation: isolate; border-radius: 10px; overflow: hidden; background: var(--ph-color-authority-navy); }
.ph-channel__lead-media { aspect-ratio: 16 / 9; }
.ph-channel__lead-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-channel__placeholder { display: grid; place-items: center; height: 100%; color: #7caccb; background: #123e68; }
.ph-channel__placeholder svg { width: 64px; height: 64px; }
.ph-channel__lead-copy { position: absolute; inset: auto 0 0; padding: 64px 18px 18px; background: linear-gradient(transparent, rgba(4,16,31,.96)); color: #fff; }
.ph-channel__lead-copy h3 { color: #fff; margin: 5px 0 0; font-size: clamp(17px, 1.5vw, 22px); font-weight: 800; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ph-channel__lead-date { display: block; font-size: 11px; color: #e0e7ef; }
.ph-channel__top--single .ph-channel__lead-link { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); background: var(--ph-color-surface); border: 1px solid var(--ph-color-border); }
.ph-channel__top--single .ph-channel__lead-copy { position: static; padding: 20px; background: none; display: flex; flex-direction: column; justify-content: center; }
.ph-channel__top--single .ph-channel__lead-copy h3 { color: var(--ph-color-text-primary); display: block; }
.ph-channel__top--single .ph-channel__lead-date { color: var(--ph-color-text-secondary); }
.ph-channel__single-excerpt { margin: 8px 0 0; color: var(--ph-color-text-secondary); font-size: 12px; line-height: 1.9; }
.ph-channel__top--single .ph-channel__lead-link:hover h3 { color: var(--ph-color-news-blue); }
.ph-channel__rail { display: grid; grid-auto-rows: minmax(0,1fr); min-width: 0; contain: size; border-block: 1px solid var(--ph-color-border); }
.ph-channel__story { min-width: 0; border-bottom: 1px solid var(--ph-color-border); }
.ph-channel__story:last-child { border-bottom: 0; }
.ph-channel__story-link { display: grid; grid-template-columns: clamp(96px, 10vw, 144px) minmax(0,1fr); gap: 12px; height: 100%; min-height: 44px; align-items: center; padding-block: 10px; }
.ph-channel__thumb { display: grid; place-items: center; width: 100%; height: 100%; max-height: 92px; overflow: hidden; border-radius: 6px; background: var(--ph-color-surface-soft); color: var(--ph-color-text-secondary); }
.ph-channel__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-channel__thumb svg { width: 30px; height: 30px; }
.ph-channel__story-copy { min-width: 0; }
.ph-channel__story-copy h3 { margin: 0 0 5px; font-size: 14px; font-weight: 750; line-height: 1.7; color: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-channel__story-copy p { margin: 0 0 5px; font-size: 11px; line-height: 1.7; color: var(--ph-color-text-secondary); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ph-channel__date { display: block; font-size: 10px; line-height: 1.5; color: var(--ph-color-text-secondary); }
.ph-channel__briefs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 14px; padding: 12px 0; border-block: 1px solid var(--ph-color-border); }
.ph-channel__brief { min-width: 0; padding-inline: 14px; border-inline-end: 1px solid var(--ph-color-border); }
.ph-channel__brief:first-child { padding-inline-start: 0; }
.ph-channel__brief:last-child { padding-inline-end: 0; border-inline-end: 0; }
.ph-channel__brief a { display: flex; gap: 10px; min-height: 64px; align-items: flex-start; }
.ph-channel__brief a > div { min-width: 0; }
.ph-channel__brief-mark { flex: 0 0 5px; height: 5px; margin-top: 10px; border-radius: 50%; background: var(--ph-color-news-blue); }
.ph-channel__brief h3 { margin: 0 0 6px; color: inherit; font-size: 13px; font-weight: 700; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-channel a:hover { color: var(--ph-color-news-blue); }
.ph-channel__lead-link:hover h3 { color: #a8dbff; }
.ph-channel-archive-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; scroll-margin-top: 24px; }
.ph-channel-archive-head h2 { margin: 0; font-size: 20px; color: var(--ph-color-text-primary); }
.ph-channel-archive-head span { color: var(--ph-color-text-secondary); font-size: 11px; }
/* Older shared rules use fixed light-theme ink tokens and !important colors.
   Rebind them inside category pages only, including hover and keyboard focus. */
[data-theme="dark"] .ph-category-page {
  --ph-title-color: var(--ph-color-text-primary);
  --ph-link-color: var(--ph-color-text-primary);
  --ph-body-color: var(--ph-color-text-primary);
  --ph-link-hover: var(--ph-color-news-blue);
  --ph-control-hover-color: var(--ph-color-news-blue);
}
[data-theme="dark"] .ph-category-page .ph-side-card {
  background: var(--ph-color-surface);
  border-color: var(--ph-color-border);
  box-shadow: var(--ph-shadow-md);
}
[data-theme="dark"] .ph-category-page .ph-side-card .ph-compact-item strong {
  color: var(--ph-color-text-primary) !important;
}
[data-theme="dark"] .ph-category-page .ph-side-card .ph-compact-item:is(:hover,:focus-visible) strong {
  color: var(--ph-color-news-blue) !important;
}
[data-theme="dark"] .ph-category-page .ph-pagination .page-numbers {
  color: var(--ph-color-text-primary) !important;
}
[data-theme="dark"] .ph-category-page :is(.ph-card__title a:focus-visible,.ph-compact-item:focus-visible strong,.ph-pagination a:is(:hover,:focus-visible)) {
  color: var(--ph-color-news-blue) !important;
}
[data-theme="dark"] .ph-category-page .ph-pagination .page-numbers.current {
  color: var(--ph-color-authority-navy) !important;
}
/* Keep category badge hues, with readable ink on each bright/dark fill. */
[data-theme="dark"] .ph-category-page .ph-card .ph-badge {
  --ph-category-badge-ink: #fff;
  color: var(--ph-category-badge-ink) !important;
}
[data-theme="dark"] .ph-category-page .ph-card :is(.ph-badge--rail,.ph-badge--maritime,.ph-badge--aviation,.ph-badge--economy,.ph-badge--breaking) {
  --ph-category-badge-ink: var(--ph-color-authority-navy);
}
@media (min-width: 900px) and (max-width: 1199px) {
  .ph-channel__story-link { gap: 10px; padding-block: 6px; grid-template-columns: 96px minmax(0,1fr); }
  .ph-channel__story-copy h3 { font-size: 12px; margin-bottom: 3px; line-height: 1.6; }
  .ph-channel__story-copy p { display: none; }
  .ph-channel__thumb { max-height: 70px; }
}
@media (max-width: 899px) {
  .ph-channel__top { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .ph-channel__rail { contain: none; grid-auto-rows: auto; }
  .ph-channel__story-link { grid-template-columns: 116px minmax(0,1fr); min-height: 90px; padding-block: 8px; }
  .ph-channel__thumb { height: 76px; }
  .ph-channel__lead-copy h3 { font-size: 22px; }
}
@media (max-width: 599px) {
  .ph-channel__top--single .ph-channel__lead-link { grid-template-columns: minmax(0,1fr); }
  .ph-channel__top--single .ph-channel__lead-copy { padding: 14px; }
  .ph-channel__lead-copy { padding: 48px 12px 12px; }
  .ph-channel__lead-copy h3 { font-size: clamp(14px, 4vw, 18px); line-height: 1.65; }
  .ph-channel__lead-date { font-size: 10px; }
  .ph-channel__story-link { grid-template-columns: 88px minmax(0,1fr); gap: 10px; min-height: 78px; }
  .ph-channel__thumb { height: 60px; }
  .ph-channel__story-copy h3 { font-size: 12px; }
  .ph-channel__story-copy p { display: none; }
  .ph-channel__briefs { grid-template-columns: minmax(0,1fr); gap: 0; padding: 0; margin-top: 0; border-top: 0; }
  .ph-channel__brief { padding: 10px 0; border-inline-end: 0; border-bottom: 1px solid var(--ph-color-border); }
  .ph-channel__brief:last-child { border-bottom: 0; }
  .ph-channel__brief a { min-height: 54px; }
  .ph-channel__brief h3 { font-size: 12px; }
}

/* Landscape photos: image content cannot dictate or stretch the frame height. */
.ph-category-page .ph-channel__thumb,
.ph-category-page .ph-category-grid .ph-card__media {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  flex: none;
  align-self: center;
}
.ph-category-page :is(.ph-channel__thumb, .ph-category-grid .ph-card__media) > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Full artwork, including lettering and logos, stays visible in every news frame.
   These selectors intentionally exclude banners and shared header/footer logos. */
.ph-category-page .ph-channel__lead-media {
  position: relative;
  min-width: 0;
  align-self: center;
  overflow: hidden;
}
.ph-category-page :is(.ph-channel__lead-media,.ph-channel__thumb,.ph-card__media) {
  background: var(--ph-color-surface-soft);
}
.ph-category-page .ph-channel__lead-media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ph-category-page .ph-category-grid .ph-card .ph-card__media > img,
.ph-category-page .ph-category-grid .ph-card:hover .ph-card__media > img {
  object-fit: contain;
  transform: none;
}
/* Keep the lead headline compact, but never overprint the image itself. */
.ph-category-page .ph-channel__lead-link {
  background: var(--ph-color-surface);
  border: 1px solid var(--ph-color-border);
}
.ph-category-page .ph-channel__lead-copy {
  position: static;
  padding: 10px 12px;
  background: none;
  color: var(--ph-color-text-primary);
}
.ph-category-page .ph-channel__lead-copy h3 { color: var(--ph-color-text-primary); margin-top: 4px; }
.ph-category-page .ph-channel__lead-date { color: var(--ph-color-text-secondary); }
.ph-category-page .ph-channel__lead-link:hover h3 { color: var(--ph-color-news-blue); }

/* The legacy three-column !important rule used to defeat both breakpoints.
   Keep the override local; changing this variable now controls every size. */
.ph-category-page .ph-category-main .ph-category-grid {
  --ph-category-columns: 3;
  grid-template-columns: repeat(var(--ph-category-columns), minmax(0, 1fr)) !important;
}
.ph-category-page .ph-category-grid :is(.ph-card, .ph-card__body) { min-width: 0; }
.ph-category-page .ph-category-grid .ph-card__title { overflow-wrap: anywhere; }
@media (max-width: 1279px) {
  .ph-category-page .ph-category-main .ph-category-grid { --ph-category-columns: 2; }
}
@media (max-width: 599px) {
  .ph-category-page .ph-category-main .ph-category-grid {
    --ph-category-columns: 1;
    gap: 10px;
    margin-bottom: 20px;
  }
  .ph-category-page .ph-category-grid .ph-card {
    display: grid;
    grid-template-columns: clamp(88px, 26vw, 120px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    height: auto;
    padding: 10px;
    border-radius: 10px;
  }
  .ph-category-page .ph-category-grid .ph-card__media {
    border: 0;
    border-radius: 6px;
  }
  .ph-category-page .ph-category-grid .ph-card__body { padding: 0; }
  .ph-category-page .ph-category-grid .ph-card__title {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.7;
  }
  .ph-category-page .ph-category-grid .ph-card__excerpt { display: none; }
  .ph-category-page .ph-category-grid .ph-card .ph-meta {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 10px;
    line-height: 1.7;
  }
  .ph-category-page .ph-category-grid .ph-badge {
    max-width: 100%;
    white-space: normal;
    font-size: 10px;
    line-height: 1.6;
    padding: 2px 6px;
  }
  .ph-category-page .ph-category-grid .ph-card__media--no-image::before { inset: 6px; border-radius: 5px; }
  .ph-category-page .ph-category-grid .ph-card__media--no-image span {
    max-width: calc(100% - 12px);
    min-height: 0;
    padding: 3px 5px;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
  }
}
