* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  font-family: 'Montserrat', sans-serif;
  flex-direction: row;
  min-height: 100vh;
}

/* Panel izquierdo */
.sidebar {
  width: 37.33%;
  background-color: #003399;
  color: white;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.sidebar h1 {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.3;
}

.formulario {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.formulario label {
  font-weight: 500;
  font-size: 0.95rem;
  color: white;
  margin-bottom: 0.2rem;
  
}

.formulario input,
.formulario select {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 30px;
  background-color: #fdfdfd;
  color: #003399;
  text-align: center; /* CENTRAR TEXTO EN INPUT Y SELECT */
  font-family: 'Montserrat', sans-serif;
}


button[type="submit"] {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: bold;
  background: linear-gradient(90deg, #00bfff, #00c6ff);
  color: #003399;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  }

button[type="submit"]:hover {
  background-color: #009ddc;
  color: white;
  
}

/* Panel derecho */
.main {
  width: 66.66%;
  background-color: #f4f6fc;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
  z-index: 0;
}

/* Ilustración superior */
.ilustracion-superior {
  width: 100%;
  text-align: center;
  margin-bottom: 2rem;
}

.ilustracion-superior img {
  max-width: 360px;
  height: auto;
}
/* Nota aclaratoria */
.nota-informativa {
  max-width: 900px;
  margin: 2rem auto 4rem;
  padding: 1.2rem;
  font-size: 0.85rem;
  text-align: justify;
  color: #4b5563;
  border-left: 4px solid #003399;
  border-radius: 8px;
  line-height: 1.5;
  background-color: transparent; /* fondo transparente */
}
.nota-informativa strong {
  color: #003399;
}

/* Tarjetas */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  position: relative; /* Para controlar jerarquía */
  z-index: 10; /* Por encima de decoraciones */
}
.descripcion-plan {
  font-size: 0.88rem;
  color: #4b5563;
  font-weight: 400;
  margin-top: -0.3rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.card {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 1.8rem;
  color: #1a1a1a;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  min-height: 300px;
  position: relative; /* Necesario para que z-index funcione */
  z-index: 20; /* Asegura que la tarjeta esté encima de decoraciones */
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.card h3 {
  background-color: #e6f4ff;
  color: #003399;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0.6rem;
  border-radius: 12px;
  margin: 0 auto 1rem;
  text-transform: uppercase;
  width: fit-content;
}

/* 👇 Subtítulo justo debajo del título de la tarjeta */
.subtitulo-linea {
  font-size: 0.88rem;
  color: #6b7280; /* Gris suave */
  font-weight: 500;
  margin-top: -0.8rem;
  margin-bottom: 1rem;
  font-style: italic;
  line-height: 1.2;
}


.card p {
  font-size: 0.95rem;
  margin: 0.5rem 0;
  color: #333;
}

.card p strong {
  color: #111;
}

.btn-detalle {
  font-family: 'Montserrat', sans-serif;
  margin-top: 1.5rem;
  background-color: #00bfff;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-detalle::after {
  content: "→";
  font-weight: bold;
}

.btn-detalle:hover {
  background-color: #009ddc;
}

/* Decoraciones de esquina */
.decorador {
  position: absolute;
  width: 22%;
  max-width: 140px;
  height: auto;
  opacity: 1;
  pointer-events: none;
  z-index: 1; /* Debajo de tarjetas e ilustración */
}

.decorador-top-left {
  top: -2%;
  left: 0;
}

.decorador-top-right {
  top: -2%;
  left: calc(33.33% - 70px); /* Al borde del panel izquierdo */
  transform: scaleX(-1);
}

.decorador-bottom-left {
  bottom: -8%;
  left: 0;
  transform: scaleY(-1);
}

.decorador-bottom-right {
  bottom: -6%;
  left: calc(33.33% - 70px); /* Al borde del panel izquierdo */
  transform: scaleX(-1) scaleY(-1);
}

.pregunta-tooltip {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-bottom: 0rem;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
  font-size: 1.1rem;
}

.tooltiptext {
  visibility: hidden;
  width: 160px;
  max-height: 350px;
  background-color: rgba(0, 123, 255, 0.9);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  top: 80%;                /* Aparece más abajo del ícono */
  right: 110%;             /* A la izquierda del ícono */
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  overflow-y: auto;
  white-space: normal;
}

/* Mostrar tooltip al pasar el mouse */
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.boton-activo {
  background-color: #003399 !important;
  color: white !important;
  border: 2px solid #001f80;
  font-weight: 600;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
}

/* Responsivo para pantallas menores a 768px */
@media (max-width: 768px) {
  html, body {
    height: auto;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: block; /* Elimina el flex en móviles */
  }


  body {
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5; /* O el fondo que prefieras */
  }

  .sidebar {
    width: 100%;
    padding: 1.5rem 1rem;
    background-color: #003399;
    color: white;
    order: 1;
  }

  .formulario {
    max-width: 480px;
    margin: 0 auto;
  }

  .main {
    width: 100%;
    padding: 1rem;
    order: 2;
    display: block !important; /* Asegúrate que no se oculte */
  }

  .decorador,
  .decorador-top-left,
  .decorador-top-right,
  .decorador-bottom-left,
  .decorador-bottom-right,
  .ilustracion-superior {
    display: none !important;
  }
}