.csm-modal {

  display: none;

  position: fixed;

  inset: 0;

  z-index: 9999;

}



.csm-overlay {

  position: absolute;

  inset: 0;

  background: rgba(0,0,0,.6);

}



.csm-content {

  background: #fff;

  max-width: 900px;

  width: 90%;

  margin: auto;

  position: relative;

  z-index: 10001;

  top: 50%;

  transform: translateY(-50%);

  border-radius: 14px;

  overflow: hidden;

}



.csm-grid {

  display: grid;

  grid-template-columns: 1fr 1fr;

}



.csm-image {

  position: relative;

  overflow: hidden;

}



.csm-slider {

  position: relative;

  width: 100%;

  height: 100%;

  min-height: 100%;

}



.csm-slider img {

  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  object-fit: cover;

  opacity: 0;

  transition: opacity 0.8s ease-in-out;

}



.csm-slider img.active {

  opacity: 1;

  z-index: 1;

}



.csm-text {

  padding: 60px;

  display: flex;

  flex-direction: column;

  justify-content: center; /* ← THIS is the key */

}



.csm-btn {

  display: inline-block;

  margin-top: 24px;

  padding: 12px 26px;

  background: #fff;

  color: #322a1a;

  border-radius: 8px;

  text-decoration: none;

  font-weight: 600;

  width: 100%;

  text-align: center;

  /* shadow */

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);

  transition: all 0.25s ease;

}



.csm-close {

  position: absolute;

  top: 12px;

  right: 18px;

  font-size: 30px;

  color: #322a1a;

  border: none;

  background: transparent;

  cursor: pointer;

  outline: none;

  box-shadow: none;

  z-index: 10000;

  -webkit-tap-highlight-color: transparent; /* mobile fix */

}



.csm-close:hover,

.csm-close:focus,

.csm-close:active {

  /*background: transparent;*/
  background: none;
  color: #000!important;

  outline: none;

  box-shadow: none;

}



.csm-btn:hover {

  background: #322a1a;

  color: #fff;

  transform: translateY(-2px);

  box-shadow: 0 10px 24px rgba(12, 12, 12, 0.35);

}



.csm-btn:focus,

.csm-btn:active {

  outline: none;

}



.csm-text-content p {

  margin-bottom: 1em;

}



.csm-text-content a {

  color: #000;

  text-decoration: underline;

}



.csm-text-content p,

.csm-text-content li {

  font-size: inherit;

}



.csm-text h2 {

  margin-bottom: 24px;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;

}



.csm-text-content p:first-child {

  margin-top: 0;

}



/* MOBILE */

@media (max-width: 768px) {

  .csm-grid {

    grid-template-columns: 1fr;

  }

  .csm-close{
    color: #fff;
  }

  .csm-close:hover,
  .csm-close:focus,
  .csm-close:active {
    color: #ffffff!important;
}


  .csm-image {

    min-height: 45vh;

    display: flex;

    align-items: center;

    justify-content: center;

  }



  .csm-content {

    max-height: 90vh;

    overflow-y: auto;

  }



  .csm-text {

    padding: 25px;

     justify-content: flex-start;

  }

  /* Mobile: show one slide at a time with natural height so images are fully visible */
  .csm-slider {
    position: relative;
    width: 100%;
    height: auto;
    min-height: auto;
    display: block;
    overflow: visible;
    background: transparent; /* match page background */
  }

  .csm-slider img {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    max-width: 100%;
    display: none;
    object-fit: contain;
    object-position: center;
  }

  .csm-slider img.active {
    display: block;
  }


  .csm-text h2 {

    font-size: 22px !important;

    white-space: normal;

    overflow: visible;

    text-overflow: clip;

  }



  .csm-text-content {

    font-size: 14px !important;

  }

  .csm-text h2 {

    margin-bottom: 16px;

  }

}

