/* Terras365 News Centre final presentation patch v4.13.82 */

/* Hero title and subtitle: ensure clear contrast regardless of page body classes. */
body [class*="news-hero"] h1,
body [class*="news-hero"] h2,
body .news-centre-hero h1,
body .news-centre-hero h2,
body .wfc-news-hero h1,
body .wfc-news-hero h2,
body .wfc-news-hero .title,
body .news-centre-hero .title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}
body [class*="news-hero"] p,
body .news-centre-hero p,
body .wfc-news-hero p {
  color: rgba(255,255,255,.96) !important;
}
body [class*="news-hero"],
body .news-centre-hero,
body .wfc-news-hero {
  padding-top: clamp(38px, 6vw, 72px) !important;
  padding-bottom: clamp(38px, 6vw, 72px) !important;
}

/* Featured image: shorter on mobile and keep the subject's face in view. */
body [class*="featured"] img,
body [class*="news-feature"] img,
body .wfc-news-featured img {
  width: 100%;
  aspect-ratio: 16 / 8.4;
  max-height: 520px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Swipeable categories without a visible scrollbar. */
body [class*="filter"],
body [class*="category-chips"],
body [class*="news-tabs"] {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body [class*="filter"]::-webkit-scrollbar,
body [class*="category-chips"]::-webkit-scrollbar,
body [class*="news-tabs"]::-webkit-scrollbar { display: none; }
body [class*="filter"] .active,
body [class*="category-chips"] .active,
body [class*="news-tabs"] .active,
body [class*="filter"] [aria-selected="true"],
body [class*="category-chips"] [aria-selected="true"],
body [class*="news-tabs"] [aria-selected="true"] {
  font-weight: 800 !important;
}

/* Search control uses the available width. */
body input[type="search"].wfc-news-search,
body [class*="news-search"] input,
body .news-centre input[type="search"] {
  width: 100% !important;
  max-width: none !important;
  min-height: 52px;
  box-sizing: border-box;
}

/* Equal-height cards and restrained excerpts. */
body [class*="news-grid"],
body .wfc-news-grid { align-items: stretch; }
body .wfc-news-card,
body [class*="news-card"],
body article.type-post {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease;
}
body .wfc-news-card:hover,
body [class*="news-card"]:hover,
body article.type-post:hover {
  transform: translateY(-2px);
}
body .wfc-news-card:active,
body [class*="news-card"]:active,
body article.type-post:active {
  transform: scale(.992);
}
body .wfc-news-card img,
body [class*="news-card"] img,
body article.type-post img.wp-post-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}
body .wfc-news-card__excerpt,
body .wfc-news-card-excerpt,
body [class*="news-card"] .entry-summary,
body [class*="news-card"] .excerpt,
body article.type-post .entry-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
body .wfc-news-card a[class*="read"],
body [class*="news-card"] a[class*="read"],
body article.type-post a.more-link { margin-top: auto; }

@media (max-width: 767px) {
  body [class*="news-grid"], body .wfc-news-grid { grid-template-columns: 1fr !important; }
  body [class*="news-hero"], body .news-centre-hero, body .wfc-news-hero { border-radius: 24px !important; }
  body [class*="featured"] img,
  body [class*="news-feature"] img,
  body .wfc-news-featured img {
    aspect-ratio: 16 / 8;
    max-height: 330px;
    object-position: center top;
  }
}


/* v4.13.81 — final UI alignment and mobile finishing pass. */

/* Give the featured story breathing room before the category controls. */
body .wfc-news-featured,
body [class*="news-featured"],
body [class*="featured-story"],
body [class*="news-feature"] {
  margin-bottom: clamp(26px, 3.2vw, 38px) !important;
}

/* Lift the featured crop slightly while retaining the player's face and shirt. */
body [class*="featured"] img,
body [class*="news-feature"] img,
body .wfc-news-featured img {
  object-position: center 10% !important;
}

/* Compact and align the featured badge. */
body .wfc-news-featured [class*="badge"],
body [class*="featured"] [class*="badge"],
body [class*="featured-story"] [class*="label"],
body [class*="featured"] .tag,
body [class*="featured"] .category {
  display: inline-flex !important;
  align-items: center;
  min-height: 36px;
  padding: 7px 14px !important;
  font-size: .9rem !important;
  line-height: 1.15 !important;
  border-radius: 8px !important;
  vertical-align: middle;
}

/* Full-width search with an integrated search glyph. */
body .terras365-news-search-wrap {
  position: relative;
  width: 100%;
  max-width: none;
  margin-top: 18px;
  margin-bottom: 28px;
}
body .terras365-news-search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: #6b173b;
  font-size: 25px;
  line-height: 1;
  pointer-events: none;
}
body .terras365-news-search-wrap input[type="search"] {
  width: 100% !important;
  max-width: none !important;
  min-height: 54px !important;
  padding: 12px 18px 12px 52px !important;
  border-radius: 12px !important;
  box-sizing: border-box;
}

