/**
 * Bezhta MO — компоненты страниц (формы, документы, крошки, a11y).
 */

:root {
  --bezhta-primary: #0d5c3d;
  --bezhta-primary-dark: #084530;
  --bezhta-accent: #1a7a52;
  --bezhta-muted: #5c5c5c;
  --bezhta-border: #dde3e8;
  --bezhta-bg: #f4f6f8;
  --bezhta-radius: 8px;
}

/* Базовая типографика: нейтрально и официально */
body.bezhta-state-theme {
  font-family: "Roboto", "PT Sans", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #2b2b2b;
}

.bezhta-state-theme h1,
.bezhta-state-theme h2,
.bezhta-state-theme h3,
.bezhta-state-theme h4,
.bezhta-state-theme h5,
.bezhta-state-theme h6,
.bezhta-state-theme .site-title {
  font-family: "Roboto", "PT Sans", "Segoe UI", Arial, sans-serif;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #212121;
}

.a11y-panel {
  background: #fff;
  border-bottom: 1px solid var(--bezhta-border);
  padding: 0.75rem 0;
}

.a11y-panel__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}

.a11y-panel__group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.a11y-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--bezhta-border);
  background: var(--bezhta-bg);
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
}

.a11y-btn[aria-pressed="true"] {
  background: var(--bezhta-primary);
  color: #fff;
  border-color: var(--bezhta-primary);
}

body.a11y-font-large { font-size: 1.125rem; }
body.a11y-font-xlarge { font-size: 1.25rem; }
body.a11y-theme-dark {
  background: #111;
  color: #f0f0f0;
}
body.a11y-theme-contrast {
  background: #fff;
  color: #000;
}

.bezhta-page-content {
  padding: 1.5rem 0 2.5rem;
}

.breadcrumbs {
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  color: var(--bezhta-muted);
}

.breadcrumbs a {
  color: var(--bezhta-muted);
  text-decoration: none;
}

.page-content { max-width: 75ch; }
.muted { color: var(--bezhta-muted); }

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: var(--bezhta-radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--bezhta-primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--bezhta-primary-dark);
  color: #fff;
}

.doc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #fff;
  border-radius: var(--bezhta-radius);
}

.doc-filter label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-list__item {
  border-bottom: 1px solid var(--bezhta-border);
}

.doc-list__item a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0;
  text-decoration: none;
}

.doc-list__date {
  color: var(--bezhta-muted);
  font-size: 0.875rem;
}

.doc-files {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.doc-file {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: var(--bezhta-radius);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.doc-file__ext {
  background: var(--bezhta-primary);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.contacts-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contacts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contacts-list dt {
  font-weight: 600;
  margin-top: 1rem;
}

.contacts-list dd {
  margin: 0.25rem 0 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-grid__item {
  border-radius: var(--bezhta-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Главная: баннер новостей */
.uk-slideshow[uk-slideshow*="ratio: 7:3"] {
  border-radius: var(--bezhta-radius, 8px);
  overflow: hidden;
}

.uk-slideshow[uk-slideshow*="ratio: 7:3"] .uk-slideshow-items {
  border-radius: inherit;
}

.bezhta-gallery-slider {
  margin-top: 1rem;
}

.bezhta-gallery-slider__item {
  display: flex;
  flex-direction: column;
  border-radius: var(--bezhta-radius, 8px);
  overflow: hidden;
  background: #ececec;
  text-decoration: none;
}

.bezhta-gallery-slider__item img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.bezhta-gallery-slider__caption {
  display: block;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: #333;
  background: #fff;
}

.home .bezhta-portals-bar {
  margin-top: 2.5rem;
}

/* Видеообзоры (правая колонка главной) */
.bezhta-video-reviews {
  padding: 1rem 1.25rem;
}

.bezhta-video-review--stacked + .bezhta-video-review--stacked {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e5e5e5;
}

.bezhta-video-review__title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.35;
}

.bezhta-video-review__embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--bezhta-radius, 8px);
  background: #111;
}

.bezhta-video-review__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.bezhta-video-review__preview {
  position: relative;
  display: block;
  border-radius: var(--bezhta-radius, 8px);
  overflow: hidden;
}

.bezhta-video-review__preview img {
  display: block;
  width: 100%;
  height: auto;
}

.bezhta-video-review__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3rem;
  height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%;
  background: rgba(220, 0, 0, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.bezhta-video-review__play::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -0.45rem 0 0 -0.3rem;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent #fff;
}

.appeal-form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
  margin-top: 1.5rem;
}

.appeal-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 500;
}

.appeal-form input,
.appeal-form textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--bezhta-border);
  border-radius: var(--bezhta-radius);
}

.appeal-form .checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
}

.req { color: #c0392b; }

.notice {
  padding: 1rem;
  border-radius: var(--bezhta-radius);
  margin: 1rem 0;
}

.notice--success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
}

.notice--error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
}

.sitemap-html ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
}

