:root {
  --primary-color: #fff;
  --accent-color: #72d6ee;

  --text-color-black: #000;
  --text-color-grey: #888;
  --border-radius: 20px;
}

body {
  display: flex;
  flex-direction: column;
  font-family: Montserrat, sans-serif;
  background-color: var(--primary-color);
  color: var(--primary-color);
  font-size: 18px;
}

.content {
  flex-grow: 1;
}

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

.accent-color {
  color: var(--accent-color);
}

.container {
  margin: 0 auto;
  padding: 0 15px;
  max-width: 1600px;
}

.button {
  color: var(--text-color-black);
  background-color: var(--primary-color);
  border: 0;
  border-radius: var(--border-radius);
  padding: 10px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(
    90deg,
    rgb(114 214 238 / 1) 70%,
    rgb(19 191 235 / 1) 100%
  );
  padding: 10px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__logo {
  display: block;
  width: 50px;
  height: 50px;
}

.header__logo-organization {
  display: block;
  width: 500px;
  height: 50px;
}

.header__links-list {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: center;
  gap: 40px;
}

.header__link {
  position: relative;
  color: var(--primary-color);
  font-weight: 700;
  transition: all 0.3s ease-in-out;
}

.header__link::before {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease-out;
}

.header__link:not(.header__link--active):hover::before {
  transform: scaleX(1);
}

.header__link--active {
  border-bottom: 2px solid var(--primary-color);
}

.header__mobile-menu {
  display: none;
  width: 50px;
  height: 50px;
  background-color: transparent;
  background-image: url(../icons/menu.svg);
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 10px;
  border: 1px solid var(--primary-color);
}

.map .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
}

.map__heading {
  font-size: 40px;
  font-weight: 700;
  padding: 20px;
  text-align: center;
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
}

.map__image {
  width: 100%;
  height: 100%;
}

.map-island {
  transition: all 0.6s;
  transform-origin: 50% 50%;
}

.map-island:hover {
  cursor: pointer;
  transform: scale(1.05);
}

.map__image text {
  filter: drop-shadow(10px 30px 20px rgba(0, 0, 0, 0.9));
}

.schedule .container {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.mibok-wrapper {
  flex-grow: 1;
}

.mibok-wrapper .schedule__heading {
  text-align: center;
  margin: 50px 0;
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
  padding: 20px;
  font-weight: 700;
}

.panel-body {
  color: var(--text-color-black);
}

/* ===== Modal overlay & scroll lock (safe overrides) ===== */

/* Keep vertical scrollbar to avoid layout shift */

/* Backdrop */
body.modal-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1999;
}

.mibok-wrapper .modal.show {
  z-index: 2001 !important;
}

/* Center modal only when open */
.mibok-wrapper .modal.show,
.mibok-wrapper .modal.in {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2001 !important;
}

/* Closed modal shouldn't steal clicks */
.mibok-wrapper .modal:not(.show):not(.in) {
  pointer-events: none !important;
}

/* Dialog size & overflow */
.mibok-wrapper .modal-dialog {
  position: relative;
  z-index: 1;
  width: auto !important;
  max-width: min(92vw, 680px) !important;
  margin: 0 !important;
  transform: none !important;
  max-height: 90vh !important;
  overflow: auto !important;
}

/* Kill any template transform on show */
.mibok-wrapper .modal.show .modal-dialog,
.mibok-wrapper .modal.in .modal-dialog {
  transform: none !important;
}

.slider {
  margin-top: 50px;
}

.itc-slider {
  height: 600px;
  background-color: #000;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.itc-slider-items {
  width: 100%;
  height: 100%;
}

.itc-slider-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0/ 0.5);
  z-index: 0;
}

.itc-slider-wrapper {
  width: 100%;
  height: 100%;
}

.slider__link {
  display: block;
  width: 100%;
  height: 100%;
}

.slider-image {
  position: relative;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slider__text {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.slider__title {
  font-size: 3.5rem;
  font-weight: 700;
}

.slider__subtitle {
  max-width: 70%;
  font-size: 20px;
  text-align: center;
}

.activities {
  margin-top: 50px;
}

.activities .container {
  border-radius: var(--border-radius);
}

.activities__header {
  border-radius: var(--border-radius);
  padding: 10px 0;
  background: linear-gradient(
    90deg,
    rgb(114 214 238 / 1) 70%,
    rgb(19 191 235 / 1) 100%
  );
}

.activities__heading {
  color: var(--primary-color);
  font-weight: 700;
  font-size: 50px;
  text-align: center;
}

.activities__subtitle {
  color: var(--primary-color);
  font-size: 26px;
  text-align: center;
}

.activities__list {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 30px;
  margin-top: 20px;
  min-height: 700px;
}

.activities__list-item {
  position: relative;
  z-index: 0;
  border-radius: var(--border-radius);
  color: var(--primary-color);
  box-shadow: 6px 6px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in;
  overflow: hidden;
}

.activities__list-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0/ 0.5);
  z-index: -1;
}

