/* trovadores.css */

/* =========================
   CONTROLES / FILTROS
   ========================= */

.controles-invitados {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin: 25px auto 35px;
  max-width: 900px;
}

.controles-invitados input,
.controles-invitados select {
  background-color: #111;
  color: #fff;
  border: 1px solid #444;
  padding: 10px 14px;
  font-size: 15px;
  border-radius: 6px;
  outline: none;
  height: 42px;
  font-family: "Inconsolata", monospace;
}

.controles-invitados input {
  flex: 1;
  min-width: 380px;
}

.controles-invitados select {
  flex: 0 0 280px;
  cursor: pointer;
}

.controles-invitados input::placeholder {
  color: #aaa;
}

.controles-invitados input:focus,
.controles-invitados select:focus {
  border-color: rgb(232, 73, 0);
}

/* =========================
   GALERÍA DE INVITADOS
   ========================= */

.galeriaInvitados {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;

  max-width: 1000px;
  margin: 0 auto 60px;
  padding: 0 20px;

  justify-items: center;
}

/* =========================
   CELDA INVITADO
   ========================= */

.celdaInvitado {
  width: 100%;
  max-width: 200px;
  cursor: pointer;

  display: flex;
  flex-direction: column;
}

/* Contenedor imagen */

.contenedorInvitado {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
}

/* Imagen */

.celdaInvitado img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  transition: transform 0.3s ease;
}

/* Hover imagen */

.celdaInvitado:hover img {
  transform: scale(1.12);
}

/* Nombre */

.nombreInvitado {
  margin-top: 10px;
  padding: 4px 2px;
  text-align: center;

  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

/* =========================
   MODAL
   ========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 1000;
}

.modal.hidden {
  display: none;
}

/* Contenido modal */

.modal-content {
  background: #111;
  color: white;

  width: 90%;
  max-width: 520px;
  padding: 20px;

  border-radius: 12px;
  position: relative;

  transition: max-width 0.3s ease;
}

/* Con iVoox */

.modal-content.con-ivoox {
  max-width: 900px;
}

/* Grid interno */

.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.modal-content.con-ivoox .modal-grid {
  grid-template-columns: 1fr 360px;
}

/* =========================
   INFO MODAL
   ========================= */

.modal-info {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.modal-info img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.modal-info h2 {
  margin-bottom: 10px;
}

.modal-info p {
  line-height: 1.5;
}

#modalPais {
  margin-bottom: 14px;
  font-size: 14px;
  opacity: 0.85;
}

#modalBio {
  text-align: justify;
  line-height: 1.6;
}

/* =========================
   BOTONES
   ========================= */

.modal-acciones {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-ivoox {
  background-color: #222;
  color: #fff;
  border: 1px solid #444;

  padding: 10px 14px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}

.btn-ivoox:hover {
  background-color: #333;
}

.btn-contacto {
  background-color: rgb(232, 73, 0);
  color: #fff;

  text-align: center;
  padding: 10px 14px;
  border-radius: 6px;

  font-weight: 600;
  text-decoration: none;
  width: 100%;
}

.btn-contacto:hover {
  background-color: rgb(200, 60, 0);
}

/* =========================
   IVOOX
   ========================= */

.modal-ivoox {
  border-radius: 10px;
  padding: 10px;
}

.modal-ivoox.hidden {
  display: none;
}

.modal-ivoox iframe {
  width: 100%;
  height: 240px;
  border: none;
  border-radius: 8px;
}

/* =========================
   CERRAR
   ========================= */

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;

  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 600px) {
  .hero h1 {
    font-size: clamp(52px, 14vw, 78px);
    line-height: 0.95;

    text-align: center;

    padding: 0 0;
    margin: 0;

    width: 100%;
    max-width: none;
    white-space: normal;
  }

  .hero-trovadores {
    display: flex;
    justify-content: center;
  }

  .hero-trovadores h1 {
    font-size: clamp(100px, 10vw, 56px);
    line-height: 1.05;
    text-align: center;

    width: 100%;
    max-width: 300px;
    padding: 0 6px;

    white-space: normal;
  }

  .galeriaInvitados {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 12px;
  }

  .celdaInvitado {
    max-width: none;
  }

  .nombreInvitado {
    font-size: 14px;
  }

  .modal-content.con-ivoox .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-content.con-ivoox {
    max-height: 90vh; /* refuerzo cuando se abre iVoox */
  }

  .controles-invitados {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .controles-invitados input,
  .controles-invitados select {
    width: 100%;
    min-width: unset;
    flex: unset;
    height: auto;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.3;
  }

  .controles-invitados select {
    -webkit-appearance: none;
    appearance: none;

    background-image:
      linear-gradient(45deg, transparent 50%, #fff 50%),
      linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position:
      calc(100% - 18px) 50%,
      calc(100% - 12px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;

    padding-right: 36px;
  }

  .modal-info {
    order: 1;
  }
  /* iVoox debajo de la imagen */
  .modal-ivoox {
    order: 2;
  }
}

@media (max-width: 390px) {
    .hero-trovadores h1 {
    font-size: clamp(90px, 10vw, 56px);
    }
}