/*
 * Nikol-N.bg: Cassiopeia child "cassiopeia_nikoln". Recreates the old Purity III look.
 * Loaded after Cassiopeia's template.css (asset "template.user").
 * Sections: 1 base, 2 header, 3 banner, 4 layout + sidebar card, 5 accordion menu,
 *           6 content (ported from purity_iii/css/custom.css), 7 gallery, 8 footer,
 *           9 modules (map, contact form), 10 utilities / BS3 compatibility.
 */

/* ---------- 1. base ---------- */
:root {
  --nn-blue: #0077bb;
  --nn-blue-dark: #0067a2;
  --nn-blue-darker: #00466e;
  --nn-nav-text: #bbe6ff;
  --nn-text: #444444;
  --nn-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nn-menu-text: #0062a3;
  --cassiopeia-color-primary: #0077bb;
  --cassiopeia-color-link: #0077bb;
  --cassiopeia-color-hover: #00466e;
  --link-color: #0077bb;
  --link-color-rgb: 0, 119, 187;
  --link-hover-color: #00466e;
  --link-hover-color-rgb: 0, 70, 110;
  --bs-link-color: #0077bb;
  --bs-link-color-rgb: 0, 119, 187;
  --bs-link-hover-color: #00466e;
  --bs-link-hover-color-rgb: 0, 70, 110;
  --bs-body-font-family: var(--nn-font);
  --bs-body-color: #444444;
  --body-color: #444444;
  --body-font-family: var(--nn-font);
}

body.nn {
  font-family: var(--nn-font);
  font-size: 14px;
  line-height: 1.428571;
  color: var(--nn-text);
  background: #fff;
}

a { color: var(--nn-blue); text-decoration: none; }
a:hover,
a:focus { color: var(--nn-blue-darker); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--nn-font);
  font-weight: 500;
  line-height: 1.1;
  color: inherit;
  margin-top: 20px;
  margin-bottom: 10px;
}
h1 { font-size: 42px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 18px; font-weight: bold; color: #07b; padding-left: 10px; }
h5 { font-size: 16px; font-weight: bold; padding-left: 20px; }
h6 { font-size: 14px; font-weight: bold; padding-left: 25px; }
p { margin: 0 0 10px; }

@media (min-width: 1200px) {
  body.nn .container { max-width: 1170px; }
}
body.nn .container { --gutter-x: 30px; --bs-gutter-x: 30px; }

.nn-skip {
  position: absolute; left: 10px; top: 10px; z-index: 2000;
  background: #fff; padding: 6px 12px;
}

/* ---------- 2. header ---------- */
.nn-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--nn-blue);
  border-bottom: 1px solid var(--nn-blue-dark);
}
.nn-header__inner {
  display: flex;
  align-items: stretch;
  height: 55px;
}
.nn-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 55px;
  padding: 0 10px;
  background: #fff;
}
.nn-logo img { display: block; height: 55px; width: auto; }

.nn-mainnav .mod-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nn-mainnav .mod-menu > li { padding: 0; }
.nn-mainnav .mod-menu > li.active > a { text-decoration: none; }
.nn-mainnav .mod-menu > li > a,
.nn-mainnav .mod-menu > li > span {
  display: block;
  color: var(--nn-nav-text);
  text-transform: uppercase;
  font-size: 14px;
  text-decoration: none;
}
.nn-mainnav .mod-menu > li > a:hover,
.nn-mainnav .mod-menu > li > a:focus,
.nn-mainnav .mod-menu > li.active > a {
  color: #fff;
  text-decoration: none;
}

