/* Font Declarations */
@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubunturegular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntubold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntuitalic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntubolditalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntulight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntulightitalic.ttf') format('truetype');
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntumedium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Ubuntu';
  src: url('../fuentes/ubuntumediumitalic.ttf') format('truetype');
  font-weight: 500;
  font-style: italic;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  user-select: none; /* Evita la selecciÃ³n de texto */
  -webkit-user-select: none; /* Safari */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE/Edge */
  cursor: default; /* Cambia el cursor a default en lugar del cursor de texto */
}

html {
  overflow-x: hidden;
  touch-action: manipulation;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  width: 100vw;
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/fondo.png');
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* Layout Containers */
.container {
  width: 100%;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Typography */
.title {
  color: white;
  text-align: left;
  margin: 20px auto;
  width: 100%;
  max-width: 1040px;
  margin-right: -29px;
  
}

.title-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  gap: 16px; /* Espacio entre textos y logo, ajusta si lo deseas */
}

.title-main .regular {
  font-family: 'Ubuntu';
  font-weight: normal;
  font-size: 30px;
}

.title-main .bold {
  font-family: 'Ubuntu';
  font-weight: bold;
  font-size: 43px;
}

.title-secondary {
  display: block;
}

.title-secondary .bold-italic {
  font-family: 'Ubuntu';
  font-weight: bold;
  font-style: italic;
  font-size: 30px;
}

.title-secondary .light-italic {
  font-family: 'Ubuntu';
  font-weight: 300;
  font-style: italic;
  font-size: 29px;
}

.bibliografia {
  margin-top: 20px;
  font-family: 'Ubuntu';
  font-weight: normal;
  font-size: 18px;
}

.bibliografia .light {
  font-family: 'Ubuntu';
  font-weight: 300;
}

/* Map Section */
.map-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
}

.map-container {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.interactive-map {
  width: 100%;
  max-width: 1040px;
  height: auto;
  display: block;
}

.reference-map {
  position: absolute;
  top: 10%;
  right: 10%;
  width: 20%;
  max-width: 250px;
  z-index: 10;
}

.small-map {
  width: 100%;
  height: auto;
}

.map-point {
  position: relative;
  width: 25px;
  height: 25px;
  background-color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
  transform-origin: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.map-point span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: black;
  font-family: 'Ubuntu';
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}

.map-point:hover {
  transform: scale(1.2);
  background-color: #E43D30;
}

.map-point:hover span {
  color: white;
}

/* Buttons Section */
.buttons-section {
  width: 92.8%;
  max-width: 1040px;
  margin-bottom: 20px;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px 20px;
  width: 100%;
  max-width: 1200px;
  padding: 0;
}

.list-button {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 0px 12px;
  color: #333;
  transition: all 0.3s;
  width: 100%;
  margin: 0px 0;
  text-align: left;
  min-height: 46px;
  gap: 10px;
}

.list-button:hover {
  background-color: #704737;
  transform: scale(1.02);
}

.list-button:hover .name {
  color: white;
}

.list-button .number {
  position: relative;
  flex: 0 0 30px;
  height: 30px;
  background-color: #704737;
  color: white;
  border-radius: 50%;
  transition: all 0.3s;
  font-weight: bold;
}

.list-button:hover .number {
  background-color: white;
  color: #704737;
  font-weight: bold;
}

.list-button .number::before {
  content: attr(data-number);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  line-height: 1;
}

.list-button .name {
  font-size: 16px;
  font-family: 'Ubuntu';
  font-weight: normal;
  line-height: 1.2;
  display: flex;
  align-items: center;
  flex: 1;
  color: #704737;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  padding: 20px;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.5);
}

.modal-open .map-container,
.modal-open .buttons-section,
.modal-open .title {
  display: none;
}

.modal.show {
  opacity: 1;
}

.modal-content {
 /*  position: relative;
  width: 100%;
  max-width: 100vw;
  margin: 2px auto;
  background: white;
  border-radius: 8px;
  overflow: visible; */  /* Cambiado de 'hidden' a 'visible' para que se vea el botÃ³n */
  /* padding: 35px; */
  /* margin-top: 10vh; */
  position: relative;
  width: 90vw;
  max-width: 600px;
  margin: 5vh auto;
  background: white;
  border-radius: 8px;
  overflow: visible;
  padding: 20px;
  box-sizing: border-box;
}

.close-button {
  position: absolute;
   top: 10px;
  right: 10px;
  /* top: -30px;
  right: -30px; */  /* Cambiado de 'left' a 'right' */
  color: white;
  font-size: 44px;
  cursor: pointer;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  /* z-index: 1001; */
  z-index: 2;
  line-height: 1;
  font-family: Arial, sans-serif;
  background-color: red;
}

.close-button:hover {
  background: #f0f0f0;
}

.ficha-img {
  /* width: 100%;
  height: auto;
  display: block;
  max-height: 78vh;
  object-fit: fill; */
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Accordion */
.accordion-section {
  padding: 20px;
  background: #EDEBE7;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  border-radius: 0 0 20px 20px;
  margin-top: 13px;
}

.accordion-item {
  margin-bottom: 15px;
}

.accordion-header {
  font-family: 'Ubuntu';
  font-weight: 300;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 30px;
  margin-bottom: 10px;
  border-bottom: 1px solid black;
  padding-bottom: 5px;
  padding-top: 5px;
}

.accordion-header::before {
  content: '';
  position: absolute;
  right: 0;
  width: 20px;
  height: 20px;
  border: 2px solid black;
  border-radius: 50%;
}

.accordion-header::after {
  content: '';
  position: absolute;
  right: 8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 4px 0 4px;
  border-color: black transparent transparent transparent;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
  transform: rotate(180deg);
}

.accordion-content {
  font-family: 'Ubuntu';
  font-weight: 300;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-out;
  margin-bottom: 15px;
  font-size: 18px;
}

.accordion-item.active .accordion-content {
  padding: 10px 0;
  max-height: 200px;
  overflow-y: auto;
}

/* Logo Container */
/* .logo-container {
  position: absolute;
  right: 10px;
  bottom: -6px;
  padding: 20px;
  z-index: 1;
}

.logo-container img {
  width: 300px;
  height: auto;
} */
 .logo-container {
  position: static;
  width: auto;
  background: transparent;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 0;
  pointer-events: none; /* evita que tape otros elementos interactivos */
}

 .logo-container img {
  width: 250px; /* ajusta según tu preferencia */
  height: auto;
  max-width: 100%;
  display: block;
  margin: auto;
  pointer-events: auto; /* permite hacer clic en el logo si es necesario */
}

/* Orientation Overlay */
.orientation-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.overlay-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.overlay-fondo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5vh;
}

.overlay-texto-arriba {
  width: auto;
  height: auto;
  max-width: 40%;
  object-fit: contain;
  align-self: flex-start;
}

.overlay-gira-celular {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 40vh;
  object-fit: contain;
}

.overlay-logo {
  width: auto;
  height: auto;
  max-width: 25%;
  object-fit: contain;
  align-self: flex-end;
}

/* Media Queries */
@media screen and (orientation: landscape) {
  .container {
    justify-content: center;
    padding: 20px;
    max-width: 1080px;
    margin: 0 auto;
  }

  .title {
    text-align: center;
    margin-right: 0;
  }

  .map-section {
    width: 100%;
    max-width: 1200px;
  }

  .map-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
  }

  .interactive-map {
    max-width: 100%;
    height: auto;
  }

  .buttons-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }

  .button-grid {
    margin: 0 auto;
    max-width: 1000px;
  }

  .logo-container {
    /* position: relative; */
    width: 100%;
    max-width: 1040px;
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    margin-top: 20px;
  }

  .logo {
    width: 330px;
    height: auto;
    display: block;
  }
}

