/* Self-hosted Cyrillic/Latin subsets remove the render-blocking Google CSS
   round trip while preserving the approved Manrope + Unbounded typography. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Палітра шеврона БФ «Довгаль» (Калібрована) */
  --bg-core: #0d1510;
  --bg-surface: #142219;
  --bg-elevated: #1a2c21;
  --forest-dark: #1b2e22;
  --forest-card: #203628;
  --forest-card-hover: #274332;

  /* Бордовий кант */
  --bordeaux-primary: #7a1f2b;
  --bordeaux-hover: #942534;
  --bordeaux-glow: rgba(122, 31, 43, 0.35);

  /* Золото (тризуб, вишивка, ключові акценти) */
  --gold-primary: #c89b3c;
  --gold-light: #e0b456;
  --gold-glow: rgba(200, 155, 60, 0.28);
  --gold-border: rgba(200, 155, 60, 0.2);
  --gold-border-strong: rgba(200, 155, 60, 0.45);

  /* Символічні та тактичні акценти */
  --ua-blue: #4fa8d8;
  --ua-yellow: #f2c230;
  --khaki-sand: #c4a476;
  --khaki-muted: #8e7a5e;

  /* Текстовий шар (теплий кремовий, без мертвого сірого) */
  --text-main: #f6f6f2;
  --text-muted: #a8b8ac;
  --text-dim: #738578;

  /* Суворо 2 гарнітури: Unbounded (заголовки) + Manrope (все інше) */
  --ff-display: 'Unbounded', -apple-system, sans-serif;
  --ff-body: 'Manrope', -apple-system, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-card: 0 16px 40px -12px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px -5px rgba(200, 155, 60, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-core);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(200, 155, 60, 0.08) 0, transparent 40rem),
    radial-gradient(circle at 85% 45%, rgba(122, 31, 43, 0.12) 0, transparent 45rem),
    radial-gradient(circle at 50% 85%, rgba(38, 62, 45, 0.25) 0, transparent 50rem);
  color: var(--text-main);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Контейнер */
.shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

/* Типографіка */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: var(--text-main);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--gold-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-primary);
}

.lead {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.55;
}

/* Навігація / Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 21, 16, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #203628 0%, #142219 100%);
  border: 1.5px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(200, 155, 60, 0.25);
}

.brand-emblem svg {
  width: 24px;
  height: 24px;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-tag {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 0.04em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--gold-primary);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  border: 1px solid var(--gold-primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-primary) 0%, #a97f29 100%);
  color: #0d1510;
  box-shadow: 0 4px 20px rgba(200, 155, 60, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(200, 155, 60, 0.45);
}

.btn-secondary {
  background: rgba(32, 54, 40, 0.6);
  color: var(--text-main);
  border-color: var(--gold-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--forest-card);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: translateY(-2px);
}

/* Hero Секція (Studioframe 3 плани — без псевдо-ордена) */
.hero-section {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 130px 0 70px;
  overflow: hidden;
  border-bottom: 1px solid var(--gold-border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: 
    linear-gradient(90deg, rgba(13, 21, 16, 0.97) 0%, rgba(13, 21, 16, 0.85) 50%, rgba(13, 21, 16, 0.65) 100%),
    url('gallery/hero.jpg'); background-image: image-set(url('gallery/hero.avif') type('image/avif'), url('gallery/hero.webp') type('image/webp'), url('gallery/hero.jpg') type('image/jpeg'));
  background-position: center;
  background-size: cover;
  transform: scale(1.04);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-size: clamp(38px, 5.2vw, 64px);
  margin: 16px 0 20px;
  letter-spacing: -0.04em;
}

.hero-title span.highlight {
  color: var(--gold-light);
  display: inline-block;
}

.facts-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 32px;
}

.fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(20, 34, 25, 0.85);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  backdrop-filter: blur(12px);
}

.fact-chip svg {
  width: 14px;
  height: 14px;
  color: var(--gold-primary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Сучасна тактична картка замість псевдо-ордена */
.hero-tactical-card {
  background: linear-gradient(145deg, rgba(32, 54, 40, 0.8) 0%, rgba(20, 34, 25, 0.95) 100%);
  border: 1.5px solid var(--gold-border-strong);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.tactical-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gold-border);
  margin-bottom: 18px;
}

.tactical-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(79, 168, 216, 0.15);
  border: 1px solid rgba(79, 168, 216, 0.4);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ua-blue);
  text-transform: uppercase;
}

