* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}
body {
  font-family: Arial;
  overflow-x: hidden; /* Previene desbordamiento horizontal */
  background-image: url(webb.png);
  font-family: Arial, Helvetica, sans-serif;
}
.logo {
  padding: 10px;
  text-align: center;
  align-items: center;
  margin: 5px;
}
.logo img {
  width: 50%;
  max-width: 100px;
}
.logo p {
  font-size: 15px;
}
header {
  width: 100%;
  height: 85px;
  background-color: #87a5ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px; /* Cambiado para que sea responsive */
  position: fixed; /* Añadimos posición fija */
  top: 0; /* Anclamos en la parte superior */
  z-index: 999; /* Aseguramos que esté por encima de otros elementos */
}
.bars {
  display: none;
}
.nav-bar ul {
  display: flex;
  padding: 0;
  margin: 0;
}
.nav-bar ul li a {
  display: block;
  color: #fff;
  font-size: 18px;
  padding: 10px 25px;
  transition: 0.2s;
  margin: 0 5px;
}
.nav-bar ul li a:hover {
  color: #000;
  border-bottom: 4px solid #ff0000;
}
.nav-bar ul li a.active {
  color: #000;
  border-bottom: 4px solid #ff0000;
}
.nav-bar ul li {
  border-right: 1px solid red; /* Añadimos la barra roja a la derecha */
}
.nav-bar ul li:last-child {
  border-right: none; /* Eliminamos la barra roja del último elemento */
}

@media only screen and (max-width: 900px) {
  header {
    padding: 0 20px;
  }
  .logo img {
    width: 50%;
  }
  .logo p {
    font-size: 15px;
  }
  .bars {
    display: block;
    cursor: pointer;
  }
  .bars .line {
    width: 30px;
    height: 3px;
    background-color: #fff;
    margin: 6px 0;
  }
  .nav-bar {
    height: 0;
    position: absolute;
    top: 85px;
    left: 0;
    right: 0;
    width: 100vw;
    background-color: #87a5ff;
    transition: 0.5s;
    overflow: hidden;
  }
  .nav-bar.active {
    height: 450px;
  }
  .nav-bar ul {
    display: block;
    width: fit-content;
    margin: 80px auto 0 auto;
    text-align: center;
    transition: 0.5s;
    opacity: 0;
  }
  .nav-bar.active ul {
    opacity: 1;
  }
  .nav-bar ul li a {
    margin-bottom: 20px;
  }
  .nav-bar ul li {
    border-right: none; /* Eliminamos la barra roja en la vista móvil */
  }
}

.gift-container {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  margin-top: 70px;
  overflow: hidden;
  max-width: 800px;
  margin: 80px auto 0 auto;
}

.gift {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  outline: none;
}

@media (max-width: 992px) {
  .gift-container {
    max-width: 95%;
  }
}

@media (max-width: 768px) {
  .gift-container {
    padding: 12px;
  }
}

@media (max-width: 576px) {
  .gift-container {
    flex-direction: column;
    padding: 10px;
  }
}

@media (max-width: 400px) {
  .gift-container {
    padding: 8px;
  }
}

.anuncio_dudas {
  text-align: right;
  margin: 10px;
}

.anuncio_funcionamiento {
  opacity: 0;
  visibility: hidden;
  position: relative; /* o absolute, según tu diseño */
  margin-bottom: 10px;
  color: black;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.anuncio_funcionamiento.visible {
  opacity: 1;
  visibility: visible;
}

/*CSS slider*/

.slider-container {
  overflow: hidden;
  position: relative;
  background-image: url("riel 2.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 25vh; /* Puedes ajustar esta altura según necesites */
  width: 100vw;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slider-images {
  display: flex;
  animation: slide 90s linear infinite;

  margin-top: 55px;
  align-items: center;
}

.slider-images img {
  width: 10vw;
  height: 13vh; /* Ajusta la altura según necesites */
  margin: 0 10px;
  object-fit: cover;
  border: 5px solid #c1bfbf;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.slider-images img:hover {
  transform: scale(1.05);
  border-color: #c1bfbf;
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-350%);
  }
}

.overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: white;
  z-index: 999;
}

.overlay img {
  width: 50%;
  height: 90%;
  object-fit: inherit;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Agrega una sombra al marco */
  border: 3px solid #c1bfbf;
}

.overlay-text {
  margin-top: 10px;
  font-size: 26px;
  text-align: center;
}