/* Главная: сетка новостей 3x3 */
.bezhta-front-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bezhta-front-news-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: var(--bezhta-radius, 8px);
  overflow: hidden;
  height: 100%;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bezhta-front-news-card:hover,
.bezhta-front-news-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.bezhta-front-news-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #333;
  height: 100%;
  padding: 0.9rem;
}

.bezhta-front-news-card__img {
  margin: -0.9rem -0.9rem 0.75rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ececec;
}

.bezhta-front-news-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bezhta-front-news-card__date {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  color: #777;
}

.bezhta-front-news-card__title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.35;
  color: #1f1f1f;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bezhta-front-news-card__excerpt {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: auto;
}

@media (max-width: 1023px) {
  .bezhta-front-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .bezhta-front-news-grid {
    grid-template-columns: 1fr;
  }
}

.bezhta-front-pagination {
  margin-top: 1.25rem;
  text-align: center;
}

.bezhta-front-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.35rem 0.35rem 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  background: #fff;
}

.bezhta-front-pagination .page-numbers.current {
  background: var(--bezhta-primary);
  color: #fff;
  border-color: var(--bezhta-primary);
}

/* Bezhta green for State UIkit buttons */
.bezhta-state-theme {
  --color-main-hsl: hsl(152, 75%, 21%);
  --color-hover-hsl: hsl(152, 65%, 28%);
}

.bezhta-state-theme .uk-button-main {
  background-color: var(--bezhta-primary);
}

.bezhta-state-theme .uk-button-main:hover {
  background-color: var(--bezhta-primary-dark);
}

.bezhta-emblem svg {
  display: block;
}

/* Декоративная полоса (шапка/подвал) — отключена */
.bg-ornament {
  display: none !important;
}

/* --- Header (как State / Тляратинский район) --- */
.bezhta-state-theme .site-header {
  background: #fff;
}

.bezhta-state-theme .site-header .uk-section {
  padding-top: 0;
  padding-bottom: 0;
}

.bezhta-header__logo .custom-logo-link {
  display: block;
}

.bezhta-header__logo .custom-logo,
.bezhta-header__logo img.custom-logo {
  width: 10rem;
  max-width: 100%;
  height: auto;
  padding: 1rem 0;
}

.bezhta-header__region {
  font-size: 0.8125rem;
  color: #787878;
}

.bezhta-state-theme .site-title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.125rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  font-weight: 500;
}

.bezhta-state-theme .site-title a {
  color: #333;
  text-decoration: none;
}

.bezhta-state-theme .site-description {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: #555;
}

.bezhta-header__actions {
  min-width: 12rem;
}

.bezhta-header__btn-row {
  width: 100%;
  max-width: 280px;
}

.bezhta-header__actions.uk-text-right .bezhta-header__btn-row {
  margin-left: auto;
}

.bezhta-header__btn {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  width: 100%;
  max-width: none;
  margin-left: 0;
  box-sizing: border-box;
  display: block;
  text-align: center;
}

.bezhta-header__btn .icon-blind {
  margin-left: 0.35rem;
}

.bezhta-header__actions--icons {
  align-items: center;
  text-align: center;
  width: 100%;
}

.bezhta-header__actions--icons .bezhta-header__btn-row {
  margin-left: auto;
  margin-right: auto;
}

.bezhta-header__actions--icons .bezhta-header__btn {
  margin-left: 0;
  margin-right: 0;
}

.bezhta-header__social {
  text-align: right;
  width: 100%;
}

.bezhta-header__actions--icons .bezhta-header__social {
  display: flex;
  justify-content: center;
  text-align: center;
  max-width: 280px;
}

.bezhta-header__social a {
  color: #787878;
  font-size: 0.8125rem;
  text-decoration: none;
}

.bezhta-social--icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.bezhta-social--icons .bezhta-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #787878;
  transition: color 0.2s;
}

.bezhta-social--icons .bezhta-social__link:hover {
  color: var(--bezhta-primary);
}

.bezhta-social--icons .bezhta-social__icon-img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}

/* Navbar */
.bezhta-navbar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.bezhta-navbar-wrap > .uk-navbar {
  flex: 1 1 auto;
  min-width: 0;
}

.bezhta-navbar__menu {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.bezhta-state-theme .uk-navbar-nav > li > a {
  font-size: 0.8875rem;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  padding: 0 0.55rem;
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .bezhta-state-theme .uk-navbar-nav > li > a {
    padding: 0 0.45rem;
  }
}

.bezhta-navbar__search {
  flex: 0 0 auto;
  width: 11rem;
  max-width: 30%;
}

.bezhta-search-form {
  position: relative;
}

.bezhta-search-form .uk-search-input {
  background: #fff;
  border: 1px solid #ccc;
  height: 2.25rem;
  font-size: 0.875rem;
}

.bezhta-navbar__toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 959px) {
  .bezhta-header__btn-row {
    max-width: none;
  }

  .bezhta-header__btn {
    max-width: none;
  }

  .bezhta-header__actions {
    align-items: stretch !important;
    text-align: left !important;
  }

  .bezhta-header__actions:not(.bezhta-header__actions--icons) .bezhta-header__social {
    text-align: left;
  }

  .bezhta-header__actions--icons .bezhta-header__social {
    max-width: none;
  }
}