/* Keep every card internally aligned and give the action a consistent landing area. */
body .wfc-news-card,
body [class*="news-card"],
body article.type-post {
  min-height: 100%;
  overflow: hidden;
}
body .wfc-news-card > :last-child,
body [class*="news-card"] > :last-child,
body article.type-post > :last-child {
  margin-bottom: 0;
}
body .wfc-news-card__content,
body .wfc-news-card-content,
body [class*="news-card"] .entry-content,
body [class*="news-card"] [class*="content"],
body article.type-post .entry-content,
body article.type-post .entry-summary {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding-bottom: 26px !important;
}
body .wfc-news-card a[class*="read"],
body [class*="news-card"] a[class*="read"],
body article.type-post a.more-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto !important;
  padding-top: 18px;
}

@media (max-width: 767px) {
  body [class*="featured"] img,
  body [class*="news-feature"] img,
  body .wfc-news-featured img {
    object-position: center 8% !important;
  }
  body .wfc-news-featured,
  body [class*="news-featured"],
  body [class*="featured-story"],
  body [class*="news-feature"] {
    margin-bottom: 30px !important;
  }
  body .terras365-news-search-wrap {
    margin-top: 16px;
    margin-bottom: 24px;
  }
  body .wfc-news-card__content,
  body .wfc-news-card-content,
  body [class*="news-card"] .entry-content,
  body [class*="news-card"] [class*="content"],
  body article.type-post .entry-content,
  body article.type-post .entry-summary {
    padding-bottom: 24px !important;
  }
}


/* v4.13.82 — restore the preferred two-across archive layout. */
@media (min-width: 768px) {
  body .wfc-news-grid,
  body [class*="news-grid"],
  body .news-centre-grid,
  body [data-news-grid] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: clamp(24px, 3vw, 34px) !important;
    align-items: stretch !important;
  }

  body .wfc-news-grid > *,
  body [class*="news-grid"] > *,
  body .news-centre-grid > *,
  body [data-news-grid] > * {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
  }
}

@media (max-width: 767px) {
  body .wfc-news-grid,
  body [class*="news-grid"],
  body .news-centre-grid,
  body [data-news-grid] {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 22px !important;
  }
}

/* Keep archive cards neat even when legacy posts have very long source content. */
body .wfc-news-card__excerpt,
body .wfc-news-card-excerpt,
body [class*="news-card"] .entry-summary,
body [class*="news-card"] .excerpt,
body article.type-post .entry-summary {
  -webkit-line-clamp: 3 !important;
  max-height: 4.8em;
}

/* Tighten the featured story metadata-to-title spacing. */
body .wfc-news-featured [class*="date"],
body [class*="featured-story"] [class*="date"],
body [class*="news-feature"] [class*="date"] {
  margin-bottom: 18px !important;
}

/* v4.13.83 — final spacing, sticky filters and tablet optimisation. */