@media screen and (max-width: 1430px) {
  .slider-container {
    height: 21vh;
    background-size: cover;
  }

  .slider-images {
    margin-top: 35px;
  }
  .slider-images img {
    height: 12vh;
  }
}
@media screen and (max-width: 1024px) {
  .slider-container {
    height: 25vh;
    background-size: cover;
    margin-bottom: 5px;
  }
  .slider-images img {
    width: 20%;
    height: 13vh;
  }
  .slider-images {
    margin-top: 50px;
    animation: slide 120s linear infinite;
  }

  @keyframes slide {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-900%);
    }
  }
  .overlay img {
    width: 80%;
    height: 80%;
    object-fit: cover;
    border: 10px solid #c1bfbf; /* Agrega el marco blanco */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Agrega una sombra al marco */
    border-radius: 10px; /* Opcional: agrega bordes redondeados */
  }
}

@media screen and (max-width: 768px) {
  .slider-container {
    height: 30vh;
    background-size: cover;
    margin-bottom: 5px;
  }
  .slider-images img {
    width: 30%;
    height: 15vh;
    object-fit: cover;
  }
  .slider-images {
    margin-top: 60px;
    animation: slide 130s linear infinite;
  }

  @keyframes slide {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-1750%);
    }
  }
  .overlay img {
    width: 80%;
    height: 80%;
    object-fit: inherit;
    border: 10px solid #c1bfbf; /* Agrega el marco blanco */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Agrega una sombra al marco */
    border-radius: 10px; /* Opcional: agrega bordes redondeados */
  }
}

@media screen and (max-width: 480px) {
  .slider-container {
    height: 35vh;
    background-size: 630%;
  }
  .slider-images img {
    width: 50%;
    height: 20vh;
    object-fit: cover;
  }

  .slider-images {
    animation: slide 140s linear infinite;
    margin-top: 60px;
  }

  @keyframes slide {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-1800%);
    }
  }
  .overlay img {
    width: 100%;
    height: 50%;
    object-fit: inherit;
    border: 10px solid #c1bfbf; /* Agrega el marco blanco */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Agrega una sombra al marco */
    border-radius: 10px; /* Opcional: agrega bordes redondeados */
  }
}

@media screen and (max-width: 320px) {
  .slider-container {
    height: 40vh;
    background-size: cover;
  }
  .slider-images img {
    width: 70%;
    height: 20vh;
    object-fit: cover;
  }
  .slider-images {
    margin-top: 80px;
    animation: slide 180s linear infinite;
  }

  @keyframes slide {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-4500%);
    }
  }
  .overlay img {
    width: 100%;
    height: 40%;
    object-fit: cover;
    border: 10px solid #c1bfbf; /* Agrega el marco blanco */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Agrega una sombra al marco */
    border-radius: 10px; /* Opcional: agrega bordes redondeados */
  }
}

.conteiner-cartas {
  margin: auto;
  width: 100%;
}
.conteiner-cartas img {
  width: 100%;
}

@media only screen and (min-width: 100px) and (max-width: 900px) {
  .conteiner-cartas img {
    max-width: 100%;
    height: 30vh;
  }

  .sobreNosotros-img img {
    width: 100%;
  }
}
/*CSS para lista de productos*/

/* ===== Tarjetas ===== */
:root{
  /* controla la altura de las tarjetas en desktop */
  --card-h: 540px;
  --img-aspect: 4 / 3; /* relación de aspecto del marco de imagen */
}

/* ===== Layout de ambos bloques ===== */
.lista-productos{
  display: grid;
  grid-template-columns: minmax(0,1fr) 460px; /* texto | imagen */
  gap: 24px;
  align-items: stretch;
  margin: 100px 0;
}
.lista-productos.lista-productos--invert{
  grid-template-columns: 460px minmax(0,1fr); /* imagen | texto */
}

/* Tarjetas iguales (misma altura) */
.lista-productos .contenido,
.lista-productos .imagen{
  background:#fff;
  border-radius:16px;
  box-shadow:0 6px 24px rgba(0,0,0,.08);
  padding:24px;
  height: var(--card-h);
  overflow: hidden; /* evita que el contenido “rompa” la altura */
}

/* ===== Columna de contenido ===== */
.contenido{
  display:flex;
  flex-direction:column;
}
.contenido h1{
  font-size:1.25rem;
  margin:0 0 12px 0;
}
.productos{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}
.productos li{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  background:#f1f3f6;
  border-radius:999px;
}

/* ===== Columna de imagen (sin distorsión) ===== */
.imagen{
  display:grid;
  place-items:center;
  padding:16px;            /* un poco menor para que el marco respire */
}
.imagen::before{
  /* marco que fija la relación de aspecto */
  content:"";
  grid-area:1/1;
  width:100%;
  aspect-ratio: var(--img-aspect); /* 4:3 por defecto */
  border-radius:12px;
  background:#f7f7f9;
}
.imagen img{
  grid-area:1/1;
  width:100%;
  height:100%;
  object-fit: contain;      /* ⬅ evita distorsión */
  object-position: center;
  border-radius:12px;
  display:block;
}

