/* =============================================
   PALETA INAH
   Café:   #5c3e35   |  Rojo: #d23930
   Dorado: #c9b458   |  Gris texto: #5a5a5a
   ============================================= */

/* ---------------------------------------------
   1. TARJETA CONTENEDORA (ACORDEÓN)
   --------------------------------------------- */
.invitados-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(92, 62, 53, 0.10);
  margin: 30px 0;
  border: 1px solid #efe9e5;
}

/* Cabecera */
.invitados-card .location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 28px;
  cursor: pointer;
  list-style: none;
  background: #ffffff;
  border-bottom: 3px solid #d23930; /* Línea roja INAH */
  user-select: none;
}

.invitados-card .location-header::-webkit-details-marker {
  display: none;
}

.invitados-card .location-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #5c3e35;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.3px;
}

.invitados-card .location-header h3 i {
  color: #c9b458; /* Estrella dorada */
}

/* Flecha que rota al abrir */
.invitados-card .toggle-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f6efe9;
  color: #5c3e35;
  transition: transform 0.35s ease, background 0.3s ease, color 0.3s ease;
}

.invitados-card[open] .toggle-arrow {
  transform: rotate(180deg);
  background: #d23930;
  color: #ffffff;
}

/* ---------------------------------------------
   2. ANIMACIÓN DE APERTURA
   --------------------------------------------- */
.invitados-card[open] .location-content {
  animation: invFade 0.4s ease;
}

@keyframes invFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------
   3. GRID 50 / 50
   --------------------------------------------- */
.invitados-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Mitad y mitad */
  gap: 0;
}

/* Cada mitad */
.guest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 38px 34px;
  position: relative;
  transition: background 0.3s ease;
}

/* Separador central */
.guest-item:not(:last-child) {
  border-right: 1px solid #eee4dd;
}

.guest-item:hover {
  background: #fdfbf9;
}

/* ---------------------------------------------
   4. ICONO / BANDERA REPRESENTATIVA
   --------------------------------------------- */
.guest-flag {
  width: 78px;
  height: 78px;
  margin-bottom: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
  line-height: 1;
  background: #fdf7f0;
  border: 2px solid #c9b458;
  box-shadow: 0 4px 14px rgba(92, 62, 53, 0.12);
}

/* ---------------------------------------------
   5. INFO DEL INVITADO
   --------------------------------------------- */
.guest-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 420px; /* Mantiene el texto legible y centrado */
}

.guest-info h4 {
  color: #5c3e35;
  margin: 0 0 16px;
  font-size: 1.3rem;
  line-height: 1.3;
  position: relative;
  padding-bottom: 12px;
}

/* Subrayado decorativo centrado */
.guest-info h4::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 46px;
  height: 3px;
  background: #d23930;
  border-radius: 3px;
}

.guest-info p {
  font-size: 0.96rem;
  color: #5a5a5a;
  line-height: 1.65;
  text-align: justify;   /* Texto justificado */
  hyphens: auto;
  margin: 0;
  flex: 1;
}

/* ---------------------------------------------
   6. BOTONES DE IMÁGENES
   --------------------------------------------- */
.guest-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  width: 100%;
}

.btn-guest {
  flex: 1 1 calc(50% - 5px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid #e2d8d2;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  color: #5c3e35;
  transition: all 0.25s ease;
}

.btn-guest i {
  color: #c9b458;
  transition: color 0.25s ease;
}

.btn-guest:hover {
  background: #d23930;
  color: #ffffff;
  border-color: #d23930;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(210, 57, 48, 0.3);
}

.btn-guest:hover i {
  color: #ffffff;
}

/* ---------------------------------------------
   7. MODAL DE IMAGEN
   --------------------------------------------- */
.modal-invitados {
  display: none;
  position: fixed;
  z-index: 10000;
  inset: 0;
  background: rgba(40, 26, 22, 0.88);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-img {
  max-width: 92%;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: invZoom 0.3s ease;
}

@keyframes invZoom {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Botón cerrar "X" */
.close-modal-img {
  position: absolute;
  top: 22px;
  right: 32px;
  color: #ffffff;
  font-size: 42px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.3s ease, transform 0.3s ease;
}

.close-modal-img:hover {
  color: #d23930;
  transform: scale(1.15) rotate(90deg);
}

/* ---------------------------------------------
   8. RESPONSIVO
   --------------------------------------------- */
@media (max-width: 720px) {
  .invitados-grid {
    grid-template-columns: 1fr; /* Se apilan en móvil */
  }

  .guest-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid #eee4dd; /* Separador horizontal */
  }

  .guest-item {
    padding: 30px 24px;
  }

  .invitados-card .location-header {
    padding: 18px 22px;
  }

  .invitados-card .location-header h3 {
    font-size: 1.15rem;
  }
}