.card-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.card {
  background-color: #d8d8d8;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1100px;
  margin: 10px auto;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-container {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2%;
}

.image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 2%;
}

.image-container.placeholder {
  background-color: #6a6a81;
}

.content {
  padding: 20px;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
}

.titleVacante {
  color: #e56428;
  font-size: 1.5em;
  margin: 0;
}

.location, .details {
  color: #24315f;
  margin: 5px 0;
}

.btn {
  background-color: #e56428;
  color: white;
  border: none;
  padding: 10px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  width: 100%;
  margin-top: 100px;
}

.btn:hover {
  background-color: #d45520;
}

.modal {
  display: none; /* Oculto por defecto */
  position: fixed; /* Fijo en la pantalla */
  z-index: 3; /* Encima de todo */
  left: 0;
  top: 0;
  width: 100%; /* Ancho completo */
  height: 100%; /* Alto completo */
  overflow: auto; /* Habilita scroll si es necesario */
  background-color: rgb(0,0,0); /* Color de fondo */
  background-color: rgba(0,0,0,0.4); /* Negro con opacidad */
}

/* Contenido del modal */
.modal-content {
  background-color: #163355;
  margin: 5% auto; /* Ajustado para pantallas móviles */
  border-radius: 10px;
  width: 80%; /* Ajustado para pantallas móviles */
  max-width: 600px; /* Ancho máximo para pantallas grandes */
}

.img-modal {
  width: 100%;
  height: 20vh; /* Altura ajustada a 40% del viewport height */
  object-fit: cover;
  border-radius: 5%;
  position: relative;
  font-size: 20px;
}

.modal-title {
  color: #d45520;
  text-align: center; /* Centra el texto del título */
  flex: 1; /* Permite que el título ocupe el espacio disponible */
  margin: 0; /* Elimina cualquier margen adicional */
  padding: 3%;
}

.modal-content{
  color : #ffffff;
}

/* El botón cerrar */
.close {
  position: absolute;
  top: 12%;
  right: 37%;
  color: #d45520;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2; /* Ensure it's in front of the image */
}

.custom-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px; /* Ajusta la altura según sea necesario */
  background-color: #163355; /* Ajuste de color de fondo si es necesario */
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.btnPostularme {
  background-color: #ff6600;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1em;
  margin-top: 20px; /* Asegura que haya espacio encima del botón */
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

/* Media Queries */
@media (max-width: 768px) {
  .card {
    flex-direction: column;
    align-items: center;
  }

  .image-container, .content {
    width: 80%;
    justify-content: center;
    padding: 2% 10px;
  }

  .image-container img {
    height: 200px;
    object-fit: cover;
  }

  .modal-content {
    width: 90%; /* Más ancho en móviles */
    margin: 10% auto; /* Centrado */
  }
  .close {
    position: absolute;
    top: 12%;
    right: 35%;
    color: #d45520;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3; /* Ensure it's in front of the image */
  }
}

@media (max-width: 480px) {
  .titleVacante {
    font-size: 1.2em;
  }

  .btn {
    font-size: 0.9em;
  }

  .modal-content {
    width: 95%; /* Máxima responsividad */
    margin: 15% auto; /* Más margen superior para móviles */
  }

  .close {
    position: absolute;
    top: 12%;
    right: 5%;
    color: #d45520;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3; /* Ensure it's in front of the image */
  }
}