/* ===== Botón “Ver fotos” (opcional, estilizado) ===== */
.btn-ver{
  border:0;
  padding:8px 12px;
  border-radius:999px;
  cursor:pointer;
  font-size:.85rem;
  background:#0f172a;
  color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}

/* ===== Responsive ===== */
@media (max-width: 1024px){
  :root{ --card-h: 460px; }
  .lista-productos,
  .lista-productos.lista-productos--invert{
    grid-template-columns: 1fr; /* una sola columna */
  }
}
@media (max-width: 640px){
  :root{ --card-h: 380px; }
  .imagen{ padding:12px; }
}

/* ===== Modal (ventana emergente) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-backdrop.abierta {
  display: flex;
}
.modal {
  width: min(92vw, 1100px);
  max-height: 92vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  padding: 14px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr auto;
  z-index: 9999;
}
#header_galeria {
  display: flex;
  justify-content: flex-end; /* manda el botón a la derecha */
  background: none; /* sin fondo */
  border: none;
  text-align: center;
}
.cerrar {
  border: 0;
  background: #0f172a;
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.galeria {
  position: relative;
  display: grid;
  place-items: center;
  background: #f7f7f9;
  border-radius: 12px;
  overflow: hidden;
}
.galeria img {
  width: 100%;
  height: 70vh;
  max-height: 70vh;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
.nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.nav button {
  pointer-events: all;
  border: 0;
  background: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  margin: 8px;
}
.thumbs {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px;
}
.thumbs img {
  width: 90px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.75;
  cursor: pointer;
}
.thumbs img.activa {
  outline: 2px solid #0f172a;
  opacity: 1;
}

/* Centrar el título dentro del header */
#header_galeria {
  display: flex;
  justify-content: center;  /* centra horizontal */
  align-items: center;      /* alinea vertical */
  position: relative;       /* para poder posicionar el botón cerrar */
  padding: 8px 40px 12px;   /* deja espacio lateral para que el botón no tape */
}

/* Botón cerrar flotando a la derecha */
#header_galeria .cerrar {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* ——— 2) Botón cerrar flotante ——— */
.modal {                 /* necesitamos posicionamiento para el botón */
  position: relative;
}
.cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
}

/* ——— 3) Imagen principal centrada y contenida ——— */
.galeria img {
  display: block;
  margin: 0 auto;        /* centra en su contenedor */
  max-height: calc(92vh - 180px); /* evita que tape las miniaturas */
  height: auto;          /* deja que crezca con su proporción */
}

/* ——— 4) Miniaturas: centradas y con franja limpia ——— */
.modal > footer {        /* si tu HTML tiene <footer> envolviendo .thumbs */
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #ececec;
  background: #fff;
  border-radius: 0 0 12px 12px;
}

/* Si no usas <footer>, aplica estas a .thumbs igualmente */
.thumbs {
  display: flex;         /* en lugar de grid-auto-flow para centrar fácil */
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  max-width: 100%;
  overflow-x: auto;
}
.thumbs img {
  width: 96px;           /* un poco más uniformes */
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.85;
}
.thumbs img.activa {
  outline: 2px solid #0f172a;
  opacity: 1;
}

/* ——— 5) Flechas centradas verticalmente (por si se movían) ——— */
.nav {
  align-items: center !important;
}

/* ——— 6) Responsive: un poco más de alto disponible en móvil ——— */
@media (max-width: 768px) {
  .galeria img {
    max-height: calc(92vh - 220px);
  }
  .thumbs img {
    width: 80px;
    height: 60px;
  }
}

.contenido {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;       /* evita que nada sobresalga */
}

.contenido .productos {
  flex: 1;                /* que ocupe el espacio disponible */
  overflow-y: auto;       /* scroll vertical */
  padding-right: 6px;     /* espacio para que no se tape con la barra */
}

/* (Opcional) Estilizar scrollbar para que se vea más limpio */
.contenido .productos::-webkit-scrollbar {
  width: 8px;
}
.contenido .productos::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.contenido .productos::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* NO hay encabezado de “Galería” ni contador en la página (solo modal) */

/*CSS consultoria y fabricacion*/
.scroll-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 50vh;
  overflow: hidden;
  position: relative;
  background: linear-gradient(rgba(254, 0, 0, 0.671), rgba(254, 0, 0, 0.671)),
    url(carrusel1.jpg); /* Reemplaza con la ruta de tu imagen */
  background-size: cover; /* Asegura que la imagen cubra todo el contenedor */
  background-position: center; /* Centra la imagen */
  background-repeat: no-repeat; /* Evita que la imagen se repita */
}

