:root {
  --main-bg-color: #F5F5F5;
  --highlight-color: #356576;
  --text-color: #333;
  --text-hover-color: #5E8390;
  --svg-stroke-color: #356576;
}

@media (prefers-color-scheme: dark) {
  :root {
    --main-bg-color: #121212;        /* Very dark background */
    --highlight-color: #3BB8A9;      /* Lighter, cool highlight for dark bg */
    --text-color: #E6E6E6;           /* Light text for readability */
    --text-hover-color: #6DD3C3;     /* Softer highlight on hover */
    --svg-stroke-color: #3BB8A9;
  }

  .icon{
    background: transparent;
    filter: invert(79%) sepia(32%) saturate(512%) hue-rotate(132deg)
            brightness(94%) contrast(92%);
    mix-blend-mode: screen;
  }
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  background-color: var(--main-bg-color);
}




body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  padding: 10px;
}

h1,
h2,
h3,
h4, 
strong
, a {
  color: var(--highlight-color);
}

a:hover {
  color: var(--text-hover-color);
}

h1 {
  font-size: 1.5em;
}

h3 {
  font-size: 1em;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 10px;
}


.header {
  display: flex;
  justify-content: center;
  /* Horizontally centers */
  align-items: center;
  border-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 15px;
}

.internal-header {

  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
  max-width: 900px;
  width: 100%;
  /* Ensures the content is responsive, but never exceeds 900px */
  /* Vertically center nav and logo */
}

.logo {
  width: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
}

.left-header {
  display: flex;
  align-items: center;
}

.encabezado h1 {
  font-size: 1.8em;
  margin: 0;
}

nav {
  display: flex;
}

/* Navegación */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  color: var(--highlight-color);
  text-decoration: none;
  font-weight: bold;
}

nav ul li a:hover {
  text-decoration: underline;
}

.hamburger-checkbox {
  display: none;
}

/* Hide the hamburger by default */
.hamburger {
  display: none;
  font-size: 30px;
  cursor: pointer;
}

@media (max-width: 5000px) {

  /* Hide the navigation links by default */
  .nav-links {
    display: none;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 60px;
    left: 0;
    padding-bottom: 15px;
    border-radius: 8px;
  }

  /* Show navigation links when checkbox is checked */
  .hamburger-checkbox:checked+.hamburger+.nav-links {
    display: block;
  }

  /* Display the hamburger icon on small screens */
  .hamburger {
    display: block;
  }
}

main {
  text-align: center;
  /* Optional: centers text inside elements */
  display: flex;
  justify-content: center;
  /* Horizontally centers */

}

.container {
  max-width: 900px;
  width: 100%;
  /* Ensures the content is responsive, but never exceeds 900px */
  display: block;

}

/* Secciones */
section {
  margin-bottom: 30px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;

  @media (min-width: 600px) {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

.servicios {
  border: 2px solid var(--highlight-color);
  /* turquesa medio */
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 6px rgba(77, 182, 172, 0.4);
  /* sombra turquesa */

  img {
    max-width: 50%;
  }
}

.container-maialen {
  @media (min-width: 700px) {
    display: flex;
  }

  align-items: center;
  /* Alinea verticalmente */
  gap: 50px;
  /* Espacio entre imagen y texto */
  margin-top: 20px;
  border: 2px solid var(--highlight-color);
  /* turquesa medio */
  border-radius: 8px;
  padding: 20px;

  .img-left {
    max-width: 100%;
    /* Ajusta según necesidad */
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    /* Opcional, para bordes redondeados */
  }

  .text-right {
    flex: 1;
    /* Ocupa el espacio restante */
  }

}


.container-iratxe {
  @media (min-width: 700px) {
    display: flex;
    flex-direction: row;
  }

  align-items: center;
  /* Alinea verticalmente */
  gap: 50px;
  /* Espacio entre imagen y texto */
  margin-top: 20px;

  border: 2px solid var(--highlight-color);
  /* turquesa medio */
  border-radius: 8px;
  padding: 20px;

  .img-right {
    max-width: 100%;
    /* Ajusta según necesidad */
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    /* Opcional, para bordes redondeados */
    order: 2;
  }

}

.instalaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  text-align: left;

  @media (min-width: 400px) {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}


.instalaciones {
  position: relative;
  /* Para posicionar el texto sobre la imagen */
  overflow: hidden;
  /* Para que el texto no se vea fuera del contenedor */

  h3 {
    text-align: center;
  }

  .image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que la imagen cubra todo el área */
    transition: opacity 1s ease;
    /* Transición de opacidad para el fade */
    border-radius: 5%;
  }

  /* Estilo del texto */
  .text {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    /* Hace que el texto cubra todo el espacio de la imagen */
    display: flex;
    align-items: center;
    /* Alinea el texto verticalmente en el centro */
    opacity: 0;
    /* Inicialmente oculto */
    transition: opacity 0.3s ease;
    /* Transición de opacidad para el fade */

    ul {
      list-style-type: none;
      /* Quita los puntos predeterminados */
      padding-left: 0;
      /* Elimina el padding por defecto */
      margin: 0;
      /* Elimina el margen por defecto */
    }

    li {
      margin-bottom: 10px;
      /* Espacio entre cada elemento */
      position: relative;
      padding-left: 25px;
      /* Espacio para el icono */
    }

    li::before {
      content: '✔';
      /* Puedes cambiar el "✔" por cualquier otro símbolo o icono */
      position: absolute;
      left: 0;
      color: var(--highlight-color);
    }
  }

}


/* Mostrar el texto al pasar el mouse sobre el contenedor */
.instalaciones-piscina:hover .image-piscina {
  opacity: 0.5
    /* La imagen desaparece */
}

.instalaciones-piscina:hover .text-piscina {
  opacity: 1;
  /* El texto aparece */
}

.instalaciones-vestuario:hover .image-vestuario {
  opacity: 0.5
    /* La imagen desaparece */
}

.instalaciones-vestuario:hover .text-vestuario {
  opacity: 1;
  /* El texto aparece */
}

.carousel {
  max-height: 500px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  width: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: scale-down;
}

input[name="carousel"] {
  display: none;
}

#slide1:checked~.slides {
  transform: translateX(0%);
}

