:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --primary-subtle: #eff6ff;
  --secondary: #0284c7;
  --accent: #f59e0b;
  --accent-light: #fef3c7;
  --success: #10b981;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #93c5fd;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container-width: 1240px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Header Bar */
.top-bar {
  background-color: #0f172a;
  color: #cbd5e1;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid #1e293b;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.top-bar-info-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-bvi {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
}

.btn-bvi:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Main Header */
.main-header {
  background-color: #ffffff;
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.main-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.brand-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 24px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.brand-logo-img {
  height: 72px;
  width: auto;
  max-width: 125px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
  flex-shrink: 0;
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-brand:hover .brand-logo-img {
  transform: scale(1.03);
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
  margin-bottom: 2px;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-middle {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-contacts {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-contact-item {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.header-contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  font-weight: 600;
}

.header-contact-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.header-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  width: 175px;
}

.header-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm, 6px);
  border: none;
  cursor: pointer;
  line-height: 1.15;
  text-align: center;
  min-height: 32px;
  white-space: normal;
}

.header-action-btn span {
  display: inline-block;
  line-height: 1.15;
}

.header-action-btn svg {
  flex-shrink: 0;
}

/* Header Search Form */
.header-search-wrap {
  flex-shrink: 0;
  width: 220px;
}

.header-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.header-search-input {
  width: 100%;
  padding: 8px 36px 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 30px;
  font-size: 13px;
  background-color: #f8fafc;
  color: var(--text-main);
  transition: all 0.2s ease;
  outline: none;
}

.header-search-input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.header-search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-search-btn:hover {
  color: var(--primary);
  background-color: #e2e8f0;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 10px -1px rgba(30, 64, 175, 0.3);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-subtle);
  color: var(--primary-dark);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-accent {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background-color: #d97706;
  color: #ffffff;
}

/* Navigation */
.main-nav {
  background-color: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}

.nav-link:hover, .nav-item.active .nav-link {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Dropdown Menus (Multi-level support) */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 270px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  padding: 6px 0;
  list-style: none;
  margin: 0;
}

.nav-item:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  position: relative;
  list-style: none;
}

.dropdown-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  line-height: 1.35;
}

.dropdown-link:hover,
.dropdown-item:hover > .dropdown-link {
  background-color: var(--primary-subtle);
  color: var(--primary);
  padding-left: 22px;
}

/* 2nd-level Flyout Submenu (for 3rd nesting level) */
.dropdown-item.has-submenu > .dropdown-menu {
  top: -6px;
  left: 100%;
  margin-left: 2px;
  transform: translateX(-10px);
}

.dropdown-item.has-submenu:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.dropdown-item .chevron-right {
  opacity: 0.5;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dropdown-item:hover > .dropdown-link .chevron-right {
  opacity: 1;
  transform: translateX(3px);
  stroke: var(--primary);
}

/* Sidebar Sublist (for nested sections in sidebar) */
.sidebar-sublist {
  list-style: none;
  padding-left: 14px;
  margin: 4px 0 6px;
  border-left: 2px solid #e2e8f0;
}

.sidebar-subitem a {
  display: block;
  padding: 6px 12px;
  font-size: 13px;
  color: #475569;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.sidebar-subitem a:hover,
.sidebar-subitem.active a {
  background-color: #f1f5f9;
  color: var(--primary);
  font-weight: 600;
}


/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  padding: 12px;
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #0284c7 100%);
  color: #ffffff;
  padding: 60px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
}

.hero-description {
  font-size: 17px;
  line-height: 1.6;
  color: #e0f2fe;
  margin-bottom: 28px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 28px;
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-num span {
  color: var(--accent);
}

.stat-label {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.3;
}

/* Urgent / Info Banner */
.notice-banner {
  background-color: #fffbeb;
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-top: -24px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.notice-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.notice-icon {
  width: 40px;
  height: 40px;
  background-color: var(--accent-light);
  color: #b45309;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.notice-text h4 {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}

.notice-text p {
  font-size: 13.5px;
  color: #78350f;
}

/* Quick Navigation Tiles */
.quick-tiles-section {
  padding: 50px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.section-title-wrap h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  position: relative;
  padding-bottom: 8px;
}

.section-title-wrap h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-title-wrap p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tile-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.tile-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-focus);
}

.tile-card .tile-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.tile-icon.blue { background-color: #eff6ff; color: #1e40af; }
.tile-icon.sky { background-color: #f0f9ff; color: #0284c7; }
.tile-icon.green { background-color: #ecfdf5; color: #059669; }
.tile-icon.amber { background-color: #fffbeb; color: #d97706; }
.tile-icon.purple { background-color: #faf5ff; color: #7e22ce; }

.tile-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.tile-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  flex-grow: 1;
}

.tile-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tile-card:hover .tile-link,
.news-card:hover .tile-link {
  color: var(--primary-dark);
  gap: 9px;
}

/* News & Events Section */
.news-section {
  padding: 50px 0;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.news-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border-focus);
}

.news-card .tile-link::after,
.news-card .news-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}


.news-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #e2e8f0;
}

.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-img {
  transform: scale(1.04);
}

.news-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.news-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 12.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.news-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 10px;
}

.news-excerpt {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}
/* News Placeholders & Vibrant Gradients */
.news-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.news-placeholder.grad-blue {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}
.news-placeholder.grad-sky {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
}
.news-placeholder.grad-cyan {
  background: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
}
.news-placeholder.grad-teal {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}
.news-placeholder.grad-green {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}
.news-placeholder.grad-emerald {
  background: linear-gradient(135deg, #065f46 0%, #059669 100%);
}
.news-placeholder.grad-lime {
  background: linear-gradient(135deg, #4d7c0f 0%, #84cc16 100%);
}
.news-placeholder.grad-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}
.news-placeholder.grad-orange {
  background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
}
.news-placeholder.grad-red {
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}
.news-placeholder.grad-rose {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
}
.news-placeholder.grad-pink {
  background: linear-gradient(135deg, #db2777 0%, #f472b6 100%);
}
.news-placeholder.grad-fuchsia {
  background: linear-gradient(135deg, #c026d3 0%, #e879f9 100%);
}
.news-placeholder.grad-purple {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}
.news-placeholder.grad-indigo {
  background: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
}
.news-placeholder.grad-violet {
  background: linear-gradient(135deg, #581c87 0%, #9333ea 100%);
}
.news-placeholder.grad-bronze {
  background: linear-gradient(135deg, #78350f 0%, #b45309 100%);
}
.news-placeholder.grad-slate {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}
.news-placeholder.grad-dark {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}


/* Category Filter Bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0 26px;
  padding-bottom: 6px;
}

.filter-btn {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
}

.page-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.support-section {
  padding: 60px 0;
}

.support-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 44px 48px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(2, 132, 199, 0.3);
}

.support-banner::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.support-banner-content {
  max-width: 660px;
  position: relative;
  z-index: 2;
}

.support-banner h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #ffffff;
}

.support-banner p {
  font-size: 15.5px;
  color: #e0f2fe;
  margin-bottom: 24px;
  line-height: 1.6;
}

.specialists-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.specialist-chip {
  background-color: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.specialist-chip:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Gov Services & Official Banner Section */
/* Gov Services & Official Banner Section */
.gov-section {
  padding: 40px 0 60px;
}

.gov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.gov-banner-item {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}

.gov-banner-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.gov-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.gov-text h5 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.gov-text span {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Gosuslugi POS Widget Wrapper */
.pos-widget-section {
  padding: 15px 0 35px;
}

.pos-widget-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
}

#js-show-iframe-wrapper {
  margin: 0 auto;
}

/* Sidebar Banners Block */
.sidebar-banners {
  margin-top: 24px;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sidebar-banners-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-banner-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.sidebar-banner-link:hover {
  background-color: var(--primary-subtle);
  border-color: var(--primary-light);
  transform: translateX(3px);
}

.sidebar-banner-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-banner-info {
  display: flex;
  flex-direction: column;
}

.sidebar-banner-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.sidebar-banner-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Page Layout for Inner Pages (Sidebar + Content) */
.page-header {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: #ffffff;
  padding: 36px 0;
  margin-bottom: 36px;
}

.page-header-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #93c5fd;
}

.breadcrumbs a {
  color: #bfdbfe;
}

.breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.breadcrumbs span.current {
  color: #ffffff;
  font-weight: 600;
}

.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-bottom: 60px;
}

.page-layout.no-sidebar {
  grid-template-columns: 1fr;
}


.sidebar-menu {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: sticky;
  top: 80px;
}

.sidebar-header {
  background-color: #f8fafc;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.sidebar-list {
  padding: 6px 0;
  list-style: none;
  margin: 0;
}

.sidebar-item {
  list-style: none;
  position: relative;
}

/* Ссылка 1-го уровня в сайдбаре */
.sidebar-parent-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.sidebar-item > a {
  display: block;
  padding: 10px 18px;
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-parent-wrap > a {
  flex-grow: 1;
  border-left: none !important;
  padding: 10px 14px 10px 18px;
}

.sidebar-item > a:hover,
.sidebar-parent-wrap:hover {
  background-color: var(--primary-subtle);
  color: var(--primary);
}

.sidebar-item > a:hover {
  border-left-color: var(--primary-light);
}

.sidebar-parent-wrap:hover {
  border-left-color: var(--primary-light);
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  color: var(--primary);
}

.sidebar-item.has-sub.is-open > .sidebar-parent-wrap .sidebar-toggle-btn {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Активный пункт 1-го уровня */
.sidebar-item.active > a,
.sidebar-item.active > .sidebar-parent-wrap {
  background-color: #eff6ff;
  border-left-color: var(--primary);
}

.sidebar-item.active > a,
.sidebar-item.active > .sidebar-parent-wrap > a {
  color: var(--primary-dark);
  font-weight: 700;
}

/* Вложенный список 2-го уровня в сайдбаре (Плавный Аккордеон) */
.sidebar-sublist {
  list-style: none;
  padding: 0 0 0 14px;
  margin: 0 0 0 12px;
  border-left: 2px solid #e2e8f0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* При загрузке страницы активный раздел уже открыт без проигрывания анимации */
.sidebar-item.has-sub.active > .sidebar-sublist {
  max-height: none;
  opacity: 1;
}

.sidebar-item.has-sub.is-open > .sidebar-sublist {
  opacity: 1;
}




.sidebar-subitem {
  list-style: none;
}

.sidebar-subitem > a {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  color: #475569;
  text-decoration: none;
  border-radius: 4px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  font-weight: 500;
  background-color: transparent;
}

.sidebar-subitem > a:hover {
  background-color: #f1f5f9;
  color: var(--primary);
}

/* Активный пункт 2-го уровня (конкретная страница 3-го уровня) */
.sidebar-subitem.active > a {
  background-color: #eff6ff !important;
  color: var(--primary) !important;
  border-left: 3px solid var(--primary) !important;
  font-weight: 700 !important;
}


.content-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-main);
}

.content-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--primary-dark);
}

.content-card p {
  margin-bottom: 16px;
  color: #334155;
  line-height: 1.65;
}

/* Data Table & Default Content Tables */
.content-card table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0 28px;
  font-size: 14.5px;
  line-height: 1.45;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
}

.content-card table th,
.content-card table td,
.data-table th,
.data-table td {
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  text-align: left;
  vertical-align: middle;
}

.content-card table th,
.content-card table thead th,
.content-card table thead td,
.content-card table tr:first-child th,
.content-card table tr:first-child td,
.data-table th,
.table-header,
.table-header td {
  background-color: #f1f5f9;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 2px solid #94a3b8;
}

.content-card table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even) {
  background-color: #f8fafc;
}


.content-card table tbody tr:hover,
.data-table tbody tr:hover {
  background-color: #eff6ff;
}


/* Document Item Card */
.doc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  transition: var(--transition);
}

.doc-item:hover {
  background-color: #ffffff;
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.doc-icon {
  font-size: 24px;
  color: #ef4444;
  flex-shrink: 0;
}

.doc-info {
  flex-grow: 1;
}

.doc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.doc-meta {
  font-size: 12px;
  color: var(--text-light);
}

/* Teacher / Specialist Card */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.teacher-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  padding: 20px 16px;
  transition: var(--transition);
}

.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.teacher-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
  border: 3px solid #eff6ff;
}

.teacher-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.teacher-role {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
}

.teacher-exp {
  font-size: 12px;
  color: var(--text-muted);
}

/* Footer */
.main-footer {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f2757 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #e0f2fe;
  padding: 56px 0 24px;
  font-size: 14px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.footer-col {
  max-width: 440px;
  width: 100%;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  border-radius: 2px;
  background-color: #38bdf8;
}

.footer-col p {
  color: #bfdbfe;
  font-size: 14px;
  line-height: 1.6;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #bfdbfe;
  font-size: 13.5px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-contacts-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: #e0f2fe;
  font-size: 13.5px;
}

.footer-contacts-list li a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-contacts-list li a:hover {
  color: #38bdf8;
}

.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
  color: #93c5fd;
}

/* Search Results Page Styling */
.search-page-wrapper {
  max-width: 960px;
}

.search-pagination-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
  color: #475569;
}

