.cm-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.cm-modal.is-active {
  opacity: 1;
  visibility: visible;
}

.cm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.cm-modal__container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 90%;
  max-height: calc(100vh - 4rem);
  height: calc(100vh - 4rem);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  z-index: 2;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.cm-modal.is-active .cm-modal__container {
  transform: translateY(0);
}

.cm-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 20;
  transition: 0.2s;
  color: black;
}

.cm-modal__close:hover {
  background: transparent;
  color: black;
}

.cm-modal__close:focus {
  background: transparent;
  color: black;
}

.cm-modal__gallery {
  width: 100%;
  max-height: calc(100vh - 4rem);
  overflow: hidden;
}

.cm-modal__gallery .swiper {
  width: 100%;
  height: calc(100vh - 4rem);
}

.cm-modal__gallery .swiper-wrapper {
  height: calc(100vh - 4rem);
}

.cm-modal__gallery .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.cm-modal__gallery img {
  width: 100%;
  height: calc(100vh - 4rem);
  object-fit: cover;
  display: block;
}

.cm-modal__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 3rem;
  overflow: hidden;
}

.cm-modal__title {
  flex-shrink: 0;
  margin: 0 0 1.5rem;
  font-size: 2rem;
  font-family: "Manrope", Sans-serif;
  line-height: 1.2;
  color: #5e6f30;
}

.cm-modal__information {
  flex: 1;
  min-height: 0;
  color: #7a7a7a;
  line-height: 1.5;
  font-size: 1rem;
  font-family: "Manrope", Sans-serif;
  overflow-y: auto;
}

.cm-modal__information h2,
.cm-modal__information h3,
.cm-modal__information h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #5e6f30;
}

.cm-modal__information p {
  margin-bottom: 1rem;
}

.cm-modal__information ul {
  margin: 1rem 0;
  padding-left: 1.25rem;
}

.cm-modal__information li {
  margin-bottom: 0.75rem;
}

.cm-modal__information strong {
  color: #bf8a3c;
}

.swiper-pagination-bullet {
  width: 15px;
  height: 15px;
  opacity: 0.4;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  color: #fff;
  background-color: #fff;
}

body.cm-modal-open {
  overflow: hidden;
}

@media (max-width: 992px) {
  .cm-modal {
    padding: 1rem;
  }

  .cm-modal__container {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 2rem);
  }

  .cm-modal__gallery {
    height: 320px;
  }

  .cm-modal__gallery .swiper {
    height: 100%;
  }

  .cm-modal__gallery .swiper-wrapper {
    height: 100%;
  }

  .cm-modal__gallery img {
    height: 100%;
  }

  .cm-modal__content {
    padding: 2rem;
  }

  .cm-modal__title {
    font-size: 1.75rem;
  }

  .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 576px) {
  .cm-modal__gallery {
    height: 250px;
  }

  .cm-modal__content {
    padding: 1.5rem;
  }

  .cm-modal__title {
    font-size: 1.5rem;
  }

  .cm-modal__information {
    font-size: 0.9rem;
    line-height: 1.2;
  }
}
