@import url('../variables.css');

* {

  margin: 0;
  padding: 0;
  box-sizing: border-box;

}

html {

  scroll-behavior: smooth;

}

body {

  font-family: 'Montserrat', sans-serif;
  font-size: var(--fuente-size);

  background: var(--blanco);
  color: var(--texto);

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

}


/*==============================
HEADER
==============================*/

header {

  width: 100%;

}

header img {

  width: 100%;
  display: block;

}

.bg-title {

  background: var(--guinda);
  color: var(--blanco);

}

.bg-title h1 {

  margin: 0;
  font-weight: 600;

}


/*==============================
CONTENIDO PRINCIPAL
==============================*/

main {

  width: 100%;
  max-width: 1200px;

  margin: auto;

  padding: 40px 20px;

}


/*==============================
GRID
==============================*/

.cards-wrapper {

  width: min(100%, 1100px);

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    repeat(12,
      minmax(0, 1fr));

  gap: 18px;

  padding: 0 10px;

}


/*==============================
IMAGEN SEPARADORA
==============================*/

.contenedor-imagen {

  grid-column: 1/-1;

  width: 100%;

  display: flex;

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

  margin: 20px 0;

}

.contenedor-imagen img {

  width: 100%;
  max-width: 1000px;

  height: auto;

  object-fit: contain;

  display: block;

}


/*==============================
CARD GENERAL
==============================*/

.card {

  border-radius: 26px;

  overflow: hidden;

  cursor: pointer;

  background: var(--blanco);

  box-shadow:
    0 4px 14px rgba(0,
      0,
      0,
      .08);

  transition:
    transform .25s ease,
    box-shadow .25s ease;

}

.card:hover {

  transform: translateY(-5px);

  box-shadow:
    0 12px 30px rgba(0,
      0,
      0,
      .15);

}

.card img {

  width: 100%;

  height: auto;

  display: block;

  object-fit: cover;

}


/*==============================
TOP CARDS
==============================*/

.top-card {

  grid-column: span 4;

}


/*==============================
GRID CARDS
==============================*/

.grid-card {

  grid-column: span 3;

}


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

.modal {

  position: fixed;

  inset: 0;

  background:
    rgba(0,
      0,
      0,
      .7);

  display: flex;

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

  opacity: 0;
  visibility: hidden;

  transition: .3s;

  padding-top: 20px;

  z-index: 2000;

}

.modal.active {

  opacity: 1;
  visibility: visible;

}

.modal-content {

  position: relative;

  width: auto;

  max-width: 95vw;
  max-height: 90vh;

  overflow-y: auto;
  overflow-x: hidden;

  background: #000;

  border-radius: 20px;

  padding: 10px;

}

.modal-content img {

  width: 100%;
  height: auto;

  display: block;

}

.modal-close {

  position: absolute;

  top: 10px;
  right: 15px;

  color: var(--blanco);

  font-size: 32px;

  cursor: pointer;

}


/*==============================
TABLET
==============================*/

@media(max-width:992px) {

  .top-card {

    grid-column: span 6;

  }

  .grid-card {

    grid-column: span 6;

  }

}

/* =========================
   MAPA INTERACTIVO
========================= */

.map-wrapper {

  position: relative;

  width: 100%;
  max-width: 1045px;

  aspect-ratio: 1045 / 590;

  margin: 30px auto;

  background:
    url('../../img_nv/turismo/Mapa.jpg') center center / contain no-repeat;

  /*border: 4px solid var(--guinda);*/

  border-radius: 12px;

  cursor: pointer;

}

.mapa-title{
  text-align: center;
  margin: 0 auto 40px;
  font-weight: 700;
}

/* =========================
   Ver mas
========================= */

.btn-ver-mas {

  display: inline-flex;

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

  margin-top: 20px;

  padding: 12px 30px;

  background: #D4AF37;

  color: #fff;

  text-decoration: none;

  border-radius: 50px;

  font-weight: 600;

  transition: .3s ease;

}

.btn-ver-mas:hover {

  transform: translateY(-2px);

  background: #BE9828;

}

.mapa-modal-content {

  display: flex;

  flex-direction: column;

  align-items: center;

}


/* =========================
   PUNTOS DEL MAPA
========================= */

.punto {

  position: absolute;

  width: 16px;
  height: 16px;

  background: var(--dorado);

  border: 2px solid #fff;

  border-radius: 50%;

  transform: translate(-50%, -50%);

  z-index: 2;

  animation: pulse 2s infinite;

}

@keyframes pulse {

  0% {
    box-shadow: 0 0 0 0 rgba(138, 21, 56, .7);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(138, 21, 56, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(138, 21, 56, 0);
  }

}

/* =========================
   MODAL DEL MAPA
========================= */

.mapa-modal {

  position: fixed;

  inset: 0;

  display: none;

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

  background: rgba(0, 0, 0, .65);

  z-index: 3000;

  padding: 20px;

}

.mapa-modal.active {

  display: flex;

}

.mapa-modal-content {

  position: relative;

  width: min(740px, 95vw);

  max-height: 90vh;

  overflow-y: auto;

  background: #fff;

  border-radius: 12px;

  padding: 15px;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, .25);

}

.mapa-modal-content h3 {

  margin: 0 0 12px;

  color: var(--guinda);

  font-weight: 600;

  text-align: center;

}

.mapa-modal-content img {

  width: 100%;

  height: auto;

  display: block;

  border-radius: 10px;

}

/* =========================
   BOTÓN CERRAR
========================= */