.search-pagination-label {
  font-size: 14px;
  color: #334155;
  font-weight: 600;
}

.search-pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.search-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.15s ease;
}

.search-page-btn:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
}

.search-page-btn.active {
  background-color: #bfdbfe;
  border-color: #93c5fd;
  color: #1e3a8a;
  cursor: default;
}

/* Search Card */
.search-card-item {
  position: relative;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.search-card-item:hover {
  background-color: #f0f7ff;
  border-color: #93c5fd;
  border-left-color: var(--primary-dark);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.search-card-title {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.search-card-title a {
  color: #2563eb;
  text-decoration: none;
}

.search-card-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.search-card-item:hover .search-card-title a {
  color: #1d4ed8;
  text-decoration: underline;
}


.search-card-idx {
  color: #0f172a;
  margin-right: 4px;
}

.search-card-extract {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
}

/* Highlighting of search terms */
mark.search-highlight,
span.search-highlight,
.search-highlight {
  background-color: #fef08a !important;
  color: #713f12 !important;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 600;
  border-bottom: 1.5px solid #eab308;
}

/* Error Pages Styling (404 & 403) */
.error-page-wrapper {
  text-align: center;
  padding: 20px 15px 40px;
  max-width: 600px;
  margin: 0 auto;
}

.error-drawing-card {
  max-width: 450px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.error-drawing-img {
  width: 100%;
  height: auto;
  display: block;
}

.error-footer-text {
  font-size: 16px;
  color: #334155;
  line-height: 1.6;
  margin-top: 20px;
}

.error-footer-text a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
  transition: var(--transition);
}

.error-footer-text a:hover {
  color: #1d4ed8;
}



/* Responsive Media Queries */


@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .page-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar-info {
    font-size: 12px;
  }
  .header-contacts {
    display: none;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .nav-menu.active {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
  }
  .dropdown-link {
    color: #cbd5e1;
    padding-left: 28px;
  }
  .hero-title {
    font-size: 28px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Document List & File Format Icons
   ========================================================================== */

/* 1. Reset: NO icons for inline links in plain paragraphs or text */
.content-card p a::before,
.content-card a::before,
a::before {
  content: none;
}

/* 2. Document Lists (.doc-list with divider lines) */
.doc-list,
.content-card ul.doc-list,
.content-card ol.doc-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 18px 0 24px !important;
  border-top: 1.5px solid #cbd5e1 !important;
}

.doc-list li,
.content-card ul.doc-list li,
.content-card ol.doc-list li {
  list-style: none !important;
  padding: 10px 10px !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
  margin: 0 !important;
  background: transparent !important;
  border-radius: 6px !important;
  transition: background-color 0.18s ease !important;
}

.doc-list li:hover,
.content-card ul.doc-list li:hover {
  background-color: #f1f5f9 !important;
}

/* 3. Regular content lists with document links */
.content-card ul:not(.doc-list) li,
.content-card ol:not(.doc-list) li {
  margin-bottom: 6px !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  transition: background-color 0.18s ease !important;
}

.content-card ul:not(.doc-list) li:hover,
.content-card ol:not(.doc-list) li:hover {
  background-color: #f1f5f9 !important;
}

.content-card ul:not(.doc-list) li:last-child,
.content-card ol:not(.doc-list) li:last-child {
  margin-bottom: 0 !important;
}


/* Flex layout: Icon on left (32x38), text block on right, aligned to top */
.doc-list li a,
.content-card ul li a[href*=".pdf"],
.content-card ul li a[href*=".doc"],
.content-card ul li a[href*=".xls"],
.content-card ul li a[href*=".ppt"],
.content-card ul li a[href*=".zip"],
.content-card ul li a[href*=".txt"],
.content-card ul li a[href*=".sig"],
.content-card ol li a[href*=".pdf"],
.content-card ol li a[href*=".doc"],
.content-card ol li a[href*=".xls"],
.content-card ol li a[href*=".ppt"],
.content-card ol li a[href*=".zip"],
.content-card ol li a[href*=".txt"],
.content-card ol li a[href*=".sig"],
.doc-link,
a.doc-pdf,
a.doc-doc,
a.doc-xls,
a.doc-ppt,
a.doc-zip,
a.doc-txt,
a.doc-sig {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  text-decoration: none !important;
  color: #1e40af !important;
  font-size: 15.5px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  transition: color 0.18s ease, text-decoration 0.18s ease !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  text-wrap: pretty !important;
}

/* Hover state: Red color + underline */
.doc-list li:hover a,
.doc-list li a:hover,
.content-card ul li:hover a,
.content-card ul li a:hover,
.content-card ol li:hover a,
.content-card ol li a:hover,
.doc-link:hover,
a.doc-pdf:hover,
a.doc-doc:hover,
a.doc-xls:hover,
a.doc-ppt:hover,
a.doc-zip:hover,
a.doc-txt:hover,
a.doc-sig:hover {
  color: #dc2626 !important;
  text-decoration: underline !important;
}


.doc-title {
  flex-grow: 1;
  color: inherit;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  -ms-hyphens: none !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  text-wrap: pretty !important;
}



.doc-meta {
  display: inline-block;
  font-size: 12.5px;
  color: #64748b;
  text-decoration: none !important;
  margin-left: 8px;
  font-weight: 400;
  white-space: nowrap;
}

/* Base icon sizing: 32x38px, top-aligned with text line (default icon: url.svg) */
.doc-list li a::before,
.doc-link::before,
a.doc-url::before,
a.doc-web::before,
a.doc-link::before,
.content-card ul li a[href*=".pdf"]::before,
.content-card ul li a[href*=".doc"]::before,
.content-card ul li a[href*=".xls"]::before,
.content-card ul li a[href*=".ppt"]::before,
.content-card ul li a[href*=".zip"]::before,
.content-card ul li a[href*=".txt"]::before,
.content-card ul li a[href*=".sig"]::before,
.content-card ol li a[href*=".pdf"]::before,
.content-card ol li a[href*=".doc"]::before,
.content-card ol li a[href*=".xls"]::before,
.content-card ol li a[href*=".ppt"]::before,
.content-card ol li a[href*=".zip"]::before,
.content-card ol li a[href*=".txt"]::before,
.content-card ol li a[href*=".sig"]::before,
a.doc-pdf::before,
a.doc-doc::before,
a.doc-xls::before,
a.doc-ppt::before,
a.doc-zip::before,
a.doc-txt::before,
a.doc-sig::before {
  content: '' !important;
  display: block !important;
  width: 32px !important;
  height: 38px !important;
  min-width: 32px !important;
  margin: 0 !important;
  background-image: url('/data/style/images/icons/url.svg') !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: contain !important;
  flex-shrink: 0 !important;
}

/* Format specific background images */
.doc-list a[href*=".pdf"]::before,
.doc-list a[href*=".PDF"]::before,
.content-card ul li a[href*=".pdf"]::before,
.content-card ul li a[href*=".PDF"]::before,
.content-card ol li a[href*=".pdf"]::before,
.content-card ol li a[href*=".PDF"]::before,
a.doc-pdf::before {
  background-image: url('/data/style/images/icons/pdf.svg') !important;
}

.doc-list a[href*=".doc"]::before,
.doc-list a[href*=".docx"]::before,
.doc-list a[href*=".DOC"]::before,
.doc-list a[href*=".DOCX"]::before,
.doc-list a[href*=".rtf"]::before,
.doc-list a[href*=".odt"]::before,
.content-card ul li a[href*=".doc"]::before,
.content-card ul li a[href*=".docx"]::before,
.content-card ul li a[href*=".DOC"]::before,
.content-card ul li a[href*=".DOCX"]::before,
.content-card ul li a[href*=".rtf"]::before,
.content-card ul li a[href*=".odt"]::before,
.content-card ol li a[href*=".doc"]::before,
.content-card ol li a[href*=".docx"]::before,
a.doc-doc::before,
a.doc-docx::before {
  background-image: url('/data/style/images/icons/doc.svg') !important;
}

.doc-list a[href*=".xls"]::before,
.doc-list a[href*=".xlsx"]::before,
.doc-list a[href*=".XLS"]::before,
.doc-list a[href*=".XLSX"]::before,
.doc-list a[href*=".csv"]::before,
.doc-list a[href*=".ods"]::before,
.content-card ul li a[href*=".xls"]::before,
.content-card ul li a[href*=".xlsx"]::before,
.content-card ul li a[href*=".XLS"]::before,
.content-card ul li a[href*=".XLSX"]::before,
.content-card ul li a[href*=".csv"]::before,
.content-card ul li a[href*=".ods"]::before,
.content-card ol li a[href*=".xls"]::before,
.content-card ol li a[href*=".xlsx"]::before,
a.doc-xls::before,
a.doc-xlsx::before {
  background-image: url('/data/style/images/icons/xls.svg') !important;
}

.doc-list a[href*=".ppt"]::before,
.doc-list a[href*=".pptx"]::before,
.doc-list a[href*=".PPT"]::before,
.doc-list a[href*=".PPTX"]::before,
.doc-list a[href*=".odp"]::before,
.content-card ul li a[href*=".ppt"]::before,
.content-card ul li a[href*=".pptx"]::before,
.content-card ul li a[href*=".PPT"]::before,
.content-card ul li a[href*=".PPTX"]::before,
.content-card ul li a[href*=".odp"]::before,
.content-card ol li a[href*=".ppt"]::before,
.content-card ol li a[href*=".pptx"]::before,
a.doc-ppt::before,
a.doc-pptx::before {
  background-image: url('/data/style/images/icons/ppt.svg') !important;
}

.doc-list a[href*=".zip"]::before,
.doc-list a[href*=".rar"]::before,
.doc-list a[href*=".7z"]::before,
.doc-list a[href*=".ZIP"]::before,
.doc-list a[href*=".RAR"]::before,
.content-card ul li a[href*=".zip"]::before,
.content-card ul li a[href*=".rar"]::before,
.content-card ul li a[href*=".7z"]::before,
.content-card ul li a[href*=".ZIP"]::before,
.content-card ul li a[href*=".RAR"]::before,
.content-card ol li a[href*=".zip"]::before,
.content-card ol li a[href*=".rar"]::before,
a.doc-zip::before,
a.doc-rar::before {
  background-image: url('/data/style/images/icons/zip.svg') !important;
}

.doc-list a[href*=".txt"]::before,
.doc-list a[href*=".TXT"]::before,
.content-card ul li a[href*=".txt"]::before,
.content-card ul li a[href*=".TXT"]::before,
.content-card ol li a[href*=".txt"]::before,
a.doc-txt::before {
  background-image: url('/data/style/images/icons/txt.svg') !important;
}

.doc-list a[href*=".sig"]::before,
.doc-list a[href*=".p7s"]::before,
.content-card ul li a[href*=".sig"]::before,
.content-card ul li a[href*=".p7s"]::before,
.content-card ol li a[href*=".sig"]::before,
a.doc-sig::before {
  background-image: url('/data/style/images/icons/sig.svg') !important;
}

/* 3. Live Editor Icon Previews inside TinyMCE iframe (для всех списков) */
body.mce-content-body ul li a,
body.mce-content-body ol li a {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
  text-decoration: none !important;
  color: #1e40af !important;
}

body.mce-content-body ul li a::before,
body.mce-content-body ol li a::before {
  content: '' !important;
  display: block !important;
  width: 32px !important;
  height: 38px !important;
  min-width: 32px !important;
  margin: 0 !important;
  background-image: url('/data/style/images/icons/url.svg') !important;
  background-repeat: no-repeat !important;
  background-position: top center !important;
  background-size: contain !important;
  flex-shrink: 0 !important;
}

body.mce-content-body ul li a[href*=".pdf"]::before,
body.mce-content-body ol li a[href*=".pdf"]::before,
body.mce-content-body ul li a[href*=".PDF"]::before,
body.mce-content-body ol li a[href*=".PDF"]::before {
  background-image: url('/data/style/images/icons/pdf.svg') !important;
}
body.mce-content-body ul li a[href*=".doc"]::before,
body.mce-content-body ul li a[href*=".docx"]::before,
body.mce-content-body ol li a[href*=".doc"]::before,
body.mce-content-body ol li a[href*=".docx"]::before {
  background-image: url('/data/style/images/icons/doc.svg') !important;
}
body.mce-content-body ul li a[href*=".xls"]::before,
body.mce-content-body ul li a[href*=".xlsx"]::before,
body.mce-content-body ol li a[href*=".xls"]::before,
body.mce-content-body ol li a[href*=".xlsx"]::before {
  background-image: url('/data/style/images/icons/xls.svg') !important;
}
body.mce-content-body ul li a[href*=".ppt"]::before,
body.mce-content-body ul li a[href*=".pptx"]::before,
body.mce-content-body ol li a[href*=".ppt"]::before,
body.mce-content-body ol li a[href*=".pptx"]::before {
  background-image: url('/data/style/images/icons/ppt.svg') !important;
}
body.mce-content-body ul li a[href*=".zip"]::before,
body.mce-content-body ul li a[href*=".rar"]::before,
body.mce-content-body ol li a[href*=".zip"]::before,
body.mce-content-body ol li a[href*=".rar"]::before {
  background-image: url('/data/style/images/icons/zip.svg') !important;
}
body.mce-content-body ul li a[href*=".txt"]::before,
body.mce-content-body ol li a[href*=".txt"]::before {
  background-image: url('/data/style/images/icons/txt.svg') !important;
}
body.mce-content-body ul li a[href*=".sig"]::before,
body.mce-content-body ol li a[href*=".sig"]::before {
  background-image: url('/data/style/images/icons/sig.svg') !important;
}

/* ==========================================================================
   Universal Image Lightbox
   ========================================================================== */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.image-lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.image-lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox-overlay.is-open .image-lightbox-content {
  transform: scale(1);
}

.image-lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  background: #ffffff;
}

.image-lightbox-caption {
  margin-top: 10px;
  color: #f1f5f9;
  font-size: 14px;
  text-align: center;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.image-lightbox-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.image-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: #ef4444;
  transform: scale(1.1);
}

.lightbox-hoverable {
  cursor: zoom-in !important;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-hoverable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.zoom-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 58, 138, 0.08);
  color: #1e40af;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
  pointer-events: none;
}

.image-lightbox-caption {
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  flex: 1;
  text-align: left;
}

.image-lightbox-counter {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.7);
  padding: 3px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

.image-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000002;
  transition: all 0.2s ease;
  padding: 0;
}

.image-lightbox-close:hover {
  background: rgba(239, 68, 68, 0.95);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.08);
}