#slide2:checked~.slides {
  transform: translateX(-100%);
}

#slide3:checked~.slides {
  transform: translateX(-200%);
}

.navigation {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.bar {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}

input#slide1:checked~.navigation label[for="slide1"],
input#slide2:checked~.navigation label[for="slide2"],
input#slide3:checked~.navigation label[for="slide3"] {
  background: var(--text-color);
}

/* Autoplay with animation */
@keyframes autoplay {

  0%,
  20% {
    transform: translateX(0%);
  }

  33.33%,
  53.33% {
    transform: translateX(-100%);
  }

  66.66%,
  86.66% {
    transform: translateX(-200%);
  }

  100% {
    transform: translateX(0%);
  }
}

.slides.autoplay {
  animation: autoplay 12s infinite;
}

/* Contenedor principal */
.collapsible-container {
  width: 100%;
}

/* Estilo del texto colapsado */
.collapsible-text {
  max-height: 300px;
  /* Altura máxima del texto colapsado */
  overflow: hidden;
  /* Oculta el contenido que excede el max-height */
  transition: max-height 0.3s ease;
  /* Animación suave */
}

.collapsible-text2 {
  max-height: 300px;
  /* Altura máxima del texto colapsado */
  overflow: hidden;
  /* Oculta el contenido que excede el max-height */
  transition: max-height 0.3s ease;
  /* Animación suave */
}

/* Checkbox oculto */
.toggle-checkbox {
  display: none;
}

/* Checkbox oculto */
.toggle-checkbox2 {
  display: none;
}

/* Cuando el checkbox está marcado, expandir el texto */
.toggle-checkbox:checked+.collapsible-text {
  max-height: 1000px;
  /* Expande el texto */
}

/* Cuando el checkbox está marcado, expandir el texto */
.toggle-checkbox2:checked+.collapsible-text2 {
  max-height: 1000px;
  /* Expande el texto */
}

/* Estilo del botón "Leer más"/"Leer menos" */
.toggle-label {
  cursor: pointer;
  display: block;
  margin-top: 10px; 

  img {
    max-height: 30px;    
  }
}

.como-llegar {
  margin-top: 10px;

  @media (min-width: 600px) {
    display: flex;
    /* Enables Flexbox */
    justify-content: space-between;
    /* Optional: spaces out the columns */
  }
}

.transporte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;

  @media (min-width: 600px) {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}


.transporte {
  display: flex;
  align-items: center;
  /* Alinea verticalmente */
  gap: 10px;
  /* Espacio entre imagen y texto */
  border-radius: 8px;
  flex-direction: column;
  text-align: left;

  ul {
    list-style-type: none;
    /* Removes the bullet points */
    padding-left: 0;
    /* Optional: Remove default left padding */
  }

  @media (min-width: 600px) {
    flex-direction: row;
  }

}

.container-tratamientos {
  @media (min-width: 700px) {
    display: flex;
  }

  align-items: center;
  /* Alinea verticalmente */
  gap: 50px;
  /* Espacio entre imagen y texto */
  margin-top: 20px;
  border: 2px solid var(--highlight-color);
  /* turquesa medio */
  border-radius: 8px;
  padding: 20px;
  text-align: left;

  .img-left {
    max-width: 100%;
    /* Ajusta según necesidad */
    height: auto;
    max-height: 300px;
    border-radius: 8px;
    /* Opcional, para bordes redondeados */
  }

  .text-right {
    flex: 1;
    /* Ocupa el espacio restante */
  }

  ol li::marker {
    color: var(--highlight-color);
    font-weight: bold;
  }

}

.icono {
  max-height: 75px;

}

.detalles-contactos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: center;
  text-align: left;

  img {
    max-width: 10%;
    margin-right: 10px;
  }

}

.contacto {
  display: flex;
  /* Enables Flexbox */
  margin-left: 10px;

}

.map-container iframe {
  width: 100%;
  max-width: 100%;
  height: 350px;
  aspect-ratio: 500 / 350; /* mantiene la proporción */
  border: 0;
  display: block;
}