.text-slide-left,
.text-slide-right {
  width: 45%; /* Ajusta el tamaño de las cajas */
  font-size: 24px;
  opacity: 0; /* Comienza invisible */
  transition: transform 1s ease-out, opacity 1s ease-out;
  color: #fff;
  padding: 20px; /* Espacio alrededor del texto */
  border-radius: 10px; /* Bordes redondeados */
  position: relative; /* Asegura que el contenido esté por encima del fondo */
}

.text-slide-left h1,
.text-slide-right h1 {
  text-align: center;
}

.text-slide-left {
  transform: translateX(-100%);
}

.text-slide-right {
  transform: translateX(100%);
}

/* Media Query para dispositivos móviles */
@media (max-width: 768px) {
  .scroll-container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
  }

  .text-slide-left,
  .text-slide-right {
    width: 90%; /* Ajusta el ancho de las cajas en móviles */
    margin: 0; /* Espacio entre las cajas */
    font-size: 15px;
    height: 50vh;
  }

  .text-slide-left {
    transform: translateY(-100%);
  }

  .text-slide-right {
    transform: translateY(100%);
  }
}

.mapa {
  width: 100%;
  margin: 10px auto;
  text-align: center;
}
.mapa h1 {
  text-align: center;
  margin: 20px 0 15px 0;
  font-weight: 200;
  border-bottom: 3px solid #ff0000;
  padding-bottom: 10px;
}
#map {
  height: 500px;
  max-width: 100%;
  margin: 0 auto;
}
@media only screen and (max-width: 900px) {
  #mapa {
    max-width: 100%;
  }
}
.contaniner {
  max-width: 100%;
  margin: 10px;
}
.footer {
  background-color: #87a5ff;
  padding: 80px;
  width: 100%;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
}
.footer-links {
  width: 30%;
  padding: 0 15px;
  margin: 0 auto;
}
.footer-links h4 {
  font-size: 30px;
  color: #fff;
  margin-bottom: 25px;
  font-weight: 500;
  border-bottom: 3px solid #ff0000;
  padding-bottom: 10px;
  text-align: center;
}
.footer-links ul li {
  font-size: 20px;
  color: #fff;
  display: block;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}
.footer-links ul li:hover {
  padding-left: 10px;
  color: #fff;
}
.social-links a {
  display: inline-block;
  min-height: 40px;
  width: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 10px 10px 0;
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  color: #fff;
  transition: all 0.5s ease;
  align-items: center;
}
.social-links a:hover {
  background-color: #507cfd;
}
form {
  display: flex;
  flex-direction: column;
  width: 80%;
}
.form-content {
  position: relative;
}
.form-content input {
  padding: 17px 14px;
  border-radius: 10px;
  font-size: 20px;
  margin-bottom: 20px;
  background: transparent;
  border: 3px solid #fff;
  width: 100%; /* Cambiado a 100% */
  height: 60px;
  outline: none;
}
.form-content textarea {
  margin-bottom: 20px;
  border-radius: 10px;
  font-size: 20px;
  background: transparent;
  border: 3px solid #fff;
  outline: none;
  padding: 10px 17px;
  width: 100%; /* Cambiado a 100% */
}
.form-content label {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  font-size: 20px;
  color: #000;
  pointer-events: none;
  transition: 0.3s;
}
.form-content input:focus ~ label,
.form-content textarea:focus ~ label {
  top: 0;
  left: 15px;
  font-size: 16px;
  padding: 0 2px;
  background-color: #87a5ff;
}
.btn1 {
  width: 70%;
  height: 40px;
  border: none;
  border: 2px solid #ff0000;
  background: transparent;
  z-index: 1;
  position: relative; /* Añadido */
}
.btn1::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 200%;
  left: 0;
  top: -200%;
  border-radius: 50%;
  z-index: -1;
}
.btn1:hover {
  top: 0;
  border-radius: 0%;
  background-color: rgba(254, 0, 0, 0.671);
  transition: 0.3s;
}
@media only screen and (max-width: 1310px) {
  .form-content label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 17px;
    color: #000;
    pointer-events: none;
    transition: 0.3s;
  }
}
@media only screen and (max-width: 1024px) {
  .footer {
    padding: 40px 10px; /* Ajustado padding para pantallas pequeñas */
  }
  .footer-row {
    flex-direction: column; /* Cambiar la dirección de los elementos a columna */
    text-align: center;
  }
  .footer-links {
    width: 100%;
    margin-bottom: 20px;
  }
  form {
    width: 100%; /* Ajustar formulario a 100% en pantallas pequeñas */
  }
  .btn1 {
    width: 100%; /* Ajustar botón a 100% en pantallas pequeñas */
  }
}