.activities__list-item:hover {
  transform: scale(1.05);
}

.activities__list-item:nth-child(1) {
  background-image: url(../images/tvorchestvo1.jpg);
  background-size: cover;
  background-position: center;
  grid-column: span 4;
  grid-row: span 4;
}

.activities__list-item:nth-child(2) {
  background-image: url(../images/iskustvo1.jpg);
  background-size: cover;
  background-position: center;
  grid-column: span 2;
  grid-row: span 5;
}

.activities__list-item:nth-child(3) {
  background-image: url(../images/sport1.jpg);
  background-size: cover;
  background-position: center;
  grid-column: span 2;
  grid-row: span 5;
}

.activities__list-item:nth-child(4) {
  background-image: url(../images/ozdorovlenie1.jpg);
  background-size: cover;
  background-position: center;
  grid-column: span 2;
  grid-row: span 5;
}

.activities__list-item:nth-child(5) {
  background-image: url(../images/kruzki.jpg);
  background-size: cover;
  background-position: center;
  grid-column: span 2;
  grid-row: span 5;
}

.activities__list-item:nth-child(6) {
  background-image: url(../images/klass1.jpg);
  background-size: cover;
  background-position: center;
  grid-column: span 4;
  grid-row: span 4;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card__link {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: start;
  gap: 10px;
  padding: 20px;
  color: var(--primary-color);
  text-align: left;
  height: 100%;
  width: 100%;
}

.activities__title {
  text-transform: uppercase;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 100%;
}

.activities__text {
  font-size: 18px;
  text-wrap: pretty;
}

.activities__types {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activities__type-description {
  border-radius: var(--border-radius);
  padding: 5px 10px;
  color: var(--text-color-black);
  font-size: 14px;
  font-weight: 700;
  background-color: rgb(243 244 246);
}

.activities__modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.activities__modal-window {
  position: relative;
  width: 90%;
  max-width: 1300px;
  height: 90%;
  margin: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  background-color: var(--primary-color);
  animation: modalFadeIn 0.8s ease-out;
}

.activities__modal-button-close {
  position: absolute;
  z-index: 10;
  background-image: url(../icons/close.svg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: 10px;
  right: 15px;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 18px;
  transition: border-color 0.2s;
  border: 1px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.activities__modal-button-close:hover {
  border-color: #e3e3e3;
}

.activities__modal-header {
  background-color: var(--accent-color);
}

.activities__modal-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 100%;
}

.itc-slider--modal {
  height: 100%;
  border-radius: 0;
}

.activities__modal-text {
  overflow-y: auto;
}

.activities__modal-heading {
  max-width: 90%;
  font-size: 24px;
  text-align: left;
  padding: 10px;
}

.activities__modal-content-description {
  color: var(--text-color-black);
  padding: 20px;
  text-align: left;
  overflow-y: auto;
}

.activities__modal-content-description-text {
  margin-bottom: 20px;
}

.activities__modal-content-description-list {
  margin-bottom: 20px;
}

.activities__modal-content-description-list-item--rhomb-marker::before {
  content: "🔹";
  margin-right: 5px;
}

.activities__modal-content-description-list-item--checkbox-marker::before {
  content: "✅";
  margin-right: 5px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activities__modal--open {
  display: flex;
}

.activities__modal--opened {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.centers {
  margin-top: 50px;
}

.centers .container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.centers__heading {
  font-size: 50px;
  color: var(--primary-color);
  text-align: center;
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
}

.centers__map {
  border-radius: var(--border-radius);
  box-shadow: 4px 4px 4px 5px rgba(0, 0, 0, 0.1);
}

.footer {
  margin-top: 50px;
  padding: 50px 0;
  background-color: #212d3f;
}

.footer .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.footer__heading {
  font-size: 25px;
  color: var(--accent-color);
  font-weight: 700;
}

.footer__info {
  display: flex;
  flex-direction: column;
}

.footer__info-image {
  width: 50px;
  height: 50px;
}

.footer__address {
  display: flex;
  font-style: normal;
  flex-direction: column;
  gap: 10px;
}

.footer__feedback {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.footer__social_media-list {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer__social_media-image {
  width: 40px;
  height: 40px;
  transition: transform 0.6s ease-in-out;
}

.footer__social_media-image:hover {
  transform: rotate(360deg);
}

.footer__social_media-link {
  display: flex;
}

/* Пункт меню "О проекте" */
.welcome {
  margin-top: 50px;
}

.welcome .container {
  display: flex;
  position: relative;
  z-index: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--border-radius);
  min-height: 500px;
  background-image: url(../images/about_image.jpg);
  text-align: center;
  overflow: hidden;
  gap: 20px;
}

.welcome .container::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0/ 0.6);
}

.welcome__heading {
  line-height: 100%;
  font-size: 50px;
  font-weight: 700;
}
.welcome__text {
  font-size: 24px;
}
.purposes {
  margin-top: 50px;
}

.purposes .container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.purposes__heading {
  font-weight: 700;
  text-align: center;
  font-size: 50px;
  color: var(--primary-color);
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
}

.purposes__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}

.purposes-card {
  width: 350px;
  min-height: 500px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  color: var(--text-color-black);
}

.purposes__card-image {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

.purposes__card-text {
  padding: 20px;
}
.purposes__card-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-color);
}

.results {
  margin-top: 50px;
}

.results__heading {
  font-size: 50px;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--accent-color);
  text-align: center;
  margin-bottom: 30px;
  border-radius: var(--border-radius);
}

.results__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #000;
}