.tactical-status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ua-blue);
  box-shadow: 0 0 6px var(--ua-blue);
}

.tactical-card-img-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--gold-border);
  margin-bottom: 18px;
  aspect-ratio: 16/10;
}

.tactical-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tactical-img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(13, 21, 16, 0.95) 0%, transparent 100%);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.tactical-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tactical-meta-item {
  padding: 10px 12px;
  background: rgba(13, 21, 16, 0.6);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
}

.tactical-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.tactical-meta-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
}

/* Секції */
section {
  padding: 90px 0;
  position: relative;
  border-bottom: 1px solid var(--gold-border);
}

.section-head {
  margin-bottom: 48px;
}

.section-head.center {
  text-align: center;
}

.section-head.center .lead {
  margin: 0 auto;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  margin: 8px 0 16px;
}

/* 3 Стратегічні вектори з фотографіями та глибиною */
.vector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.vector-card {
  position: relative;
  background: var(--forest-card);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.vector-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.vector-card-media {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.vector-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.vector-card:hover .vector-card-media img {
  transform: scale(1.08);
}

.vector-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  background: rgba(122, 31, 43, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.vector-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.vector-card-body h3 {
  font-size: 21px;
  margin-bottom: 10px;
  color: var(--gold-light);
}

.vector-card-body p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* 10 Напрямів діяльності (Every block own visual identity — Cinematic Tactical Grid) */
#directions {
  position: relative;
  background: 
    radial-gradient(circle at 85% 15%, rgba(122, 31, 43, 0.2) 0, transparent 38rem),
    radial-gradient(circle at 15% 85%, rgba(200, 155, 60, 0.15) 0, transparent 38rem),
    linear-gradient(180deg, rgba(13, 21, 16, 0.98) 0%, rgba(16, 27, 20, 0.98) 100%);
  overflow: hidden;
}

.directions-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.dir-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(32, 54, 40, 0.85) 0%, rgba(16, 27, 20, 0.95) 100%);
  border: 1.5px solid var(--gold-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.dir-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 30px rgba(200, 155, 60, 0.22);
}

.dir-card.span-6 { grid-column: span 6; }
.dir-card.span-4 { grid-column: span 4; }
.dir-card.span-3 { grid-column: span 3; }

/* Фоновий фото-шар кожної картки (per-card-hover-reveal-bg) */
.dir-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  filter: saturate(1.2) contrast(1.1);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1;
}

.dir-card:hover .dir-card-bg {
  opacity: 0.32;
  transform: scale(1.08);
}

.dir-card-inner {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, rgba(13, 21, 16, 0.2) 0%, rgba(13, 21, 16, 0.8) 100%);
}

.dir-card.span-6 .dir-card-inner {
  padding: 32px 28px;
}

.dir-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dir-icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  border-radius: 12px;
  background: rgba(13, 21, 16, 0.85);
  border: 1.5px solid var(--gold-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: all 0.3s ease;
  overflow: hidden;
}

.dir-card:hover .dir-icon-wrap {
  background: var(--forest-dark);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: scale(1.06);
  box-shadow: 0 0 16px var(--gold-glow);
}

.dir-icon-wrap svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  display: block;
}

