/* RESPONSIVIDAD PARA EL GRID PRINCIPAL */
@media (max-width: 1100px) {
  .grid--dias {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .grid-item {
    width: auto;
    max-width: 100%;
    min-height: 90px;
    max-height: none;
    padding: 6px 2px;
  }
}

@media (max-width: 900px) {
  .main-layout {
    flex-direction: column !important;
    align-items: center !important;
    gap: 18px !important;
    padding: 20px 16px 0 16px !important;
  }

  .col-izq {
    width: 100% !important;
    justify-content: center !important;
  }

  .img-repre183 {
    width: 100% !important;
    max-width: 340px !important;
  }

  .col-der {
    width: 100% !important;
    min-width: 0 !important;
  }

  .img-libro {
    width: 100% !important;
  }

  .grid--dias {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    justify-items: center;
  }

  .grid-item {
    width: auto;
    max-width: 100%;
    min-height: 80px;
    max-height: none;
    padding: 8px 4px;
  }
}

@media (max-width: 600px) {

  /* Nav */
  nav {
    display: flex;
    justify-content: center;
    padding: 8px 16px;
  }

  nav .logo,
  nav img {
    width: 100% !important;
    max-width: 320px !important;
    height: auto !important;
  }

  /* Barra de logos superior */
  .plecasup--logos {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
  }

  .logo-bar-img {
    height: 44px !important;
    max-width: 120px !important;
  }

  /* Layout principal */
  .main-layout {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 12px 0 12px !important;
  }

  .col-izq {
    width: 100% !important;
    justify-content: center !important;
  }

  .img-repre183 {
    width: 100% !important;
    max-width: 280px !important;
  }

  .col-der {
    width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
  }

  .libro-wrapper,
  .libro-link {
    max-width: 100% !important;
  }

  .img-libro {
    width: 100% !important;
  }

  /* Grid de días */
  .container {
    width: 100%;
    padding: 0 8px;
  }

  .grid--dias {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    width: 100%;
    justify-items: center;
  }

  .grid-item {
    width: 100%;
    max-width: 100%;
    min-height: 60px;
    max-height: none;
    padding: 8px 4px;
  }

  .grid-item .btnes {
    flex-direction: column !important;
    gap: 6px !important;
  }

  .grid-item .btn-itinerario,
  .grid-item .btn-ruta {
    width: 100%;
    text-align: center;
  }

  /* Galería */
  .galeria-header {
    padding: 0 16px 12px 16px;
  }

  .galeria-titulo {
    font-size: 1.1rem;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  margin: 0px;
  font-family: "Montserrat", sans-serif;
  /* background: #e7dcee; */
  background: url(../img/Plecas/back_repre.png);
  background-repeat: no repeat;
  background-attachment: fixed;
  background-size: cover;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  justify-items: center;
  align-items: flex-start;
  width: 100%;
}

.grid-item {
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  min-height: 100px;
  max-height: 190px;
  width: 175px;
  max-width: 180px;
  padding: 8px 6px;
}

.grid-item:hover {
  transform: translateY(-5px);
}

.grid-item {
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  /* padding: 80px; */
}

.grid-item h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.grid-item p {
  font-size: 18px;
  opacity: 0.9;
  color: black;
}

.grid-item .grid-item-content {
  padding: 15px;
}

.grid-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.grid-item h3 {
  margin: 10px 0;
  color: #222;
}

.grid-item-content {
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.grid-item h3 {
  margin-top: 0;
  color: #222;
}

.img-live {
  margin-top: 10px;
  margin-bottom: 25px;
  width: 100%;
  padding: 15px;
  display: flex;
  justify-content: center;
}

.plecasup {}

h2 {
  color: #703896;
  width: 300px;
}

.menu-main {
  background: #ffffff;
  display: flex;
  justify-content: center;
}

.img-logo {
  width: 660px;
  height: auto;
  margin-left: 10px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.plecasup {
  display: flex;
  justify-content: center;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.logo {
  height: 55px;
  max-height: 70px;
  width: auto;
  cursor: pointer;
}

@media (max-width: 480px) {

  /* Reservado — no forzar column en grid-dias en pantallas pequeñas;
       el breakpoint de 600px ya lo maneja con 2 columnas */
  .grid-item img {
    width: 100%;
    object-fit: contain;
    height: auto;
    max-height: 80px;
  }
}

@media (min-width: 360px) {
  .logo {
    width: 360px;
  }
}

.btn-itinerario {
  background: #6e627f;
  color: white;
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  display: inline-block;
  margin: 0 2px;
}

.btn-itinerario:hover {
  background: #6e627f;
  transform: translateY(-2px);
}

.btn-itinerario:active {
  transform: translateY(0);
}

/* Efecto de onda al hacer hover (opcional) */
.btn-itinerario::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-itinerario:hover::after {
  animation: ripple 1s ease-out;
}

.btn-ruta {
  background: #4b3d63;
  color: white;
  padding: 4px 10px;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  display: inline-block;
  margin: 0 2px;
}

.btn-ruta:hover {
  background: #4b3d63;
  transform: translateY(-2px);
}

.btn-ruta:active {
  transform: translateY(0);
}

/* Efecto de onda al hacer hover (opcional) */
.btn-ruta::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-ruta:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }

  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

.btnes {
  display: flex;
  flex-direction: row;
  gap: 18px;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  width: 100%;
}

/* Mejoras específicas para iPhone */
@media only screen and (max-width: 767px) {
  .btnes {
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .btn-itinerario,
  .btn-ruta {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 6px 4px;
    margin: 0;
    text-align: center;
  }

  h2 {
    width: auto;
    font-size: 0.9rem;
  }

  .logo {
    height: auto;
    max-width: 100%;
  }
}

/* Optimización para iPad */
@media only screen and (max-width: 900px) {
  .grid--dias {
    grid-template-columns: repeat(3, 1fr);
    display: grid;
    gap: 10px;
    justify-items: center;
  }

  .btnes {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: center;
  }

  .plecasup {
    display: flex;
    justify-content: center;
  }
}

/* Ajustes para Safari en iOS */
@supports (-webkit-touch-callout: none) {
  body {
    background-attachment: scroll;
    /* Safari no soporta fixed con background-size: cover */
  }

  .grid-item {
    transition: none;
    /* Mejor rendimiento sin transiciones */
  }

  .grid-item:hover {
    transform: none;
    /* No hay hover en touch */
  }
}

/* ============================================================
   GALERÍA FOTOGRÁFICA — estilos nuevos (agregados al final)
   ============================================================ */

.galeria-section {
  width: 100%;
  padding: 32px 0 24px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: black;
}

.galeria-header {
  padding: 0 48px 20px 48px;
}

.galeria-titulo {
  display: inline-block;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 4px 12px;
  font-family: "Montserrat", sans-serif;
}

.galeria-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.galeria-track {
  display: flex;
  flex-direction: row;
  /* Transición lenta y suave — como pasar páginas de un libro */
  transition: transform 1.1s cubic-bezier(0.45, 0.05, 0.25, 1);
  width: 100%;
  will-change: transform;
}

.galeria-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 33.333%;
  width: 33.333%;
  max-width: 33.333%;
  height: 480px;
  position: relative;
  overflow: hidden;
  opacity: 0.72;
  transition: opacity 0.4s;
  border: 3px solid transparent;
  box-sizing: border-box;
  padding: 8px;
}

/* .galeria-slide--selected {
    opacity: 1;
    border: 3px solid #aad4f5;
} */

.galeria-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: auto;
}

.galeria-caption {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #222;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 3px;
  line-height: 1.3;
  font-family: "Montserrat", sans-serif;
}

.galeria-dots {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding-bottom: 8px;
}

.galeria-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.4;
  cursor: pointer;
  display: inline-block;
  transition: opacity 0.3s;
}

.galeria-dot--active {
  opacity: 1;
}

/* Responsive galería */
@media (max-width: 900px) {
  .galeria-slide {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    height: 320px;
  }

  .galeria-header {
    padding: 0 24px 16px 24px;
  }
}

@media (max-width: 600px) {
  .galeria-slide {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    height: 260px;
  }

  .galeria-header {
    padding: 0 16px 14px 16px;
  }

  .galeria-titulo {
    font-size: 1.2rem;
  }
}

.plecasup--logos {
  justify-content: flex-end;
  align-items: flex-start;
  gap: 24px;
  padding: 18px 40px 0 0;
  background: transparent;
}

/* Imágenes de la barra de logos */
.logo-bar-img {
  height: 60px;
  max-width: 160px;
}

.bg-mapa {
  background: url("../img/semsanta/mapa183.png") center/cover no-repeat !important;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 40px;
}

/* Layout de dos columnas principal */
.main-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 30px auto;
  gap: 32px;
  padding: 40px 10px 0 10px;
}

/* Columna izquierda (imagen representacion183) */
.col-izq {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
  width: 340px;
  max-width: 100%;
}

.img-repre183 {
  width: 340px;
  max-width: 100%;
  background: transparent;
}

/* Columna derecha */
.col-der {
  flex: 1 1 0%;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
}

/* Wrapper del libro */
.libro-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.libro-link {
  width: 100%;
  max-width: 650px;
  display: block;
}

.img-libro {
  width: 650px;
  max-width: 100%;
  background: transparent;
  display: block;
  margin: 0 auto;
}

.container {
  width: 100%;
}

.grid--dias {
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: space-between;
}

.grid-item h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.img_dia {
  margin-bottom: 2px;
}

.img_dia img {
  width: 100%;
  height: 100%;
  max-width: 100px;
  object-fit: contain;
}

.grid-item .btnes {
  gap: 4px;
}

.grid-item .btn-itinerario,
.grid-item .btn-ruta {
  padding: 6px 10px;
  font-size: 12px;
}

.galeria-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  padding: 4px 0;
}