.image-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000001;
  transition: all 0.2s ease;
  user-select: none;
  padding: 0;
}

.image-lightbox-nav:hover {
  background: rgba(2, 132, 199, 0.95);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-50%) scale(1.08);
}

.image-lightbox-prev {
  left: 24px;
}

.image-lightbox-next {
  right: 24px;
}

@media (max-width: 768px) {
  .image-lightbox-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
  .image-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
    background: rgba(15, 23, 42, 0.8);
  }
  .image-lightbox-prev {
    left: 10px;
  }
  .image-lightbox-next {
    right: 10px;
  }
}

.lightbox-hoverable {
  cursor: zoom-in !important;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-hoverable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.zoom-hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 58, 138, 0.08);
  color: #1e40af;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
  pointer-events: none;
}

/* ==========================================================================
   Document Page & Interactive Accordion Styles
   ========================================================================== */

.docs-header-intro {
  margin-bottom: 24px;
}

.docs-intro-text h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.docs-intro-text p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Toolbar: Search & Action buttons */
.docs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.docs-search-box {
  position: relative;
  flex-grow: 1;
  min-width: 260px;
}

.docs-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.docs-search-input {
  width: 100%;
  padding: 11px 38px 11px 38px;
  font-size: 14.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #ffffff;
  color: var(--text-main);
  transition: var(--transition);
  outline: none;
}

