/* ==========================================================================
   News & Events pages (news.html, news1.html, news2.html)
   Uses the same nav (css/nav.css) and footer (css/footer.css) as the home
   page. Adds: page hero with breadcrumb, article body, photo gallery,
   lightbox, previous/next story links and the news index cards.
   ========================================================================== */

.jt-subpage { background: #fff; color: #3a4250; }

/* The nav is always solid on sub-pages (no banner behind it) */
.jt-subpage #mainNav.jt-nav {
  background: rgba(13, 14, 31, 0.96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.25);
}
.jt-subpage .jt-nav-inner { height: 66px; }
.jt-subpage .jt-nav-brand img { width: 184px; }
@media (max-width: 991px) { .jt-subpage .jt-nav-brand img { width: 172px; } }

/* ---- Page hero -------------------------------------------------------- */
.jt-page-hero {
  position: relative;
  padding: 126px 15px 64px;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgba(33, 142, 205, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 70% at 0% 100%, rgba(237, 37, 36, 0.14), transparent 70%),
    #0D0E1F;
  color: rgba(255, 255, 255, 0.78);
  overflow: hidden;
}
.jt-page-hero .container { position: relative; }
.jt-page-hero h1 {
  max-width: 820px;
  margin: 14px 0 16px;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}
.jt-page-hero .jt-hero-sub {
  max-width: 680px;
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

/* Breadcrumb */
.jt-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}
.jt-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.jt-crumbs li + li::before { content: "/"; color: rgba(255, 255, 255, 0.35); }
.jt-crumbs a { color: rgba(255, 255, 255, 0.78); }
.jt-crumbs a:hover, .jt-crumbs a:focus { color: #fff; }
.jt-crumbs [aria-current] { color: #fff; font-weight: 600; }

/* Category chip + meta line */
.jt-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 14px;
}
.jt-meta span { display: inline-flex; align-items: center; gap: 7px; }
.jt-meta .fa { color: #ff6b6a; }
.jt-chip {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(237, 37, 36, 0.16);
  border: 1px solid rgba(255, 107, 106, 0.45);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb3b2;
}
.jt-meta + .jt-meta { margin-top: 18px; }

/* ---- Article body ----------------------------------------------------- */
.jt-article { padding: 64px 15px 24px; }
.jt-article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.jt-article-body p {
  margin: 0 0 18px;
  font-size: 17px;
  line-height: 1.8;
  color: #3a4250;
}
.jt-article-body p.jt-lead {
  font-size: 20px;
  line-height: 1.65;
  color: #0D0E1F;
}
.jt-article-body ul {
  margin: 0 0 18px;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.8;
}

/* "At a glance" box */
.jt-facts {
  position: sticky;
  top: 90px;
  padding: 24px 24px 8px;
  border: 1px solid rgba(1, 63, 91, 0.12);
  border-top: 3px solid #DB1F1E;
  border-radius: 6px;
  background: #f7f9fc;
}
.jt-facts h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0D0E1F;
}
.jt-facts dl { margin: 0; }
.jt-facts dt {
  font-size: 12.5px;
  font-weight: 600;
  color: #5f6876;
}
.jt-facts dd {
  margin: 2px 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: #0D0E1F;
}

/* ---- Gallery ---------------------------------------------------------- */
.jt-gallery-section { padding: 40px 15px 72px; scroll-margin-top: 50px; }
#main { scroll-margin-top: 66px; }
.jt-gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
}
.jt-gallery-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #0D0E1F;
}
.jt-gallery-head p { margin: 0; font-size: 14px; color: #5f6876; }

.jt-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.jt-gallery li:first-child { grid-column: span 2; grid-row: span 2; }
/* The last photo widens to fill the final row (js/news.js sets its span) */
.jt-gallery li.is-wide { grid-column: span var(--span, 2); }
/* Photo fills the tile without changing the row height */
.jt-gallery li.is-wide a { min-height: 120px; }
.jt-gallery li.is-wide img { position: absolute; inset: 0; aspect-ratio: auto; }
.jt-gallery a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: #e9edf3;
}
.jt-gallery img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Zoom icon on hover/focus */
.jt-gallery a::after {
  content: "\f00e";                     /* fa-search-plus */
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: FontAwesome;
  font-size: 26px;
  color: #fff;
  background: rgba(13, 14, 31, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.jt-gallery a:hover img, .jt-gallery a:focus-visible img { transform: scale(1.05); }
.jt-gallery a:hover::after, .jt-gallery a:focus-visible::after { opacity: 1; }
.jt-gallery a:focus-visible { outline: 3px solid #DB1F1E; outline-offset: 3px; }

/* ---- Lightbox (<dialog>) ---------------------------------------------- */
.jt-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 20, 0.96);
  color: #fff;
}
.jt-lightbox::backdrop { background: rgba(8, 9, 20, 0.9); }
.jt-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.jt-lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 160px);
  margin: 0;
}
.jt-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: 4px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.jt-lightbox figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}
.jt-lb-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.jt-lb-btn:hover, .jt-lb-btn:focus-visible { background: rgba(255, 255, 255, 0.2); border-color: #fff; }
.jt-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.jt-lb-prev { left: 24px; top: 50%; margin-top: -26px; }
.jt-lb-next { right: 24px; top: 50%; margin-top: -26px; }
.jt-lb-close { right: 24px; top: 24px; width: 44px; height: 44px; font-size: 18px; }
html.jt-lb-open { overflow: hidden; }

/* ---- Previous / next story -------------------------------------------- */
.jt-story-nav { padding: 0 15px 88px; }
.jt-story-nav h2 {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #DB1F1E;
}
.jt-story-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Story card (used on the news index and in the "more stories" row) */
.jt-story-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(1, 63, 91, 0.10);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}
.jt-story-card:hover, .jt-story-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(237, 37, 36, 0.35);
  box-shadow: 0 18px 40px -24px rgba(13, 14, 31, 0.45);
  color: inherit;
  text-decoration: none;
}
.jt-story-card:focus-visible { outline: 3px solid #DB1F1E; outline-offset: 3px; }
.jt-story-media { aspect-ratio: 16 / 9; overflow: hidden; background: #e9edf3; }
.jt-story-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.jt-story-card:hover .jt-story-media img { transform: scale(1.04); }
.jt-story-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 22px; }
.jt-story-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 8px;
  font-size: 13px;
  color: #5f6876;
}
.jt-story-kicker strong { color: #DB1F1E; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.jt-story-title { margin: 0 0 10px; font-size: 21px; font-weight: 700; line-height: 1.3; color: #0D0E1F; }
.jt-story-text { margin: 0 0 16px; font-size: 15px; line-height: 1.7; color: #5a6270; }
.jt-story-more { margin-top: auto; font-size: 14px; font-weight: 600; color: #013f5b; }
.jt-story-more::after { content: " \2192"; }
.jt-story-card:hover .jt-story-more { color: #DB1F1E; }

/* Small variant for prev/next */
.jt-story-card.is-compact { flex-direction: row; align-items: stretch; }
.jt-story-card.is-compact .jt-story-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 140px; }
.jt-story-card.is-compact .jt-story-title { font-size: 18px; }

/* Careers nudge next to the "more stories" card */
.jt-cta-card {
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(33, 142, 205, 0.25), transparent 70%),
    #0D0E1F;
  border-color: #0D0E1F;
}
.jt-cta-card .jt-story-body { justify-content: center; padding: 28px; }
.jt-cta-card .jt-story-kicker strong { color: #ff6b6a; }
.jt-cta-card .jt-story-title { color: #fff; }
.jt-cta-card .jt-story-more,
.jt-cta-card:hover .jt-story-more { color: #fff; }

/* ---- News index ------------------------------------------------------- */
.jt-news-index { padding: 64px 15px 96px; background: #f7f9fc; }
.jt-news-index .jt-story-links { gap: 28px; }
.jt-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #013f5b;
}
.jt-back:hover, .jt-back:focus { color: #DB1F1E; text-decoration: none; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 991px) {
  .jt-article-grid { grid-template-columns: 1fr; gap: 32px; }
  .jt-facts { position: static; }
  .jt-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 24px; }
  .jt-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .jt-page-hero { padding: 104px 15px 48px; }
  .jt-page-hero h1 { font-size: 32px; }
  .jt-page-hero .jt-hero-sub { font-size: 16px; }
  .jt-article { padding-top: 44px; }
  .jt-article-body p { font-size: 16px; }
  .jt-article-body p.jt-lead { font-size: 18px; }
  .jt-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .jt-story-links { grid-template-columns: 1fr; }
  .jt-lightbox figure { max-width: 100vw; padding: 0 8px; }
  .jt-lb-prev, .jt-lb-next { top: auto; bottom: 20px; margin-top: 0; }
  .jt-lb-prev { left: calc(50% - 64px); }
  .jt-lb-next { right: calc(50% - 64px); }
  .jt-lightbox img { max-height: calc(100vh - 170px); }
  .jt-lightbox figcaption { margin-bottom: 72px; }
}
@media (max-width: 479px) {
  .jt-story-card.is-compact { flex-direction: column; }
  .jt-story-card.is-compact .jt-story-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
}

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .jt-gallery img, .jt-gallery a::after, .jt-story-card, .jt-story-media img { transition: none; }
  .jt-gallery a:hover img, .jt-story-card:hover, .jt-story-card:hover .jt-story-media img { transform: none; }
}

/* ---- Pages served from the admin database (news.php, story.php) ------- */
.jt-draft-bar {
  position: relative;
  z-index: 5;
  margin-top: 66px;
  padding: 10px 15px;
  background: #fff4d6;
  border-bottom: 1px solid #f0d58a;
  color: #6b4e00;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.jt-draft-bar + article .jt-page-hero { padding-top: 60px; }
.jt-story-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  font-size: 34px;
  color: #b4bcc8;
}
.jt-empty { margin: 0; padding: 40px 0; text-align: center; font-size: 16px; color: #5f6876; }
.jt-page-hero .jt-back { color: #fff; }
