.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.modal-overlay.oculto {
  display: none;
}

.popup-modal {
  width: min(100%, 980px);
  max-height: 90vh;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  animation: aparecer 0.25s ease;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #dcdcdc;
  background: #f7f7f7;
}

.popup-header h2 {
  font-size: 20px;
  color: #333333;
  font-weight: 700;
}

.popup-close {
  background: transparent;
  border: none;
  color: #777777;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}

.popup-body {
  padding: 22px;
}

.popup-content {
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.popup-texto {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.popup-texto h3 {
  text-align: center;
  font-size: 22px;
  color: #333333;
  margin-bottom: 22px;
  font-weight: 800;
}

.popup-btn-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.popup-btn {
  display: inline-block;
  background: #0a7c0a;
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 4px;
  min-width: 170px;
}

.popup-subtitle {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: #333333;
  margin-bottom: 22px;
  line-height: 1.3;
}

.popup-text {
  font-size: 16px;
  line-height: 1.8;
  color: #333333;
  text-align: justify;
  margin-bottom: 24px;
}

.popup-date {
  text-align: center;
  font-size: 16px;
  color: #333333;
  margin-top: auto;
}

.popup-image {
  flex: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-image img {
  width: 100%;
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  display: block;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  background: #fff;
}

/* TABLET */
@media (max-width: 900px) {
  .popup-modal {
    width: min(100%, 760px);
  }

  .popup-content {
    gap: 20px;
  }

  .popup-texto h3 {
    font-size: 20px;
  }

  .popup-subtitle {
    font-size: 18px;
  }

  .popup-text {
    font-size: 15px;
  }
}

/* MOVIL */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 14px;
  }

  .popup-modal {
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
  }

  .popup-body {
    padding: 16px;
  }

  .popup-content {
    flex-direction: column;
    gap: 18px;
  }

  .popup-texto h3 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .popup-btn-wrap {
    margin-bottom: 18px;
  }

  .popup-btn {
    font-size: 16px;
    padding: 12px 20px;
    min-width: 150px;
  }

  .popup-subtitle {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .popup-text {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 18px;
  }

  .popup-date {
    text-align: center;
  }

  .popup-image img {
    max-height: 320px;
  }
}