.dir-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dir-num-badge {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(13, 21, 16, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

.dir-tag {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Кольорова система бейджів для кожної категорії */
.dir-tag.badge-tactical {
  background: rgba(122, 31, 43, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.4);
  color: #fff;
}

.dir-tag.badge-tech {
  background: rgba(15, 51, 71, 0.85);
  border: 1px solid rgba(79, 168, 216, 0.5);
  color: #72c8fa;
}

.dir-tag.badge-med {
  background: rgba(56, 16, 22, 0.85);
  border: 1px solid rgba(214, 51, 74, 0.5);
  color: #ff8595;
}

.dir-tag.badge-optics {
  background: rgba(56, 42, 13, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.5);
  color: #f7d58b;
}

.dir-tag.badge-gear {
  background: rgba(48, 39, 27, 0.85);
  border: 1px solid rgba(196, 164, 118, 0.5);
  color: #ebd6b7;
}

.dir-tag.badge-urgent {
  background: rgba(122, 31, 43, 0.9);
  border: 1px solid #e0b456;
  color: #fff;
}

.dir-tag.badge-education {
  background: rgba(59, 46, 7, 0.85);
  border: 1px solid rgba(242, 194, 48, 0.5);
  color: #fce182;
}

.dir-tag.badge-community {
  background: rgba(13, 46, 28, 0.85);
  border: 1px solid rgba(43, 179, 112, 0.5);
  color: #7bf2b5;
}

.dir-tag.badge-humanitarian {
  background: rgba(40, 35, 20, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.4);
  color: #f0dab1;
}

.dir-card h4 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
  line-height: 1.3;
}

.dir-card.span-6 h4 {
  font-size: 23px;
  margin-bottom: 12px;
}

.dir-card p {
  font-size: 14.5px;
  color: #d6e2d9;
  line-height: 1.6;
  font-weight: 500;
  flex-grow: 1;
}

.dir-card.span-6 p {
  font-size: 15.5px;
}

/* Галерея: 100% надійна сітка (без порожніх карток) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.gallery-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--forest-card);
  border: 1px solid var(--gold-border);
  cursor: pointer;
  aspect-ratio: 4/3;
  transition: all 0.3s ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-card:hover {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(-4px);
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(13, 21, 16, 0.95) 0%, rgba(13, 21, 16, 0.4) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.gallery-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  background: var(--bordeaux-primary);
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 6px;
}

.gallery-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Фільтри */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
  justify-content: center;
}

.filter-btn {
  padding: 9px 18px;
  background: rgba(32, 54, 40, 0.6);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--gold-primary);
  color: #0d1510;
  border-color: var(--gold-primary);
  font-weight: 700;
}

/* Документи / Звітність */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.doc-card {
  padding: 28px;
  background: var(--forest-card);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  position: relative;
}

.doc-card.doc-viewable {
  cursor: pointer;
}

.doc-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.doc-badge-demo {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  background: rgba(122, 31, 43, 0.85);
  border: 1px solid rgba(200, 155, 60, 0.4);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.doc-type-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.doc-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.doc-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.btn-doc-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(32, 54, 40, 0.9);
  border: 1.5px solid var(--gold-border-strong);
  border-radius: var(--r-sm);
  color: var(--gold-light);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 14px;
  width: 100%;
}

.doc-card:hover .btn-doc-view {
  background: var(--gold-primary);
  color: #0d1510;
  border-color: var(--gold-primary);
}

.doc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(200, 155, 60, 0.12);
  font-size: 12px;
  font-weight: 600;
  color: var(--khaki-sand);
}

.doc-status-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ua-blue);
}

.doc-empty-state {
  grid-column: 1 / -1;
  padding: 48px 32px;
  text-align: center;
  background: rgba(20, 34, 25, 0.6);
  border: 1.5px dashed var(--gold-border);
  border-radius: var(--r-md);
}

.doc-empty-state h4 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--gold-light);
}

.doc-empty-state p {
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 auto;
}

/* Новини */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.news-card {
  background: var(--forest-card);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.news-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.news-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-card:hover .news-card-img {
  transform: scale(1.06);
}

.news-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.news-card h3 {
  font-size: 19px;
  margin-bottom: 10px;
  line-height: 1.35;
  color: #ffffff;
}

.news-card p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  margin-top: auto;
}

.news-card:hover .news-read-more {
  color: var(--gold-primary);
  text-decoration: underline;
}

/* Статті новин (Окремі сторінки /novyny/*.html) */
.article-section {
  padding: 130px 0 80px;
}

.article-breadcrumbs {
  margin-bottom: 28px;
}

.article-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  background: rgba(32, 54, 40, 0.7);
  border: 1px solid var(--gold-border);
  border-radius: var(--r-sm);
  transition: all 0.2s ease;
}

.article-breadcrumbs a:hover {
  background: var(--gold-primary);
  color: #0d1510;
  border-color: var(--gold-primary);
}

.article-header {
  max-width: 880px;
  margin-bottom: 32px;
}