@media (min-width: 992px) {
  .nn-mainnav { flex: 1 1 auto; margin-left: 20px; }
  .nn-mainnav .offcanvas-body { flex-grow: 1; }
  .nn-mainnav .mod-menu { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 0 20px; }
  .nn-mainnav .mod-menu > li > a { line-height: 55px; }
  .nn-mainnav .mod-menu > li > a:hover,
  .nn-mainnav .mod-menu > li > a:focus,
  .nn-mainnav .mod-menu > li.active > a { box-shadow: inset 0 -2px 0 #fff; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nn-mainnav .mod-menu { gap: 0 14px; }
  .nn-mainnav .mod-menu > li > a { font-size: 13px; }
}

/* search (mod_finder): a 55px square button; the field opens when focused */
.nn-search { margin-left: auto; display: flex; }
.nn-search form { margin: 0; }
.nn-search .mod-finder__search,
.nn-search .input-group {
  display: flex;
  flex-wrap: nowrap;
  height: 55px;
  background: var(--nn-blue-dark);
  border-left: 1px solid var(--nn-blue-dark);
  border-right: 1px solid var(--nn-blue-dark);
}
.nn-search input.form-control {
  width: 0;
  min-width: 0;
  padding: 0;
  height: 55px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  transition: width .2s, padding .2s;
}
.nn-search input.form-control::placeholder { color: var(--nn-nav-text); opacity: .8; }
.nn-search form:focus-within input.form-control,
.nn-search form.nn-open input.form-control { width: 180px; padding: 0 12px; }
.nn-search button,
body.nn .nn-search .btn {
  width: 56px;
  height: 55px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nn-nav-text);
  font-size: 0;
}
/* Cassiopeia makes this button a flex box aligned to the start: centre the icon like the old site */
.nn-search button,
body.nn .nn-search .btn { display: flex; align-items: center; justify-content: center; }
.nn-search button [class^="icon-"],
.nn-search button [class*=" icon-"] { font-size: 15px; margin: 0; }
.nn-search .mod-finder__search.input-group button .icon-search { margin: 0; } /* beats mod_finder's margin-inline-end */
.nn-search button:hover,
.nn-search button:focus { color: #fff; background: var(--nn-blue-darker); }
.nn-search .awesomplete > ul { z-index: 1100; }

/* toggles (below lg) */
.nn-toggle {
  flex: 0 0 55px;
  width: 55px;
  height: 55px;
  border: 0;
  border-right: 1px solid var(--nn-blue-dark);
  background: transparent;
  color: var(--nn-nav-text);
  font-size: 18px;
}
.nn-toggle--side { border-right: 0; border-left: 1px solid var(--nn-blue-dark); }
.nn-toggle:hover,
.nn-toggle:focus { background: var(--nn-blue-dark); color: #fff; }

@media (max-width: 991.98px) {
  .nn-header__inner { padding-left: 0; padding-right: 0; max-width: none; }
  .nn-logo { margin-left: 0; }
  .nn-mainnav.offcanvas-lg { --bs-offcanvas-width: 290px; background: var(--nn-blue); color: #fff; }
  .nn-mainnav .offcanvas-header { border-bottom: 1px solid var(--nn-blue-dark); }
  .nn-mainnav .offcanvas-body { padding: 0; }
  .nn-mainnav .mod-menu > li > a { padding: 14px 20px; border-top: 1px solid var(--nn-blue-dark); }
  .nn-mainnav .mod-menu > li:first-child > a { border-top: 0; }
  .nn-mainnav .mod-menu > li.active > a { background: var(--nn-blue-dark); }
  .nn-offcanvas-title { font-size: 18px; text-transform: uppercase; }
  .nn-sidebar.offcanvas-lg { --bs-offcanvas-width: 310px; }
  .nn-sidebar .offcanvas-header { background: var(--nn-blue); color: #fff; }
  .nn-sidebar .offcanvas-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
  .nn-sidebar .moduletable > h3 { display: none; }
}
@media (max-width: 399.98px) {
  .nn-logo { padding: 0 4px; }
  .nn-logo img { height: 46px; }
  .nn-toggle { flex-basis: 46px; width: 46px; }
  .nn-search button { width: 46px; }
}

/* ---------- 3. banner (slideshow position: modules 267 static / 282 video) ---------- */
.nn-banner {
  background: #f7f7f7;
  border-bottom: 1px solid #eeeeee;
  overflow: hidden;
}
.nn-banner .mod-custom {
  position: relative;
  background-size: cover;
  background-position: center;
}
.nn-banner table { width: 100%; max-width: none; margin: 0; }
.nn-banner .mod-custom > p:last-child { margin-bottom: 0; }
.nn-banner table td { border: 0; height: auto; }
.nn-banner h2 { font-size: 35px; margin: 20px 0 10px; }
.nn-banner h4 { font-size: 18px; margin: 10px 0 10px; padding: 0; }
.nn-banner .section-videoheader h2 { margin: 30px 0 0; }
.nn-banner .section-videoheader h4 { margin: 0 0 25px; }
/* video header (module 282): always fill the 132px band, top part of the frame like before */
.nn-banner .video-container { height: 100%; }
.nn-banner .video-header { display: block; width: 100%; height: 132px; object-fit: cover; object-position: center top; }
@media (max-width: 767.98px) {
  .nn-banner h2 { font-size: 26px; margin-top: 8px; }
  .nn-banner h4 { font-size: 14px; padding: 0 10px; }
  .nn-banner .left { padding-left: 15px; }
  .nn-banner .right { padding-right: 15px; }
  .nn-banner .inline-left { padding-left: 15px; }
  .nn-banner .inline-right { padding-right: 15px; }
}

/* ---------- 4. layout + sidebar card ---------- */
.nn-main { padding-top: 10px; padding-bottom: 20px; }
.nn-content { padding-top: 20px; padding-bottom: 20px; min-width: 0; }
.nn-content img { max-width: 100%; height: auto; }
.nn-content a:not([class]) { text-decoration: none; }
.nn-content a:not([class]):hover,
.nn-content a:not([class]):focus { text-decoration: underline; }

@media (min-width: 992px) {
  .nn-main > .row { flex-wrap: nowrap; margin-left: 0; margin-right: 0; }
  .nn-sidebar-col { flex: 0 0 296px; max-width: 296px; width: 296px; padding: 0; margin-left: -21px; }
  .nn-content { flex: 1 1 auto; width: auto; max-width: none; padding-left: 20px; padding-right: 0; }
  .nn-sidebar {
    background: #fff;
    box-shadow: 0 0 9px rgba(0, 0, 0, .35);
    padding: 20px;
    margin-bottom: 20px;
  }
  .nn-sidebar .offcanvas-body { display: block; }
}

.nn-sidebar .moduletable { margin: 0; }
.nn-sidebar .moduletable > h3,
.nn-side-title {
  margin: 0;
  height: 48px;
  line-height: 48px;
  padding: 0 10px;
  text-align: center;
  color: #fff;
  font-size: 19px;
  font-weight: normal;
  text-transform: uppercase;
  background: #0077bb url("/images/water-surreal-background.jpg") center / cover no-repeat;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.nn-sidebar .nn-side-image { text-align: center; margin: 6px 0; }
.nn-sidebar .nn-side-image img { max-width: 210px; height: auto; }
.nn-sidebar .nn-side-image p { margin: 0; }

/* ---------- 5. accordion menu (html/mod_menu/accordion.php) ---------- */
.nn-accordion,
.nn-acc__sub { list-style: none; margin: 0; padding: 0; }
.nn-accordion li { padding: 0; }
.nn-accordion li.active > .nn-acc__row > a { text-decoration: none; }
.nn-acc__row { display: flex; align-items: center; transition: background-color .15s; }
.nn-acc__row > a,
.nn-acc__row > .nav-header,
.nn-acc__row > .separator {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  padding: 7px 3px 7px 5px;
  color: var(--nn-menu-text);
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
}
.nn-acc__row:hover { background: rgba(100, 188, 255, .25); }
.nn-acc__row > a:hover,
.nn-acc__row > a:focus { text-decoration: none; color: var(--nn-blue-darker); }
.nn-acc__count {
  flex: 0 0 auto;
  min-width: 24px;
  margin: 0 2px;
  padding: 1px 5px;
  border-radius: 9px;
  background: var(--nn-blue);
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
}
.nn-acc__toggle {
  flex: 0 0 22px;
  width: 22px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
}
.nn-acc__toggle::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--nn-menu-text);
  border-bottom: 2px solid var(--nn-menu-text);
  transform: rotate(-45deg);
  transition: transform .15s;
}
.nn-acc__item.open > .nn-acc__row > .nn-acc__toggle::before { transform: rotate(45deg); top: 8px; }
.nn-acc__item.level-1.open > .nn-acc__row { background: #eeeeee; }
.nn-acc__item.level-1.open > .nn-acc__row > a { color: #4e7676; }
.nn-acc__item.current > .nn-acc__row { background: rgba(100, 188, 255, .25); }
.nn-acc__item.current > .nn-acc__row > a { color: #4e7676; }

.nn-acc__sub .nn-acc__row > a,
.nn-acc__sub .nn-acc__row > .nav-header { font-size: 14px; }
.nn-acc__item.level-2 > .nn-acc__row { background: #deebff; padding-left: 10px; }
.nn-acc__item.level-2 > .nn-acc__row:hover { background: #c9ddfb; }
.nn-acc__item.level-2.open > .nn-acc__row > a { color: #4e7676; }
.nn-acc__item.level-3 > .nn-acc__row { background: #ebf3ff; padding-left: 28px; }
.nn-acc__item.level-3 > .nn-acc__row:hover { background: #d9e8fd; }
.nn-acc__item.level-3 > .nn-acc__row > a { font-size: 13px; padding-top: 6px; padding-bottom: 6px; }
.nn-acc__item.level-4 > .nn-acc__row { background: #f3f8ff; padding-left: 40px; }
.nn-acc__item.level-4 > .nn-acc__row > a { font-size: 13px; }

/* ---------- 6. content (ported from purity_iii/css/custom.css) ---------- */
.com-content-article .page-header h1,
.com-content-article .page-header h2,
.nn-gallery__title,
.com-content-category-blog > h1,
.com-content-category-blog > h2,
.article-title,
.category_title h2,
.page-subtitle {
  font-size: 28px;
  margin: 0 0 10px 0 !important;
  color: #0077bb;
}
.item_title { font-size: 20px; }

table { width: 100%; max-width: 1260px; border: none; }
table th {
  height: 25px;
  padding: 4px 6px;
  vertical-align: middle;
  text-align: center;
  border-top: 2px solid #c09853;
  border-bottom: 2px solid #c09853;
}
table td {
  height: 15px;
  padding: 2px 4px;
  vertical-align: middle;
  text-align: center;
  border-bottom: 1px solid #c09853;
}
blockquote { padding: 10px; margin: 0 0 20px; border-left: 5px solid #cccccc; }
blockquote p { font-size: 14px; font-weight: 300; line-height: 1.5; }

.masthead-text-and-shadow,
h2.masthead-text-and-shadow,
h4.masthead-text-and-shadow { color: #ffffff; text-shadow: #333333 .1em .1em .2em; }

.img-intro__left, .img-full__left { float: left; margin: 0 18px 9px 0; max-width: 50%; }
.img-intro__right, .img-full__right { float: right; margin: 0 0 9px 18px; max-width: 50%; }
/* article/intro images: Joomla 6 writes the float as a class (legacy "left"/"right" or "float-start"/"float-end") */
/* like J3 "pull-left item-image": float at natural size (wide images end up full width) */
figure.item-image.left, .item-image.float-start { float: left; margin: 0 18px 9px 0; }
figure.item-image.right, .item-image.float-end { float: right; margin: 0 0 9px 18px; }
figure.item-image img { max-width: 100%; height: auto; }

/* banner table cells of module 267 (scoped: figure.left/.right are image floats now) */
td.left { line-height: 10px; color: #fff; text-align: left; padding: 2px 0 0 65px; border: none; }
td.right { line-height: 10px; color: #fff; text-align: right; padding: 2px 65px 0 0; border: none; }
.left-title { width: 60%; text-align: center; border: none; }
.right-title { width: 40%; text-align: center; border: none; }

.dl-horizontal dd { margin-left: 40px; }
.dl-horizontal dt { width: 30px; }
.btn-back { color: #fff; background-color: #0099cc; border-color: #0086b3; width: 100%; }
.btn-back:hover, .btn-back:focus { color: #fff; background-color: #0086b3; }
.item-page { margin-bottom: 10px; }
.error { color: red; }
.btn-map { margin: 1px; }

/* buttons as in Bootstrap 3 */
body.nn .btn { font-size: 14px; border-radius: 4px; }
body.nn .btn-info { color: #fff; background-color: #5bc0de; border-color: #46b8da; padding: 6px 8px; }
body.nn .btn-info:hover,
body.nn .btn-info:focus { color: #fff; background-color: #31b0d5; border-color: #269abc; text-decoration: none; }
body.nn .btn-default { color: #333; background-color: #fff; border-color: #ccc; }
body.nn .btn-primary { color: #fff; background-color: #0077bb; border-color: #0067a2; }
body.nn .btn-primary:hover,
body.nn .btn-primary:focus { color: #fff; background-color: #00609a; border-color: #00466e; }
body.nn .btn-primary:disabled { opacity: .55; }

/* ---------- 7. gallery (html/com_content/category/gallery.php) ---------- */
.nn-gallery__list { margin: 20px 0 0; padding: 0; }
.nn-gallery__item { display: flex; align-items: flex-start; gap: 38px; padding: 10px 0 40px; }
.nn-gallery__img { flex: 0 0 39%; max-width: 39%; margin: 0; text-align: center; }
.nn-gallery__img a { display: inline-block; }
.nn-gallery__img img { max-width: 100%; height: auto; }
.nn-gallery__body { flex: 1 1 auto; min-width: 0; }
h2.nn-gallery__item-title { font-size: 20px; margin: 0 0 12px; }
.nn-gallery__item-title a { color: #0077bb; }
.nn-gallery__intro { color: #666; margin-bottom: 12px; }
.nn-gallery__intro p { margin: 0 0 6px; }
@media (max-width: 575.98px) {
  .nn-gallery__item { flex-direction: column; gap: 10px; }
  .nn-gallery__img { max-width: 100%; flex-basis: auto; }
}

.nn-lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 94vw;
  max-height: 94vh;
}
.nn-lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.nn-lightbox img { display: block; max-width: 94vw; max-height: 86vh; height: auto; background: #fff; }
.nn-lightbox figcaption { color: #fff; text-align: center; padding: 8px 40px 0; }
.nn-lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border: 0;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 26px;
  line-height: 40px;
  cursor: pointer;
}

/* ---------- 8. breadcrumbs + footer ---------- */
.nn-breadcrumbs .breadcrumb {
  margin: 0;
  padding: 8px 12px;
  background: #eeeeee;
  border-radius: 0;
  font-size: 14px;
}
.nn-breadcrumbs .mod-breadcrumbs__here { color: #999; }
.nn-breadcrumbs .breadcrumb-item.active { color: #444; }

.nn-footer {
  background: #f7f7f7;
  color: #666;
  border-top: 1px solid var(--nn-blue-dark);
  font-size: 12px;
  padding: 20px 0 60px;
}
.nn-footer p { margin: 0 0 5px; }

.nn-backtop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1020;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 119, 187, .85);
  color: #fff !important;
  text-decoration: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.nn-backtop.show { opacity: 1; visibility: visible; }
.nn-backtop:hover { background: var(--nn-blue-darker); }

/* ---------- 9. modules ---------- */
.nn-map { margin: 20px 0; }
.nn-map iframe { display: block; width: 100%; height: 450px; border: 0; }
.nn-map__actions { text-align: center; margin-top: 10px; }

.nn-form .form-label { font-weight: bold; margin-bottom: 4px; }
.nn-form .form-control,
.nn-form .form-select { font-size: 14px; }
.nn-form .nn-form__row { margin-bottom: 14px; }
.nn-form .nn-form__check { display: inline-flex; align-items: center; gap: 6px; margin-right: 18px; }
.nn-form .nn-form__error { color: #c00; font-size: 13px; margin-top: 3px; display: none; }
.nn-form .is-invalid ~ .nn-form__error,
.nn-form .nn-form__group.is-invalid .nn-form__error { display: block; }
.nn-form .nn-form__group.is-invalid { outline: 1px solid #c00; outline-offset: 4px; }

/* ---------- 10. utilities / Bootstrap 3 compatibility (old article HTML) ---------- */
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.img-responsive { display: inline; max-width: 100%; height: auto; }
.clr { clear: both; }
@media (max-width: 767.98px) { .hidden-xs { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  .nn-backtop, .nn-acc__row, .nn-acc__toggle::before, .nn-search input.form-control { transition: none; }
}

/* gallery tools: category filter + list/grid switch */
.nn-gallery__tools { display: flex; flex-wrap: wrap; gap: 10px 30px; margin: 10px 0 0; }
.nn-gallery__tools b { margin-right: 6px; }
.nn-gallery__tools .btn { margin: 0 2px 4px 0; }
body.nn .nn-gallery__tools .btn.active { background-color: #0077bb; border-color: #0067a2; }
.nn-gallery--grid .nn-gallery__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.nn-gallery--grid .nn-gallery__item { flex-direction: column; gap: 10px; padding: 0; }
.nn-gallery--grid .nn-gallery__img { max-width: 100%; flex-basis: auto; }
.nn-gallery--grid h2.nn-gallery__item-title { font-size: 17px; }

/* PDF viewer (article "Наредба №9"; built by user.js from <div class="nn-pdf"> + a .pdf link) */
.nn-pdf__viewer { display: block; width: 100%; height: 600px; border: 1px solid #ddd; }

/* Two-column product layout used in 6 articles (row_flex / column_flex_*). Moved here from the
   inline <style> blocks in those articles (inline <style> is stripped when a non-Super-User saves). */
.column_flex_i { float: left; width: 50%; padding: 2px 4px; }
.column_flex_im { display: none; }
.column_flex_t { float: left; width: 50%; padding: 100px 60px; }
.row_flex:after { content: ""; display: table; clear: both; }
@media screen and (max-width: 990px) {
  .column_flex_t { float: left; width: 50%; padding: 24px 4px; }
}
@media screen and (max-width: 766px) {
  .column_flex_t { float: left; width: 50%; text-align: center; padding: 100px 0; }
}
@media screen and (max-width: 600px) {
  .column_flex_i { display: none; }
  .column_flex_im { display: inline; }
  .column_flex_im, .column_flex_t { width: 100%; padding: 10px 0; }
}