.galeria-btn {
  background: rgba(112, 56, 150, 0.15);
  color: #703896;
  border: 2px solid rgba(112, 56, 150, 0.4);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.3s,
    border-color 0.3s,
    transform 0.2s;
  flex-shrink: 0;
  user-select: none;
}

.galeria-btn:hover:not(:disabled) {
  background: rgba(112, 56, 150, 0.3);
  border-color: #703896;
  transform: scale(1.08);
}

.galeria-btn:disabled {
  opacity: 0.28;
  cursor: default;
}

/* Contador  "1 / 33" */
.galeria-counter {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.5px;
  padding-bottom: 4px;
}

/* Dots compactos cuando hay muchos pasos */
.galeria-dot--mini {
  width: 8px;
  height: 8px;
}

/* Scroll horizontal para dots si son muchos */
.galeria-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  max-width: 320px;
  padding-bottom: 0;
}

/* PUEBLOS ORIGINARIOS */
.pueblos-section {
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  background-image: url("./img/fondos/background.png");
  background-size: cover;
  background-position: center;
  min-height: 100vh;
}



.pueblos-titulo-principal {
  font-size: 2rem;
  color: #722f37;
  font-weight: bold;
}

.pueblos-imagen {
  width: 100%;
  border-radius: 15px;
}