/* Remove the oversized theme gap above the News Centre hero. */
body .news-centre,
body .wfc-news-centre,
body [data-news-centre] {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body .news-centre > :first-child,
body .wfc-news-centre > :first-child,
body [data-news-centre] > :first-child,
body .news-centre-hero,
body .wfc-news-hero,
body [class*="news-hero"] {
  margin-top: clamp(18px, 2.4vw, 30px) !important;
}

/* Filters become a compact sticky navigation strip while browsing stories. */
body .terras365-news-filter-bar {
  position: sticky !important;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 40;
  display: flex !important;
  gap: 10px;
  overflow-x: auto;
  width: 100%;
  padding: 10px 0 12px;
  margin: 0 0 14px !important;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(11,34,59,.06);
  scrollbar-width: none;
}
body .terras365-news-filter-bar::-webkit-scrollbar { display: none; }
body .terras365-news-filter-bar > * { flex: 0 0 auto; }

/* Pull controls closer to the featured story. */
body .wfc-news-featured,
body [class*="news-featured"],
body [class*="featured-story"],
body [class*="news-feature"] {
  margin-bottom: clamp(18px, 2.2vw, 26px) !important;
}
body .terras365-news-search-wrap {
  margin-top: 12px !important;
  margin-bottom: 24px !important;
}

/* A slightly shorter featured crop on tablets brings the headline into view sooner. */
@media (min-width: 768px) and (max-width: 1180px) {
  body [class*="featured"] img,
  body [class*="news-feature"] img,
  body .wfc-news-featured img {
    aspect-ratio: 16 / 7.25 !important;
    max-height: 410px !important;
    object-position: center 12% !important;
  }
}

/* Preserve the preferred two-wide archive on tablets and desktop. */
@media (min-width: 768px) {
  body .wfc-news-grid,
  body [class*="news-grid"],
  body .news-centre-grid,
  body [data-news-grid] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Refined interaction feedback for mouse and touch users. */
@media (hover: hover) {
  body .wfc-news-card:hover,
  body [class*="news-card"]:hover,
  body article.type-post:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 18px 36px rgba(11,34,59,.13) !important;
  }
}
body .wfc-news-card,
body [class*="news-card"],
body article.type-post {
  transition: transform .18s ease, box-shadow .18s ease !important;
}

@media (max-width: 767px) {
  body .terras365-news-filter-bar {
    top: var(--wp-admin--admin-bar--height, 0px);
    margin-left: -4px !important;
    padding-left: 4px;
    padding-right: 4px;
  }
  body .news-centre-hero,
  body .wfc-news-hero,
  body [class*="news-hero"] {
    margin-top: 18px !important;
  }
}

/* v4.13.85 — final featured-story spacing refinement. */
/* Bring the badge and metadata closer to the image without affecting archive cards. */
body .wfc-news-featured > img + *,
body [class*="news-featured"] > img + *,
body [class*="featured-story"] > img + *,
body [class*="news-feature"] > img + * {
  padding-top: clamp(20px, 2.4vw, 30px) !important;
}

/* Keep the overall featured card compact so filters appear sooner on tablets. */
@media (min-width: 768px) and (max-width: 1180px) {
  body [class*="featured"] img,
  body [class*="news-feature"] img,
  body .wfc-news-featured img {
    aspect-ratio: 16 / 6.9 !important;
    max-height: 385px !important;
  }

  body .wfc-news-featured,
  body [class*="news-featured"],
  body [class*="featured-story"],
  body [class*="news-feature"] {
    margin-bottom: 16px !important;
  }

  body .wfc-news-featured > img + *,
  body [class*="news-featured"] > img + *,
  body [class*="featured-story"] > img + *,
  body [class*="news-feature"] > img + * {
    padding-top: 20px !important;
    padding-bottom: 26px !important;
  }
}

/* Homepage News Centre integration */
.t365-home-news{max-width:1200px;margin:0 auto;padding:32px 20px;font-family:inherit;color:#152942}
.t365-home-news *{box-sizing:border-box}
.t365-home-news__heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}
.t365-home-news__eyebrow{display:block;color:#7a103f;font-size:13px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;margin-bottom:7px}
.t365-home-news__heading h2{margin:0;font-size:clamp(32px,5vw,54px);line-height:1;color:#152942}
.t365-home-news__all{color:#7a103f;font-weight:800;text-decoration:none;white-space:nowrap}
.t365-home-news__featured{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.85fr);overflow:hidden;background:#fff;border:1px solid #e0e5ea;border-radius:24px;box-shadow:0 14px 35px rgba(21,41,66,.08);margin-bottom:28px}
.t365-home-news__featured-media{display:block;min-height:390px;background:#eef2f5;overflow:hidden}
.t365-home-news__featured-media img,.t365-home-news__card-media img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.t365-home-news__featured:hover img,.t365-home-news__card:hover img{transform:scale(1.025)}
.t365-home-news__featured-copy{padding:38px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.t365-home-news__badge{background:#ffdd00;color:#241b00;border-radius:8px;padding:8px 12px;font-weight:800;margin-bottom:16px}
.t365-home-news time{color:#7a103f;font-weight:700}
.t365-home-news__featured h3{font-size:clamp(29px,3vw,46px);line-height:1.08;margin:16px 0 14px}
.t365-home-news h3 a{color:#152942;text-decoration:none}
.t365-home-news__featured p{color:#637080;font-size:17px;line-height:1.6;margin:0 0 22px}
.t365-home-news__button{display:inline-flex;background:#7a103f;color:#fff!important;border-radius:999px;padding:13px 22px;font-weight:800;text-decoration:none}
.t365-home-news__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.t365-home-news__card{background:#fff;border:1px solid #e0e5ea;border-radius:20px;overflow:hidden;box-shadow:0 10px 26px rgba(21,41,66,.06)}
.t365-home-news__card-link{display:block;height:100%;color:inherit;text-decoration:none}
.t365-home-news__card-media{height:220px;background:#eef2f5;overflow:hidden}
.t365-home-news__placeholder{display:block;width:100%;height:100%;background:linear-gradient(135deg,#7a103f,#93c5ee)}
.t365-home-news__card-copy{padding:22px}
.t365-home-news__meta{display:flex;justify-content:space-between;gap:12px;color:#7a103f;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
.t365-home-news__card h3{font-size:24px;line-height:1.2;margin:20px 0 28px;color:#152942}
.t365-home-news__read{color:#7a103f;font-weight:800}
@media(max-width:900px){.t365-home-news__featured{grid-template-columns:1fr}.t365-home-news__featured-media{min-height:320px}.t365-home-news__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.t365-home-news{padding:24px 16px}.t365-home-news__heading{align-items:flex-start;flex-direction:column}.t365-home-news__featured-media{min-height:250px}.t365-home-news__featured-copy{padding:26px}.t365-home-news__grid{grid-template-columns:1fr}.t365-home-news__card-media{height:230px}}

/* v4.13.88 — final news polish. */
body .terras365-news-search-wrap{max-width:620px!important}
body .wfc-news-card img,body [class*="news-card"] img,body article.type-post img.wp-post-image{aspect-ratio:16/9!important}
@media (hover:hover) and (min-width:768px){
  body .wfc-news-card img,body [class*="news-card"] img,body article.type-post img.wp-post-image{transition:transform .22s ease!important}
  body .wfc-news-card:hover img,body [class*="news-card"]:hover img,body article.type-post:hover img{transform:scale(1.03)!important}
}
body .t365-news-clickable{cursor:pointer}
body .t365-news-clickable:focus-visible{outline:3px solid #7a103f;outline-offset:4px}
body .t365-news-reading-time{margin-left:10px;color:#6d7784;font-size:.82em;font-weight:700;white-space:nowrap}
.t365-home-news__date-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.t365-home-news__date-line span{color:#6d7784;font-size:.9rem;font-weight:700}
.t365-home-news__date-meta{display:flex;align-items:flex-end;flex-direction:column;gap:3px}
.t365-home-news__date-meta small{color:#6d7784;font-size:11px;font-weight:700;text-transform:none;letter-spacing:0}
.t365-home-news__card-media{height:198px}
@media(max-width:640px){.t365-home-news__card-media{height:207px}.terras365-news-search-wrap{max-width:none!important}}


/* v4.13.89 — compact metadata and card spacing repair. */
body .terras365-news-search-wrap{width:100%!important;max-width:560px!important}
.t365-home-news__featured-media{min-height:359px}
.t365-home-news__featured-copy{padding:32px 36px}
.t365-home-news__date-line{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;color:#7a103f;font-weight:700}
.t365-home-news__date-line span{font-size:.9rem}
.t365-home-news__date-meta{display:contents}
.t365-home-news__card-copy{padding:20px 22px 18px}
.t365-home-news__card h3{margin:14px 0 16px}
.t365-home-news__meta{align-items:center}
.t365-home-news__card-date{color:#6d7784!important;font-size:11px;font-weight:700;text-transform:none;letter-spacing:0;white-space:nowrap}
.t365-home-news__read{display:inline-block;margin-top:0}
@media(max-width:900px){.t365-home-news__featured-media{min-height:294px}}
@media(max-width:640px){
  body .terras365-news-search-wrap{max-width:none!important}
  .t365-home-news__featured-media{min-height:230px}
  .t365-home-news__featured-copy{padding:24px}
  .t365-home-news__card-copy{padding:18px 20px 16px}
  .t365-home-news__card h3{margin:12px 0 14px}
  .t365-home-news__meta{gap:8px}
  .t365-home-news__card-date{font-size:10px}
}