.docs-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.docs-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.docs-search-clear:hover {
  color: #ef4444;
  background-color: #fee2e2;
}

.docs-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-dark);
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-toggle-all:hover {
  background-color: #eff6ff;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-toggle-all svg {
  flex-shrink: 0;
}

.docs-search-feedback {
  margin-top: 14px;
  padding: 12px 18px;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 14px;
  color: #1e40af;
}

/* ==========================================================================
   Accordion Container & Cards
   ========================================================================== */
.docs-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 35px;
}

.doc-accordion {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.doc-accordion:hover {
  border-color: #94a3b8;
  border-left-color: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(30, 64, 175, 0.1);
  transform: translateY(-2px);
}

.doc-accordion.is-open {
  border-color: #93c5fd;
  border-left-color: var(--primary);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12);
}

/* Accordion Header */
.doc-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(to right, #f8fafc, #ffffff);
  border: none;
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: background 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.doc-accordion-header:hover {
  background: linear-gradient(to right, #eff6ff, #f8fafc);
}

.doc-accordion.is-open .doc-accordion-header {
  background: linear-gradient(to right, #eff6ff, #f0f7ff);
  border-bottom: 1px solid #dbeafe;
}

.doc-accordion-header-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.doc-accordion-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-accordion-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  line-height: 1.3;
}

.doc-accordion-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.doc-accordion-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.doc-accordion-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.doc-accordion.is-open .doc-accordion-badge {
  background: #dbeafe;
  color: #1e40af;
}

/* Pure CSS arrow */
.doc-accordion-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.doc-accordion-arrow::after {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2.5px solid #64748b;
  border-bottom: 2.5px solid #64748b;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.doc-accordion-header:hover .doc-accordion-arrow {
  background-color: #e2e8f0;
}

.doc-accordion-header:hover .doc-accordion-arrow::after {
  border-color: var(--primary);
}

.doc-accordion.is-open .doc-accordion-arrow {
  background-color: #dbeafe;
}

.doc-accordion.is-open .doc-accordion-arrow::after {
  transform: rotate(-135deg) translateY(-2px);
  border-color: var(--primary);
}

/* Accordion Animated Body */
.doc-accordion-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.doc-accordion.is-open .doc-accordion-body {
  opacity: 1;
}

.doc-accordion-content-inner {
  padding: 22px 24px;
  background-color: #ffffff;
}

.doc-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-list-subheading {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  padding: 14px 4px 6px 4px;
  border-bottom: 2px solid #e2e8f0;
  margin-top: 10px;
  margin-bottom: 4px;
}

.doc-list-subheading:first-child {
  margin-top: 0;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.doc-card:hover {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.08);
  transform: translateY(-1px);
}

.doc-file-icon {
  width: 32px;
  height: 38px;
  flex-shrink: 0;
  display: block;
}

.doc-card-content {
  flex-grow: 1;
  min-width: 0;
}

.doc-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.doc-card:hover .doc-card-title {
  color: var(--primary);
}

.doc-card-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.doc-format-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.doc-tag-pdf {
  background-color: #fee2e2;
  color: #b91c1c;
}

.doc-tag-word {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.doc-tag-excel {
  background-color: #dcfce7;
  color: #15803d;
}

.doc-tag-ext {
  background-color: #f1f5f9;
  color: #475569;
}

.doc-card-action {
  flex-shrink: 0;
}

.doc-card-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.doc-card:hover .doc-card-btn {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .doc-accordion-header {
    padding: 14px 16px;
  }
  .doc-accordion-subtitle {
    display: none;
  }
  .doc-accordion-title {
    font-size: 15px;
  }
  .doc-accordion-badge {
    font-size: 11.5px;
    padding: 3px 8px;
  }
  .doc-card {
    padding: 12px 14px;
    gap: 12px;
  }
  .doc-card-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}


/* Детальная страница новости: иллюстрация в левом верхнем углу */
.news-article-thumb {
  float: left;
  max-width: 360px;
  width: 42%;
  margin: 0 24px 18px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-article-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.news-article-thumb-link {
  display: block;
  text-decoration: none;
  cursor: zoom-in;
}

.news-article-thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

@media (max-width: 768px) {
  .news-article-thumb {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 20px 0;
  }
}


/* ==========================================================================
   Фотогалерея-карусель в новостях (News Gallery Carousel)
   ========================================================================== */
.news-gallery-section {
  clear: both;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.news-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.news-gallery-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.news-gallery-title-icon {
  width: 22px;
  height: 22px;
  color: #0284c7;
  flex-shrink: 0;
}

.news-gallery-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

.news-gallery-nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-gallery-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.news-gallery-btn svg {
  width: 18px;
  height: 18px;
}

.news-gallery-btn:hover:not(:disabled) {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
  transform: scale(1.05);
}

.news-gallery-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.news-gallery-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.news-gallery-track-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
}

/* Gradient fade on edges */
.news-gallery-track-container::before,
.news-gallery-track-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.news-gallery-track-container::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.news-gallery-track-container::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.news-gallery-track-container.fade-left::before {
  opacity: 1;
}

.news-gallery-track-container.fade-right::after {
  opacity: 1;
}

.news-gallery-track {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 6px 2px 12px 2px;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbars completely across browsers */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.news-gallery-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Exactly 4 cards visible at a time */
.news-gallery-card {
  flex: 0 0 calc((100% - 3 * 14px) / 4);
  width: calc((100% - 3 * 14px) / 4);
  min-width: 140px;
  height: 145px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: block;
  text-decoration: none;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.news-gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

.news-gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.news-gallery-card:hover img {
  transform: scale(1.05);
}

.news-gallery-card-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}

.news-gallery-card-badge svg {
  width: 14px;
  height: 14px;
}

.news-gallery-card:hover .news-gallery-card-badge {
  opacity: 1;
  background: rgba(2, 132, 199, 0.9);
}

@media (max-width: 992px) {
  .news-gallery-card {
    flex: 0 0 calc((100% - 2 * 12px) / 3);
    width: calc((100% - 2 * 12px) / 3);
    min-width: 130px;
    height: 135px;
  }
}

@media (max-width: 640px) {
  .news-gallery-card {
    flex: 0 0 72%;
    width: 72%;
    min-width: 200px;
    height: 150px;
  }
}

/* Accessibility / BVI compatibility */
html.bvi-images-off .news-gallery-section {
  display: none !important;
}

html.bvi-theme-black .news-gallery-track-container::before {
  background: linear-gradient(to right, #000000 0%, rgba(0, 0, 0, 0) 100%);
}
html.bvi-theme-black .news-gallery-track-container::after {
  background: linear-gradient(to left, #000000 0%, rgba(0, 0, 0, 0) 100%);
}
html.bvi-theme-blue .news-gallery-track-container::before {
  background: linear-gradient(to right, #9dd1ff 0%, rgba(157, 209, 255, 0) 100%);
}
html.bvi-theme-blue .news-gallery-track-container::after {
  background: linear-gradient(to left, #9dd1ff 0%, rgba(157, 209, 255, 0) 100%);
}

/* Responsive video & iframe styling (prevents Firefox iframe scrollbars) */
iframe {
  border: 0;
  max-width: 100%;
}

.content-card iframe {
  border: 0;
  max-width: 100%;
}

.content-card iframe[src*="rutube.ru"],
.content-card iframe[src*="youtube.com"],
.content-card iframe[src*="vk.com"] {
  border: 0 !important;
  max-width: 100%;
}