@media (max-width: 639px) {
  .bezhta-state-theme .site-title {
    font-size: 1.125rem;
  }
}

/* --- Footer (Тляратинский район / State) --- */
.bezhta-footer.site-footer {
  margin-top: 2rem;
}

.bezhta-footer__section,
.bezhta-footer .uk-section-grey.bezhta-footer__section {
  background: #f8f8f8;
  padding: 2rem 0;
}

.bezhta-footer__grid {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .bezhta-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bezhta-footer__col {
    padding: 0 1.5rem;
    border-right: 1px solid #e5e5e5;
  }

  .bezhta-footer__col:nth-child(2n) {
    border-right: none;
  }
}

@media (min-width: 960px) {
  .bezhta-footer__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .bezhta-footer__col {
    border-right: 1px solid #e5e5e5;
  }

  .bezhta-footer__col:nth-child(2n) {
    border-right: 1px solid #e5e5e5;
  }

  .bezhta-footer__col:last-child {
    border-right: none;
  }
}

.bezhta-footer__col {
  padding: 0.5rem 1.25rem 1rem;
  font-size: 0.9375rem;
  color: #333;
}

.bezhta-footer__col--brand {
  padding-left: 0;
}

.bezhta-footer__logo {
  margin-bottom: 0.75rem;
}

.bezhta-footer__logo img,
.bezhta-footer__logo-img {
  max-width: 140px;
  height: auto;
  display: block;
}

.bezhta-footer__official {
  margin: 0;
  line-height: 1.45;
  font-size: 0.875rem;
  color: #444;
}

.bezhta-footer__label {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: #222;
}

.bezhta-footer__text {
  margin: 0;
  line-height: 1.5;
}

.bezhta-footer__text--muted {
  color: #888;
}

.bezhta-footer__contacts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bezhta-footer__contacts li {
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

/* Одна иконка через ::before (шрифт icomoon из style.css темы State) */
.bezhta-contact-link {
  font-family: inherit;
  text-decoration: none;
  color: #333;
}

.bezhta-contact-link:hover {
  color: var(--bezhta-primary);
  text-decoration: underline;
}

.bezhta-footer__contacts .bezhta-contact-link::before,
.bezhta-contacts .bezhta-contact-link::before {
  font-family: 'icomoon', sans-serif !important;
  font-style: normal;
  font-weight: normal;
  margin-right: 4px;
  vertical-align: middle;
  font-size: 1rem;
}

.bezhta-footer__contacts a {
  color: #333;
  text-decoration: none;
}

.bezhta-footer__contacts a:hover {
  color: var(--bezhta-primary);
  text-decoration: underline;
}

.bezhta-footer__hint {
  font-size: 0.8125rem;
  color: #777;
  margin-left: 0.25rem;
}

.bezhta-footer__info.site-info {
  background: #efefef;
  padding: 0.75rem 0;
  font-size: 0.8125rem;
  color: #555;
}

.bezhta-footer__info-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.bezhta-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

.bezhta-footer__legal a {
  color: #555;
  text-decoration: underline;
}

.bezhta-footer__legal a:hover {
  color: var(--bezhta-primary);
}

.bezhta-footer__grid--widgets .widget-title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.bezhta-footer__grid--widgets .widget {
  margin-bottom: 0;
}

/* Карта на странице контактов */
.bezhta-contacts-map {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bezhta-border, #dde3e8);
}

.contacts-grid .bezhta-contacts-map {
  /* На странице «Контакты» карта в правой колонке */
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.bezhta-contacts-map__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #222;
}

.bezhta-contacts-map__embed {
  position: relative;
  width: 100%;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--bezhta-radius, 8px);
  background: #e8e8e8;
}

.bezhta-contacts-map__embed iframe {
  display: block;
  width: 100% !important;
  min-height: 360px;
  border: 0;
}

/* Слайдер официальных ресурсов (перед подвалом) */
.bezhta-portals-bar {
  padding: 1.5rem 0 1.25rem;
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

.bezhta-portals-bar__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #333;
  padding: 0.5rem;
  height: 100%;
  box-sizing: border-box;
}

.bezhta-portals-bar__link:hover {
  color: var(--bezhta-primary);
}

.bezhta-portals-bar__img {
  width: auto;
  max-width: 100px;
  max-height: 100px;
  height: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.bezhta-portals-bar__title {
  display: block;
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 500;
  max-width: 180px;
}

.bezhta-portals-bar .uk-slider-items > li {
  padding: 0 0.5rem;
}

.bezhta-portals-bar__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.bezhta-portals-bar__list {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0.5rem;
  min-width: min-content;
}

.bezhta-portals-bar__item {
  flex: 0 0 160px;
  max-width: 180px;
}
