:root {
  --blue: #102f8a;
  --blue-deep: #0b1f5c;
  --navy: #04094f;
  --red: #ed1b24;
  --red-deep: #be1719;
  --ink: #2c2c32;
  --muted: #6e6c6c;
  --line: #e6e7ee;
  --paper: #ffffff;
  --soft: #f5f6fa;
  --shadow: 0 10px 28px rgba(16, 47, 138, 0.08);
  --header: 86px;
  --content: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
button, input { font: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--red);
  color: #fff;
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.post-nav .next { grid-column: 2; }
.post-nav > span:empty { display: none; }

.container {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16, 47, 138, 0.04);
}
.site-header .container { width: min(1280px, calc(100% - 32px)); }
.site-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 72%, var(--red) 72% 100%);
}
.header-inner {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { height: 46px; width: auto; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--blue);
}
.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  color: #3a3a40;
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
}
.site-nav > ul > li > a:hover,
.site-nav > ul > li > a.is-active { color: var(--blue); }
.site-nav > ul > li > a.is-active { box-shadow: inset 0 -2px 0 var(--red); }
.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
}
.has-menu { position: relative; }
.submenu {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  min-width: 230px;
  background: #fff;
  border-top: 3px solid var(--red);
  box-shadow: 0 16px 36px rgba(4, 9, 79, 0.14);
  padding: 8px 0;
  z-index: 30;
}
.submenu a {
  display: block;
  padding: 9px 18px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.submenu a:hover { background: var(--soft); color: var(--blue); }
.has-menu:hover > .submenu,
.has-menu:focus-within > .submenu { display: block; }

/* Listing hero */
.listing-hero {
  height: 288px;
  overflow: hidden;
  background: #efe8df;
}
.listing-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left bottom;
}
.crumb-bar { background: #fff; border-bottom: 1px solid var(--line); }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 14px 0;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
}
.crumbs a { color: var(--blue); }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current="page"] { color: var(--red); font-weight: 700; }

/* Cards */
.listing { padding: 54px 0 72px; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
}
.post-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  background: #fff;
  min-height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--soft);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 2px;
  line-height: 1;
}
.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 4px 16px;
}
.post-card h2,
.post-card h3 {
  margin: 0 0 10px;
  min-height: calc(1.35em * 3);
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  color: #1b1b1f;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card:hover h2,
.post-card:hover h3 { color: var(--blue); }
.card-body p {
  margin: 0;
  min-height: calc(1.55em * 3);
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.read-more {
  align-self: flex-start;
  margin-top: 16px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  border-radius: 2px;
}
.post-card:hover .read-more { background: var(--blue); }

/* Article hero */
.page-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--navy) center / cover no-repeat;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 9, 79, 0.88) 0%, rgba(16, 47, 138, 0.72) 58%, rgba(16, 47, 138, 0.45) 100%);
}
.page-hero .container { position: relative; z-index: 1; padding: 72px 0 48px; }
.page-hero h1 {
  margin: 0 0 16px;
  max-width: 920px;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: clamp(1.7rem, 3.1vw, 2.55rem);
  line-height: 1.25;
  font-weight: 700;
}
.page-hero .crumbs { padding: 0; color: rgba(255, 255, 255, 0.86); }
.page-hero .crumbs a { color: #fff; }
.page-hero .crumbs a:hover { color: #ffd0d2; }
.page-hero .crumbs [aria-current="page"] { color: #fff; font-weight: 600; }

.article-wrap { padding: 42px 0 20px; }
.article-layout { max-width: 860px; }
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.share-row h2 {
  margin: 0;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  color: #1b1b1f;
}
.share-links { display: flex; align-items: center; gap: 8px; }
.share-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.share-btn:hover { background: var(--red); }
.share-links a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  border-radius: 3px;
}
.share-links a:hover { background: var(--red); }

.prose h2 {
  margin: 1.6em 0 0.45em;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--blue);
}
.prose h3 {
  margin: 1.2em 0 0.35em;
  font-size: 1.12rem;
  color: var(--navy);
}
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.2em; }
.prose li { margin: 0.28em 0; }
.prose li::marker { color: var(--red); }
.prose strong { color: #1b1b1f; }
.lead { font-size: 1.08rem; }

.figure {
  margin: 0 0 28px;
  background: var(--soft);
  border-top: 4px solid var(--red);
}
.figure img { width: 100%; height: auto; }
.figure figcaption {
  padding: 8px 12px 10px;
  color: var(--muted);
  font-size: 14px;
}

.callout {
  margin: 0.4em 0 1.1em;
  padding: 14px 16px 4px;
  background: var(--soft);
  border-left: 4px solid var(--blue);
}
.callout.fix { border-left-color: var(--red); }
.callout p { margin-bottom: 0.7em; }
.callout .label {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.callout.fix .label { color: var(--red); }

.cta {
  margin: 36px 0 10px;
  padding: 28px 28px 24px;
  background: var(--blue);
  color: #fff;
}
.cta h2 {
  margin: 0 0 8px;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 1.35rem;
  color: #fff;
}
.cta p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.92); }
.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 2px;
}
.btn:hover { background: var(--red-deep); color: #fff; }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 42px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.post-nav a {
  display: block;
  padding: 8px 0;
  color: inherit;
}
.post-nav .next { text-align: right; }
.post-nav span {
  display: block;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post-nav strong {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-weight: 700;
}
.post-nav a:hover strong { color: var(--red); }

.more { padding: 28px 0 72px; }
.more h2 {
  margin: 0 0 22px;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 1.7rem;
}

/* Footer */
.site-footer { background: var(--blue); color: rgba(255, 255, 255, 0.88); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  gap: 36px;
  padding: 54px 0 40px;
}
.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: 1.15rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.88); }
.site-footer a:hover { color: #fff; }
.site-footer .contact-list li { padding-left: 0; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--blue-deep);
}
.footer-base .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  font-size: 14px;
}
.footer-base a { color: #fff; font-weight: 700; }

/* Gallery */
.page-title {
  margin: 28px 0 0;
  font-family: Montserrat, "Segoe UI", sans-serif;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.25;
  color: var(--blue);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 22px 0 64px;
}
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  cursor: zoom-in;
  overflow: hidden;
}
.gallery-item img { width: 100%; height: auto; }
.gallery-item:hover,
.gallery-item:focus-visible { box-shadow: var(--shadow); outline: 3px solid var(--blue); outline-offset: 2px; }
.lightbox {
  width: min(860px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 44px 16px 16px;
  border: 0;
  background: #fff;
  box-shadow: 0 24px 60px rgba(4, 9, 79, 0.28);
}
.lightbox::backdrop { background: rgba(4, 9, 79, 0.78); }
.lightbox img { width: 100%; height: auto; max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--red); }

@media (max-width: 980px) {
  .card-grid,
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 4px);
    background: #fff;
    border-bottom: 4px solid var(--red);
    box-shadow: 0 16px 30px rgba(4, 9, 79, 0.12);
    padding: 8px 0 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .submenu {
    display: block;
    position: static;
    box-shadow: none;
    border-top: 0;
    padding: 0 0 8px 14px;
    min-width: 0;
  }
  .has-menu:hover > .submenu { display: block; }
  .card-grid,
  .gallery-grid,
  .footer-grid,
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; grid-column: auto; }
  .share-row { align-items: flex-start; flex-direction: column; }
  .listing-hero { height: 228px; }
  .page-hero { min-height: 280px; }
  .footer-base .container { flex-direction: column; align-items: flex-start; }
}
