@font-face {
  font-family: "MuseumSans";
  src: local("Segoe UI");
  font-weight: 400 800;
}

:root {
  --ink: #17201b;
  --muted: #66736b;
  --paper: #fffaf2;
  --surface: #ffffff;
  --line: #eadfce;
  --brand: #8f2634;
  --brand-dark: #5c1522;
  --gold: #c79542;
  --sage: #5f7e68;
  --sky: #dce9ee;
  --shadow: 0 18px 50px rgba(48, 35, 20, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(246, 239, 226, 0.98)),
    repeating-linear-gradient(90deg, rgba(143, 38, 52, 0.035) 0 1px, transparent 1px 74px);
  font-family: MuseumSans, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

img:is([sizes="auto" i], [sizes^="auto," i]) {
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}
.custom-img {
    position: absolute;
    inset: 0;
    z-index: -1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.col-lg-12,
.col-lg-8,
.col-lg-4,
.col-md-3 {
  min-width: 0;
}

.col-lg-12 {
  flex: 1 1 100%;
}

.col-lg-8 {
  flex: 1 1 670px;
}

.col-lg-4 {
  flex: 1 1 310px;
}

.col-md-3 {
  flex: 1 1 230px;
}

.clearfix,
.blogeir-background-wrapper,
.d-none {
  display: none !important;
}

.bs-headfour {
  position: relative;
  z-index: 50;
  background: rgba(255, 250, 242, 0.94);
  border-bottom: 1px solid rgba(143, 38, 52, 0.14);
  box-shadow: 0 10px 30px rgba(30, 25, 18, 0.08);
  backdrop-filter: blur(16px);
}

.bs-menu-full > .container > .col-lg-12 > .navbar-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px 0 14px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.navbar-brand::before {
  content: "Әбіш Кекілбайұлы атындағы Маңғыстау облыстық тарихи-өлкетану музейі";
  max-width: 390px;
}

.custom-logo {
  display: none;
  width: min(360px, 46vw);
  max-height: 112px;
  object-fit: contain;
}

.msearch {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--brand);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(48, 35, 20, 0.08);
}

.langs ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.langs a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.navbar {
  border-top: 1px solid rgba(143, 38, 52, 0.1);
}

.navbar > .container {
  width: min(1180px, calc(100% - 40px));
}

.navbar .row {
  gap: 0;
  width: 100%;
}

.m-header {
  display: none;
  width: 100%;
}

.navbar-collapse {
  display: block;
}

.navbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navbar-nav li {
  position: relative;
  list-style: none;
}

.nav-link,
.dropdown-item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 15px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.active > .nav-link,
.nav-link:hover,
.dropdown-item:hover {
  color: #fff;
  background: var(--brand);
}

.dropdown-menu {
  position: absolute;
  top: calc(100%);
  left: 0;
  z-index: 60;
  display: none;
  width: min(280px, 86vw);
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dropdown:hover > .dropdown-menu,
.dropdown.is-open > .dropdown-menu {
  display: block;
}

.dropdown-menu .dropdown-menu {
  top: 0;
  left: calc(100% + 8px);
}

.dropdown-item {
  min-height: auto;
  padding: 11px 12px;
  font-size: 14px;
}

.navbar-toggler {
  display: none;
  width: 46px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.icon-bar {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--brand);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar-toggler[aria-expanded="true"] .icon-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .icon-bar:nth-child(2) {
  opacity: 0;
}

.navbar-toggler[aria-expanded="true"] .icon-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.wrapper > header + div {
    position: relative;
    z-index: 3;
  min-height: 610px;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(23, 32, 27, 0.78), rgba(23, 32, 27, 0.28) 55%, rgba(143, 38, 52, 0.2)),
    radial-gradient(circle at 78% 18%, rgba(199, 149, 66, 0.42), transparent 32%),
    linear-gradient(135deg, #6d2430, #264337 50%, #c9b58d);
}

.wrapper > header + div::before {
  content: "Mangystau Museum";
  position: absolute;
  left: max(20px, calc((100vw - 1180px) / 2));
  bottom: clamp(96px, 11vw, 140px);
  width: min(1180px, calc(100% - 40px));
  padding: 0;
  color: #fff;
  font-size: clamp(42px, 7vw, 92px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.wrapper > header + div::after {
  content: "Әбіш Кекілбайұлы атындағы облыстық тарихи-өлкетану музейі";
  position: absolute;
  left: max(20px, calc((100vw - 1180px) / 2));
  bottom: clamp(36px, 6vw, 74px);
  max-width: 620px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 500;
}

.wrapper > header + div > img {
}

#content {
  padding: clamp(38px, 7vw, 80px) 0 24px;
}

.indexPanel {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.indexPanel a {
  display: flex;
  align-items: flex-end;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--sage));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.indexPanel a::after {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

.indexPanel .tours::after {
  content: "Виртуалды тур";
}

.indexPanel .redives::after {
  content: "Көрме залдары";
}

.indexPanel .gal::after {
  content: "Галерея";
}

.indexPanel .calend::after {
  content: "Күнтізбе";
}

.bs-card-box,
.rpwwt-widget,
.bs-widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.bs-card-box {
  padding: clamp(24px, 4vw, 42px);
}

.entry-title,
.mainpage-widget-area-title,
.fl h4 {
  margin: 0 0 20px;
  color: var(--brand-dark);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}

.bs-card-box p,
.bs-card-box li {
  color: #33413a;
}

.bs-card-box ol {
  padding-left: 1.3em;
}

.rpwwt-widget {
  margin-top: 26px;
  padding: clamp(22px, 3vw, 32px);
}

.rpwwt-widget ul {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rpwwt-widget li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
}

.rpwwt-widget li > * {
  min-width: 0;
}

.rpwwt-widget li > a {
  display: contents;
}

.rpwwt-widget img {
  width: 170px !important;
  max-width: 100% !important;
  height: 105px;
  min-width: 0;
  object-fit: cover;
  border-radius: 6px;
  background: var(--sky);
}

.rpwwt-post-title {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rpwwt-post-excerpt {
  min-width: 0;
  max-width: 100%;
  grid-column: 2;
  margin-top: -8px;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.bs-sidebar {
  display: grid;
  gap: 22px;
}

.bs-widget {
  padding: 16px;
  overflow: hidden;
}

.bs-widget p {
  margin: 0 0 12px;
  padding: 0 !important;
}

.bs-widget img {
  width: 100% !important;
  border-radius: 8px;
  object-fit: cover;
  background: var(--sky);
}

.bs-widget a {
  color: var(--ink);
  font-weight: 800;
}

.bs-widget span {
  color: var(--muted);
  font-weight: 500;
}

.fl {
  width: min(1180px, calc(100% - 40px));
  margin: clamp(34px, 6vw, 72px) auto;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 8px;
  background: #263f35;
  box-shadow: var(--shadow);
}

.fl h4 {
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.gallery-item {
  margin: 0;
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.gallery-icon img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.gallery-caption {
  padding: 12px;
  min-height: 74px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

.gallery-caption a {
  color: #fff;
  font-weight: 700;
}

.bn {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto clamp(34px, 5vw, 64px);
}

.bn span {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 12px 34px rgba(48, 35, 20, 0.08);
}

.bn img {
  width: 56px !important;
  height: 56px !important;
  object-fit: contain;
}

footer .overlay {
  background: #34131a !important;
}

.bs-footer-widget-area {
  padding: 36px 0;
}

footer .row {
  gap: 0;
}

footer .bs-widget {
  background: transparent;
  border: 0;
  box-shadow: none;
}

footer p {
  margin: 0;
  padding: 10px 20px !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 15px;
}

.bs_upscr {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 34px rgba(143, 38, 52, 0.3);
}

.fa,
.fas {
  display: inline-grid;
  place-items: center;
  font-family: Arial, sans-serif;
  font-style: normal;
  font-weight: 800;
}

.fa-search::before {
  content: "\1F50D";
  font-size: 17px;
}

.fa-times::before {
  content: "x";
  font-size: 18px;
}

.fa-angle-double-up::before {
  content: "^";
  font-size: 24px;
  line-height: 1;
}

.modal {
  display: none;
}

.modal.show {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 32, 27, 0.5);
}

.modal-content {
  width: min(680px, 100%);
  min-height: 180px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: flex-end;
  padding: 12px;
}

.btn-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f2eadf;
  cursor: pointer;
}

@media (max-width: 991px) {
  body {
    font-size: 16px;
  }

  .container,
  .navbar > .container,
  .fl,
  .bn {
    width: min(100% - 28px, 760px);
  }

  .navbar .row {
    display: block;
  }

  .navbar .col-lg-12 {
    width: 100%;
    flex: 0 0 100%;
  }

  .bs-menu-full > .container > .col-lg-12 > .navbar-header {
    display: none;
  }

  .m-header {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
  }

  .m-header .navbar-header {
    justify-self: center;
  }

  .m-header .custom-logo {
    display: none;
  }

  .m-header .navbar-brand {
    font-size: 16px;
    text-align: center;
  }

  .m-header .navbar-brand::before {
    max-width: min(300px, 56vw);
  }

  .right-nav {
    justify-self: end;
  }

  .navbar-toggler {
    display: block;
  }

  .navbar-collapse {
    display: none;
    width: 100%;
    padding: 10px 0 16px;
  }

  .navbar-collapse.show {
    display: block;
  }

  .navbar-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: stretch;
    width: 100%;
  }

  .navbar-nav li,
  .navbar-nav a {
    width: 100%;
    min-width: 0;
  }

  .nav-link,
  .dropdown-item {
    min-height: 44px;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.65);
  }

  .dropdown-menu,
  .dropdown-menu .dropdown-menu {
    position: static;
    width: 100%;
    margin: 0 0 0;
    padding: 6px;
    border-radius: 8px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.72);
  }

  .dropdown:hover > .dropdown-menu {
    display: none;
  }

  .dropdown.is-open > .dropdown-menu {
    display: block;
  }

  .indexPanel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery,
  .bn {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .container,
  .navbar > .container,
  .fl,
  .bn {
    width: calc(100% - 24px);
  }

  .wrapper > header + div {
    min-height: 430px;
  }

  .wrapper > header + div::before {
    font-size: clamp(38px, 16vw, 58px);
    bottom: 104px;
  }

  .wrapper > header + div::after {
    right: 20px;
    font-size: 16px;
    bottom: 46px;
  }

  #content {
    padding-top: 28px;
  }

  .indexPanel {
    grid-template-columns: 1fr;
  }

  .indexPanel a {
  }

  .bs-card-box,
  .rpwwt-widget,
  .fl {
    padding: 20px;
  }

  .rpwwt-widget li {
    grid-template-columns: 1fr;
  }

  .rpwwt-widget img {
    width: 100% !important;
    height: 170px;
  }

  .rpwwt-post-excerpt {
    grid-column: 1;
    margin-top: 0;
  }

  .gallery,
  .bn {
    grid-template-columns: 1fr;
  }

  .bn span {
    min-height: 120px;
  }

  footer .col-md-3 {
    flex-basis: 100%;
  }
}