.pueblos-boton {
  background: #ddc9a2;
  color: #333;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.3s;
  width: 100%;
  color: #691d33;
  font-weight: 600;
}

.pueblos-boton i {
  margin-left: 10px;
  transition: transform 0.3s;
  color: #f2f2f2;
}

.pueblos-boton.active i {
  transform: rotate(180deg);
}

/*BOTÓN DE MAPA*/

.btn_mapa {
  background: #691d33;
  /* color: #333; */
  border: none;
  padding: 10px 0px;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: all 0.3s;
  width: 42%;
  color: #ddc9a2;
  font-weight: 600;
  margin-left: 62px;
}

.btn_mapa a {
  color: #ddc9a2;
  text-decoration: none;
  padding: 0px 59px 0px;
}

.btn_mapa:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(105, 29, 51, 0.4);
}

.pueblos-boton:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* CONTENIDO DESPLEGABLE */
.pueblos-contenido {
  background: white;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: none;
}

.pueblos-contenido p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.lista li {
  padding: 8px 0;
  list-style-position: inside;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.lista-item-texto {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
  text-align: center;
}

.botones-accion {
  display: flex;
  gap: 8px;
}

.btn-accion {
  background: #691d33;
  color: #ddc9a2;
  border: none;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.btn-accion:hover {
  background: #4e1526;
  transform: translateY(-2px);
}

.btn-accion i {
  margin-right: 5px;
}

.btn-pdf {
  background: #722f37;
}

.btn-pdf:hover {
  background: #5a252c;
}

/* Media Queries para tablets */
@media (min-width: 768px) {
  .pueblos-section {
    padding: 60px 40px;
    flex-direction: row;
  }

  .pueblos-left {
    padding-right: 30px;
    margin-bottom: 0;
  }

  .pueblos-right {
    padding-left: 30px;
  }

  .pueblos-titulo {
    text-align: left;
  }

  .pueblos-subtitulo {
    font-size: 1.8rem;
  }

  .pueblos-titulo-principal {
    font-size: 2.5rem;
  }

  .pueblos-imagen {
    max-height: 560px;
  }

  .pueblos-boton {
    padding: 15px 25px;
    font-size: 1.2rem;
    width: 60%;
  }

  .btn-accion {
    padding: 8px 15px;
    font-size: 1rem;
  }
}

/* Media Queries para desktop */
@media (min-width: 1024px) {
  .pueblos-section {
    padding: 70px 50px;
  }

  .pueblos-left {
    flex: 1.5;
    padding-right: 40px;
  }

  .pueblos-right {
    flex: 1;
    padding-left: 40px;
    margin-top: 110px;
  }
}

ul {
  list-style: none;
  padding-left: 0;
}