.mapa-close {

  position: absolute;

  top: 8px;
  right: 12px;

  font-size: 24px;

  line-height: 1;

  cursor: pointer;

  color: var(--guinda);

  font-weight: bold;

  transition: transform .2s ease;

}

.mapa-close:hover {

  transform: scale(1.1);

}

.contenedor-mapa {
  margin: 40px auto;
}

/* =========================
   SERVICIOS TURISTICOS
========================= */

.servicios-turisticos {

  display: grid;

  grid-template-columns: repeat(3, 280px);

  justify-content: center;

  gap: 40px;

  padding: 40px 0 60px;

}

.servicio-card {

  border: 2px solid rgba(255,255,255,.8);

  border-radius: 0 80px 0 80px;

  min-height: 260px;

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

  gap: 20px;

  cursor: pointer;

  transition: .3s ease;

}

.card-guinda {

  background: var(--rojo);

}

.card-dorado {

  background: var(--verde);

}

.card-verde {

  background: var(--color-fuchsia);

}

.servicio-card:hover {

  transform: translateY(-8px);

  box-shadow:
    0 12px 25px rgba(0,0,0,.25);

}

.servicio-card img {

  width: 170px;
  max-width: 70%;

  object-fit: contain;

}

.servicio-card span {

  color: white;

  font-size: 2rem;

  font-weight: 600;

  text-align: center;

}

/* Tablet */

@media (max-width: 1200px) {

  .servicios-turisticos {

    grid-template-columns: repeat(2, 1fr);

  }

}

/* Móvil */

@media (max-width: 768px) {

  .servicios-turisticos {

    grid-template-columns: 1fr;

    gap: 20px;

  }

  .servicio-card {

    min-height: 220px;

  }

  .servicio-card span {

    font-size: 1.5rem;

  }

}

/* =========================
   HISTORIA
========================= */

.historia-section{

  width: 100vw;

  margin-left: calc(50% - 50vw);

  padding: 60px 40px;

}

.historia-title {

  text-align: center;

  font-size: clamp(2rem, 4vw, 3rem);

  font-weight: 700;

  color: #222;

  margin-bottom: 50px;

}

/* FILA HORIZONTAL */

.historia-grid {

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 10px;

  width: 100%;

}

/* Chrome */

.historia-grid::-webkit-scrollbar {

  height: 8px;

}

.historia-grid::-webkit-scrollbar-thumb {

  background: rgba(0,0,0,.25);
  border-radius: 20px;

}

.historia-btn {

  flex: 1;

  max-width: 115px;

  min-width: 80px;

  height: 120px;

  border: none;
  border-radius: 12px;

  background: #a6a6a6;

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

  padding: 10px;

  color: #fff;

  cursor: pointer;

  transition: .3s;

  box-shadow:
    10px 10px 18px rgba(0,0,0,.18);

}

.historia-btn:hover {
    background-color: rgba(255, 204, 0 , 1);
}


.historia-btn img {

  width: 38px;
  height: 38px;

}

.historia-btn span {

  font-size: .68rem;

  white-space: nowrap;

}

.historia-btn:hover {

  transform: translateY(-6px);

  box-shadow:
    15px 15px 25px rgba(0,0,0,.22);

}

.historia-btn img {

  width: 95px;
  height: 95px;

  object-fit: contain;

}

.historia-btn span {

  font-size: .75rem;
  font-weight: 600;

  text-align: center;
  line-height: 1.2;

  white-space: nowrap;

}

/* Tablet */
@media (max-width: 992px) {

  .historia-grid {

    display: grid;

    grid-template-columns: repeat(6, 1fr);

    gap: 12px;

  }

  .historia-btn {

    min-height: 90px;

  }

  .historia-btn img {

    width: 40px;
    height: 40px;

  }

  .historia-btn span {

    font-size: .70rem;

  }

}

/* Móvil */
@media (max-width: 768px) {

  .historia-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    width: 100%;

  }

  .historia-btn {

    width: 100%;

    min-height: 85px;

    padding: 10px 5px;

  }

  .historia-btn img {

    width: 32px;
    height: 32px;

  }

  .historia-btn span {

    font-size: .60rem;

    white-space: normal;

    line-height: 1.1;

  }

}


/* =========================
   TABLET
========================= */

@media (max-width: 992px) {

  .map-wrapper {

    max-width: 100%;

  }

}

/* =========================
   MÓVIL
========================= */

@media (max-width: 768px) {

  .map-wrapper {

    border-width: 2px;

    border-radius: 8px;

    margin: 20px auto;

  }

  .punto {

    width: 14px;
    height: 14px;

  }

  .mapa-modal {

    padding: 10px;

  }

  .mapa-modal-content {

    width: 95vw;

    padding: 12px;

  }

  .mapa-close {

    font-size: 22px;

  }

}

/*==============================
MOVIL
==============================*/

@media(max-width:768px) {

  main {

    padding: 15px 10px;

  }

  .cards-wrapper {

    width: 92%;

    margin: auto;

    grid-template-columns: 1fr;

    gap: 10px;

  }

  /* cards más pequeñas */

  .top-card,
  .grid-card {

    grid-column: auto;

    width: 100%;

  }

  .card {

    border-radius: 14px;

    transform: scale(.92);

    transform-origin: center;

  }

  /* mantener imagen completa */

  .card img {

    width: 100%;

    height: auto;

    object-fit: contain;

  }

  /* imagen separadora */

  .contenedor-imagen {

    margin: 8px 0;

  }

  .modal-content {

    width: 95vw;

  }

}