.article-title {
  font-size: clamp(28px, 4vw, 42px);
  margin: 12px 0 16px;
  line-height: 1.22;
  color: #ffffff;
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.article-chip {
  padding: 5px 14px;
  background: rgba(32, 54, 40, 0.85);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.article-chip.chip-tag {
  background: rgba(122, 31, 43, 0.85);
  border-color: rgba(200, 155, 60, 0.4);
  color: #ffffff;
}

.article-featured-media {
  margin-bottom: 40px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px solid var(--gold-border-strong);
  max-width: 840px;
  background: #0d1510;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.article-featured-media img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.article-content {
  max-width: 840px;
  font-size: 17px;
  line-height: 1.8;
  color: #e2e8e4;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content h2, .article-content h3 {
  font-size: 24px;
  margin: 40px 0 16px;
  color: var(--gold-light);
}

.article-content blockquote {
  padding: 22px 28px;
  background: rgba(32, 54, 40, 0.6);
  border-left: 4px solid var(--gold-primary);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 32px 0;
  font-style: italic;
  font-size: 18px;
  color: #ffffff;
}

.article-cta {
  margin-top: 56px;
  padding: 36px;
  background: linear-gradient(145deg, rgba(32, 54, 40, 0.95) 0%, rgba(20, 34, 25, 0.98) 100%);
  border: 1.5px solid var(--gold-border-strong);
  border-radius: var(--r-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: var(--shadow-card);
}

/* Реквізити / Контакти */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.contact-card {
  padding: 32px;
  background: var(--forest-card);
  border: 1.5px solid var(--gold-border);
  border-radius: var(--r-md);
}

.contact-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--gold-light);
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
}

.contact-list strong {
  color: var(--text-main);
}

/* Footer */
.site-footer {
  padding: 60px 0 40px;
  background: #090e0b;
  border-top: 1px solid var(--gold-border);
  font-size: 14px;
  color: var(--text-dim);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h4 {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold-primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
}

/* Lightbox Модал */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(9, 14, 11, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--r-sm);
  border: 1px solid var(--gold-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.modal-info {
  margin-top: 16px;
  text-align: center;
  max-width: 650px;
}

.modal-caption {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.modal-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.modal-close, .modal-prev, .modal-next {
  position: absolute;
  background: rgba(32, 54, 40, 0.85);
  border: 1px solid var(--gold-border);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover, .modal-prev:hover, .modal-next:hover {
  background: var(--gold-primary);
  color: #0d1510;
  border-color: var(--gold-primary);
}

.modal-close {
  top: -16px;
  right: -16px;
}

.modal-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.modal-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Document Viewer Modal */
.doc-modal-content {
  position: relative;
  max-width: 820px;
  width: 90vw;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1.5px solid var(--gold-border-strong);
  border-radius: var(--r-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95);
  overflow-y: auto;
}

.doc-modal-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(122, 31, 43, 0.9);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.doc-modal-img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--r-sm);
  border: 1px solid var(--gold-border);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.doc-modal-info {
  margin-top: 18px;
  text-align: center;
  width: 100%;
}

.doc-modal-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.doc-modal-meta {
  font-size: 13.5px;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.doc-modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Мобільна адаптивність */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .vector-grid {
    grid-template-columns: 1fr;
  }
  .dir-card.span-6, .dir-card.span-4, .dir-card.span-3 {
    grid-column: span 12;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .nav-menu {
    display: none;
  }
  .hero-section {
    padding: 110px 0 50px;
    min-height: auto;
  }
}

/* Mobile composition — explicit vertical rhythm and readable scene layers.
   This is intentionally a separate composition, not a compressed desktop grid. */
@media (max-width: 600px) {
  body {
    font-size: 16px;
    line-height: 1.58;
  }

  .shell {
    width: min(100% - 32px, 520px);
  }

  .site-header {
    background: rgba(13, 21, 16, 0.97);
  }

  .header-inner {
    height: 68px;
    gap: 10px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-emblem {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .brand-emblem svg {
    width: 21px;
    height: 21px;
  }

  .brand-name {
    font-size: 13px;
    white-space: nowrap;
  }

  .brand-tag {
    font-size: 9px;
    white-space: nowrap;
  }

  .header-actions .btn {
    padding: 9px 11px;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }

  .hero-section {
    padding: 96px 0 42px;
  }

  .hero-grid {
    gap: 24px;
  }

  .hero-content {
    padding: 18px 16px 20px;
    background: rgba(13, 21, 16, 0.86);
    border: 1px solid rgba(200, 155, 60, 0.28);
    border-radius: 16px;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.28);
  }

  .hero-title {
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.12;
    margin: 12px 0 16px;
  }

  .hero-content .lead {
    font-size: 17px;
    line-height: 1.55;
  }

  .facts-bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 22px 0 24px;
  }

  .fact-chip {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    font-size: 12px;
    line-height: 1.35;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  .hero-tactical-card {
    padding: 16px;
    border-radius: 16px;
  }

  .tactical-card-head {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .tactical-media-wrap,
  .tactical-card-img-wrap {
    min-height: 190px;
  }

  section {
    padding: 64px 0;
  }

  .section-head,
  .section-head.center {
    margin-bottom: 28px;
    padding: 18px 16px;
    text-align: left;
    background: rgba(13, 21, 16, 0.94);
    border: 1px solid rgba(200, 155, 60, 0.24);
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  }

  .section-head.center .lead {
    margin: 0;
  }

  .section-title {
    font-size: clamp(27px, 8vw, 36px);
    line-height: 1.16;
    margin: 8px 0 12px;
  }

  .lead {
    font-size: 16px;
    line-height: 1.55;
  }

  .vector-grid,
  .directions-grid,
  .gallery-grid,
  .docs-grid,
  .news-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .vector-card,
  .dir-card,
  .gallery-card,
  .doc-card,
  .news-card,
  .contact-card {
    border-width: 1.5px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  }

  .vector-card-media {
    height: 158px;
  }

  .vector-card-body {
    padding: 20px;
    background-color: var(--forest-card);
  }

  .vector-card-body h3 {
    font-size: 20px;
  }

  .vector-card-body p,
  .dir-card p,
  .news-card p,
  .doc-card p {
    font-size: 15px;
    line-height: 1.6;
  }

  .dir-card.span-6,
  .dir-card.span-4,
  .dir-card.span-3 {
    grid-column: span 12;
  }

  .dir-card-inner,
  .dir-card.span-6 .dir-card-inner {
    min-height: 258px;
    padding: 22px 18px;
    background: linear-gradient(180deg, rgba(13, 21, 16, 0.14) 0%, rgba(13, 21, 16, 0.88) 100%);
    background-color: rgba(13, 21, 16, 0.48);
  }

  /* Touch has no reliable hover: the documentary photo layer must be part of
     the resting mobile composition, while the dark copy layer keeps contrast. */
  .dir-card-bg,
  .dir-card:hover .dir-card-bg {
    opacity: 0.42;
    transform: scale(1.025);
  }

  .dir-head {
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .dir-badge-group {
    justify-content: flex-end;
    text-align: right;
  }

  .dir-tag {
    font-size: 10px;
    line-height: 1.25;
  }

  .dir-card h4,
  .dir-card.span-6 h4 {
    font-size: 21px;
    line-height: 1.28;
    margin-bottom: 10px;
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  }

  .dir-card p {
    color: #e3eee6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.88);
  }

  .gallery-card {
    aspect-ratio: 4 / 3;
  }

  .gallery-overlay {
    padding: 14px;
  }

  .docs-grid,
  .news-grid {
    gap: 18px;
  }

  .doc-card {
    padding: 20px;
    background-color: var(--forest-card);
  }

  .doc-card h3 {
    font-size: 19px;
    line-height: 1.3;
  }

  .news-card-body {
    padding: 20px;
    background-color: var(--forest-card);
  }

  .news-card-img {
    height: 188px;
  }

  .contact-card {
    padding: 22px 18px;
  }

  .site-footer {
    padding: 46px 0 30px;
  }

  .footer-grid {
    gap: 26px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* The same content rule applies to large touch devices: a card must not lose
   its photographic evidence merely because the user cannot hover. */
@media (hover: none) and (pointer: coarse) {
  .dir-card-bg,
  .dir-card:hover .dir-card-bg {
    opacity: 0.42;
    transform: scale(1.025);
  }
}

/* Performance layer: media keeps the same composition and JPEG fallback while
   modern browsers negotiate AVIF/WebP. Picture is made block-level so the
   wrapper cannot introduce an inline baseline gap in the existing card grids. */
.responsive-picture {
  display: block;
  width: 100%;
  height: 100%;
}