.results__card {
  width: 300px;
  height: 200px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  padding: 50px;
}

.results__card-title {
  color: var(--accent-color);
  font-size: 30px;
  font-weight: 700;
}
.results__card-description {
  font-size: 20px;
  font-weight: 700;
}

.directions {
  margin-top: 50px;
}

.directions__heading {
  font-size: 50px;
  font-weight: 700;
  color: var(--primary-color);
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
  text-align: center;
  margin-bottom: 20px;
}

.directions__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.directions__card {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  padding: 60px;
}
.directions__card-title {
  color: var(--accent-color);
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 30px;
}
.directions__card-list {
  list-style: square;
}

.directions__card-list-item {
  margin-bottom: 10px;
  font-size: 20px;
  color: var(--text-color-black);
}

.directions__card-list-item::marker {
  color: var(--accent-color);
}

@media (width <= 1190px) {
  .header .container {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .activities__list {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(7, 1fr);
  }

  .activities__list-item:nth-child(1) {
    background-position: center;
    grid-column: span 4;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(2) {
    grid-column: span 4;
    grid-row: span 3;
  }

  .activities__list-item:nth-child(3) {
    grid-column: span 4;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(4) {
    grid-column: span 4;
    grid-row: span 3;
  }

  .activities__list-item:nth-child(5) {
    grid-column: span 4;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(6) {
    grid-column: 1 / -1;
  }

  .activities__modal-content {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
    overflow-y: auto;
  }
}

@media (width <= 768px) {
  .container {
    padding: 0 10px;
  }

  .header .container {
    flex-direction: row;
    align-items: center;
  }

  .header__logo-organization {
    display: none;
  }

  .header__links-list {
    display: none;
  }

  .header__mobile-menu {
    display: block;
  }

  .itc-slider {
    height: 400px;
  }

  .slider__title {
    font-size: 1.5rem;
  }

  .slider__subtitle {
    font-size: 0.8rem;
  }

  .activities__heading {
    font-size: 2.2rem;
  }

  .activities__subtitle {
    font-size: 1.5rem;
  }

  .activities__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }

  .activities__list-item {
    min-height: 250px;
  }

  .activities__list-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(2) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(3) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(4) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .activities__list-item:nth-child(6) {
    grid-column: span 2;
    grid-row: span 2;
  }

  .activities__title {
    font-size: 1.3rem;
  }

  .activities__description {
    font-size: 1rem;
  }

  .activities__type-description {
    font-size: 0.7rem;
  }

  .activities__modal-heading {
    font-size: 1.2rem;
  }

  .activities__modal-text {
    overflow-y: initial;
  }

  .activities__modal-content-description {
    overflow-y: hidden;
    font-size: 0.8rem;
  }

  .centers__heading {
    font-size: 2rem;
  }

  .footer .container {
    text-align: center;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer__info {
    align-items: center;
  }

  .welcome__heading {
    font-size: 2rem;
  }

  .welcome__text {
    font-size: 1rem;
  }

  .purposes__heading {
    font-size: 3rem;
  }

  .results__heading {
    font-size: 3rem;
  }

  .directions__heading {
    font-size: 3rem;
  }

  .news__heading {
    font-size: 2rem;
    margin-bottom: 20px;
  }
}

@media (width <= 375px) {
  .container {
    padding: 0 5px;
  }

  .activities__heading {
    font-size: 1.3rem;
  }

  .activities__subtitle {
    font-size: 1rem;
  }

  .activities__title {
    font-size: 1rem;
  }

  .activities__description {
    font-size: 0.9rem;
  }

  .activities__modal-heading {
    font-size: 1.2rem;
  }
}