@media screen and (max-width: 800px) {
  /* Typography */
  .title {
    padding: 0 10px;
    margin: 20px auto;
    width: 100%;
  }
  
  .ficha-img {
    /* width: 100%;
    height: auto;
    display: block;
    max-height: 78vh;
    object-fit: fill; */
    max-height: 40vh;
  }
  
  .title-main .regular,
  .title-main .bold {
    font-size: 32px;
  }

  .title-secondary .bold-italic,
  .title-secondary .light-italic {
    font-size: 21px;
  }

  .bibliografia {
    font-size: 10px;
  }

  /* Button Grid */
  .button-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 12px;
    padding: 0 10px;
  }

  /* Map Points */
  .map-point {
    width: 15px !important;
    height: 15px !important;
  }

  .map-point span {
    font-size: 10px !important;
  }

  /* Accordion */
  .accordion-header {
    font-size: 10px !important;
    padding-right: 25px;
    margin-bottom: 8px;
    padding-bottom: 4px;
  }

  .accordion-header::before {
    width: 16px;
    height: 16px;
    right: 0;
  }

  .accordion-header::after {
    right: 6px;
    border-width: 5px 3px 0 3px;
  }

  .accordion-content {
    font-size: 12px !important;
    margin-bottom: 10px;
  }

  .accordion-item.active .accordion-content {
    max-height: 150px !important;
  }

  /* Logo */
  .logo-container {
    bottom: -2px;
  }
  
  .logo-container img,
  .logo {
    width: 180px;
  }
  
  .close-button {
    width: 40px;  /* TamaÃ±o mÃ¡s pequeÃ±o para mÃ³vil */
    height: 40px;
    font-size: 24px;
    top: -20px;
    right: -20px;  /* Ajustado para mantener la posiciÃ³n a la derecha */
  }
}

@media screen and (min-width: 1200px) {
  
  .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
    /* otros estilos para pantallas grandes */
  }

  .buttons-section {
    display: block !important;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto 0 auto;
  }
  .button-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 24px;
  }
  .title {
    font-size: 48px;
    text-align: left;
  }

  .modal-content {
    max-width: 650px;
    padding: 40px 32px 32px 32px;
    margin: 6vh auto;
    border-radius: 12px;
    /* Puedes ajustar estos valores según tu preferencia */
  }

  .ficha-img {
    max-width: 550px;
    max-height: 70vh;
    width: 120%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
  }

  /* Más estilos para aprovechar el espacio en pantallas grandes */
 }
 @media (max-width: 600px) {
  .modal-content {
    
    width: 98vw;
    max-width: 98vw;
    padding: 8px;
  }
  .ficha-img {
    /* max-height: 40vh; */
    max-height: 30vh;
  }
}
