/* Estilos base y variables */
:root {
  --fuelle-transicion: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f8;
}

/* Fondo oscuro (Overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px); /* Efecto difuminado elegante */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--fuelle-transicion);
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
}

/* Modificador cuando está activo */
.modal-overlay.activo {
  opacity: 1;
  visibility: visible;
}

/* Contenedor del Modal */
.modal-container {
  background-color: transparent;
  max-width: 500px; /* Ajusta este ancho según tus necesidades */
  width: 100%;
  padding: 0;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px) scale(0.95);
  transition: var(--fuelle-transicion);
  border-radius: 12px;
  overflow: hidden; /* Mantiene la imagen dentro de los bordes redondeados */
  display: flex;
}

.modal-overlay.activo .modal-container {
  transform: translateY(0) scale(1);
}

/* Imagen Informativa */
.modal-imagen {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Botón X de Cierre flotante */
.modal-btn-cerrar {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
}

.modal-btn-cerrar:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

/* Estilos generales para overlays de modales si no existen */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 99999;
  padding: 20px;
}

.modal-overlay.activo {
  opacity: 1;
  visibility: visible;
}

/* Contenedor específico para el modal de Asesoría Legal */
.modal-container.modal-legal-content {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-btn-cerrar {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #444444;
  transition: color 0.2s;
}

.modal-btn-cerrar:hover {
  color: #8F5003; /* Tono de acento del proyecto */
}

.modal-header-custom h2 {
  color: #8F5003;
  font-size: 20px;
  font-weight: 700;
  margin-left: 0px;
  margin-right: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #8F5003;
  padding-bottom: 10px;
}

.modal-body-custom ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-body-custom ul li {
  margin-bottom: 15px;
  line-height: 1.6;
  color: #444444;
  font-size: 15px;
}

.modal-body-custom ul li strong {
  color: #8F5003;
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}