 * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body, html {
      font-family: Arial, sans-serif;
      height: 100%;
    }


    
html, body {
  overflow-x: hidden !important; /* evitar scroll horizontal */
  margin: 0;
  padding: 0;
  max-width: 100vw; /* para evitar que se expanda más allá de la pantalla */
}


header {
  background-image: url('../img/IMAGENportada.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px; /* evita que el nav tape el contenido */
}

nav {
  position: fixed;
  top: 0;
  width: 99%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 5vw;
  z-index: 1001;
  transition: background-color 0.3s ease;
}


@media (max-width: 768px) {
  header {
    background-position: 26% center !important; /* Forzamos el cambio */
  }
}


/* Ajuste para pantallas muy grandes */
@media (min-width: 1600px) {
  header {
    background-position: top center; /* opcional: ajusta el enfoque */
  }
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  header {
    background-position: center top; /* enfoca mejor en pantallas pequeñas */
  }
}

nav#navbar.scrolled {
  background-color: black !important;
}


.logo img {
  height: 30px;
  max-width: 80%;
  height: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2vw;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: clamp(14px, 2vw, 18px);
  padding: 8px 12px;
  transition: background 0.3s ease;
  white-space: nowrap;
}

nav ul li a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}

/* Botón hamburguesa oculto en desktop */
.menu-toggle {
  display: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
}
    .contenido {
      padding: 40px 5vw;
      text-align: center;
      position: relative;
      z-index: 1;
      background: white;
      max-width: 1200px;
      margin: 0 auto;
    }

#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Igual a la altura del header */
  z-index: 0;
  pointer-events: none;
}


    /* Sección de imagen debajo del header */
    .seccion-imagen-baja {
      width: 100%;
      display: flex;
      justify-content: center;
      margin-top: 0px;
      position: relative;
    }

    .imagen-baja {
      max-width: 100%;
      height: auto;
      display: block;
    }


#navbar {
  background-color: #155f448f;
}


header {
  position: relative; /* ya lo tienes, perfecto */
}

.header-text {
  position: absolute;
  bottom: 60px;  /* distancia desde abajo */
  right: 35px;   /* distancia desde la derecha */
  color: white;  /* para que contraste con la imagen */
  padding: 8px 12px;
  border-radius: 5px;
  font-size: bold;
  max-width: 1000px;
  text-align: right;
  z-index: 1002; /* más arriba que nav y canvas */
}
/* Ajustes específicos para móviles */
@media (max-width: 768px) {
  .header-text {
    bottom: 4%;
    right: 2%;
    font-size: clamp(1.2rem, 4vw, 2rem);
    text-align: center;
    max-width: 95%;
  }
}

@media (min-width: 769px) and (max-width: 1599px) {
  .header-text {
    bottom: 5%;
    right: 3.5%;
    font-size: clamp(1.7rem, 1.2rem + 1vw, 3.2rem);
  }
}
/* Ajustes para pantallas muy grandes */
@media (min-width: 1600px) {
  .header-text {
    bottom: 6%;
    right: 4%;
    font-size: 3.6rem;
  }
}



/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #155f448f;
    flex-direction: column;
    width: 200px;
    padding: 10px 0;
    gap: 0;
  }

  nav ul li {
    text-align: center;
    margin: 10px 0;
  }

  nav ul.show {
    display: flex;
  }
    }








     /* Sección general */
.seccion-tarjetas {
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 1vw 1vw;
}

.titulo-seccion {
 font-size: 24px;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #155f44;
}

/* Contenedor flexible */
.contenedor-tarjetas {
  display: flex;
  justify-content: center;
  gap: 2vw;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.tarjeta {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  flex: 1 1 300px;
  max-width: 350px;
  min-height: auto; /* ALTURA MINIMA AUMENTADA */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Mantener contenido ordenado */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 35px rgba(0, 0, 0, 0.233);
}

.tarjeta img {
  width: 60%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.tarjeta h3 {
  margin: 10px 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: #222;
}

.tarjeta p {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: #555;
  line-height: 1.4;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .contenedor-tarjetas {
    gap: 20px;
  }
}

@media (max-width: 768px) {

    /* Sección general */
.seccion-tarjetas {
  text-align: center;
  padding: 5vw 5vw !important;
  background-color: #f9f9f9;
}

  .contenedor-tarjetas {
    flex-direction: column;
    align-items: center;
  }

  .tarjeta {
    width: 95%;
    max-width: 350px;
  }
}

@media (min-width: 1600px) {
  .tarjeta {
    max-width: 400px;
    padding: 25px;
  }
}







.textoimpor {
background: linear-gradient(45deg, #155f44 0%, #072218 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.textoimpor .container {
  max-width: 1100px;
  margin: 0 auto;
}

.textoimpor h2 {
  font-size: 24px;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.feature {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  text-align: left;
}


.feature-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.feature-header span.icon {
  color: inherit; /* hereda el color de .feature-header */
}

.feature-header .icon {
  font-size: 1.5rem;
}

.feature h3 {
  font-size: 1.2rem;
  margin: 0;
}

.feature p {
  font-size: 1rem;
  line-height: 1.6;
}

.textoimpor hr {
  width: 80px;
  height: 3px;
  background: white;
  border: none;
  margin: 0 auto;
  border-radius: 2px;
}

@media (max-width: 600px) {
  .textoimpor {
    padding: 50px 15px;
  }
}






.slider-section {
  width: 100%;
  padding: 0px 0;
  background: #f9f9f900;
  text-align: center; /* Centrar el título */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.slider-title {
  font-size: 24px;
  margin-bottom: 40px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #155f44;
}

.slider-container {
  position: relative;
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 30px; /* separación entre imágenes */
}

.slide {
  min-width: calc(33.333% - 20px);
  box-sizing: border-box;
}

.slide img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slide img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* Botones */
.slider-btn {
  position: absolute;
  top: 50%;
  height: 30%;  
  transform: translateY(-50%);
  background: #155f44;
  color: rgb(255, 255, 255);
  border: none;
  font-size: 30px;
  cursor: pointer;
  z-index: 10;
  padding: 10px;
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}


/* ESTILOS PARA MÓVIL */
@media (max-width: 768px) {
  .slider-btn {
    top: 50%;              /* posición en el centro */
    transform: translateY(-50%); /* se centra verticalmente */
    width: 10%;            /* ancho igual que antes */
    height: 60%;           /* altura de los botones */
    display: flex;
    align-items: center;   /* centra el icono verticalmente dentro del botón */
    justify-content: center;
  }
}

/* Tablets */
@media (max-width: 992px) {
  .slide {
    min-width: calc(50% - 20px);
  }
}
@media (max-width: 600px) {
  .slider-track {
    gap: 0; /* elimina el espacio entre imágenes en móviles */
    transform: translateX(0); /* resetea transform */
  }

  .slide {
    min-width: 100%; /* cada slide ocupa todo el ancho */
    flex-shrink: 0; /* evita que se reduzca */
  }

  .slide img {
    width: 100%;
    height: auto;
    object-fit: cover; /* asegura que se ajuste bien */
    display: block;
  }
}





.cards-section {
  background: linear-gradient(45deg, #155f44 0%, #072218 100%);
  width: 100%;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 75px 0;
  min-height: 300px;
}

.cards-title {
  width: 100%;
  font-size: clamp(2rem, 2vw, 2rem);
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
}

.card {
  position: relative;
  width: 280px;
  height: 280px;
  background: #fff;
  box-shadow: inset 300px 0 50px rgba(0,0,0,.5), 0 20px 20px rgba(0,0,0,.5);
  transition: 1s;
  margin: 0;
  overflow: visible; /* importante para que la imagen rotada no se corte */
}

.card:hover {
  z-index: 10000;
  transform: perspective(2000px) rotate(-10deg);
  box-shadow: inset 20px 0 50px rgba(0,0,0,.5), 0 10px 100px rgba(0,0,0,.5);
}

.card .Box {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid #000;
  box-sizing: border-box;
  background: #111;
  display: flex;
  flex-direction: column;
  overflow: visible; /* también aquí */
  z-index: 2;
}


.card:hover .Box .image-container {
  transform: rotateY(-135deg);
  height: 100%; /* Cambia la altura a 100% al hacer hover */
}

.card .Box .image-container {
  height: 80%;
  position: relative;
  transition: transform 1s cubic-bezier(.15,1.7,.84,.58), height 1s cubic-bezier(.15,1.7,.84,.58);
  transform-origin: left;
  z-index: 3;
  backface-visibility: visible;
}


.card .Box .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  backface-visibility: visible;
}

.card .Box .caption {
  height: 20%;
  background-color: #888888;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0 10px;
  box-sizing: border-box;
  z-index: 4;
  user-select: none;
}

.card:hover .Box .image-container {
  transform: rotateY(-135deg);
}
.card .details {
  font-size: 0.8rem;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  padding: 20px;
  z-index: 1;
  background: white;
  overflow-y: auto;
  opacity: 0; /* oculto inicialmente */
  pointer-events: none; /* no interactuable inicialmente */
  transition: opacity 0.5s ease;

  /* CENTRADO CON FLEXBOX */
  display: flex;
  flex-direction: column; /* si quieres varios elementos uno debajo del otro */
  justify-content: center; /* centra verticalmente */
  align-items: center; /* centra horizontalmente */
  text-align: center; /* opcional: centra el texto */
}

.card:hover .details {
  opacity: 1; /* visible al hacer hover */
  pointer-events: auto; /* interactuable al hacer hover */
  z-index: 2; /* para que quede por encima del Box */
}

/* MÓVILES */
@media (max-width: 768px) {
  /* Evitar giro de imagen */
  .card:hover .Box .image-container {
    transform: none;
    height: 80%;
  }

  /* Detalles ocultos completamente */
  .card .details {
    position: relative;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    background: white;
    max-height: 0;         /* Oculta la altura */
    overflow: hidden;      /* Oculta el contenido */
    transition: max-height 0.5s ease, opacity 0.3s ease;
    padding: 0 10px;       /* Quita el padding para evitar el borde */
  }

  /* Mostrar detalles al hover o tap */
  .card:hover .details {
    opacity: 1;
    pointer-events: auto;
    max-height: 200px;     /* Se expande la descripción */
    padding: 10px;         /* Se agrega padding al abrir */
  }

  /* Ajuste de tarjeta */
  .card {
    height: 280px; /* Altura fija para móviles */
  }

  .card .Box {
    height: 100%;
  }

  .card .Box .image-container {
    height: 100%;
  }
}





.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 30vh;
    background: #ffffff;
  }

  .contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cards-title {
    margin-bottom: 15px;
    font-size: 24px;
    text-align: center;
  }

  .contact-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
  }

  .contact-section input,
  .contact-section textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
  }

  .contact-section button {
    background: #155f44;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
  }

  .contact-section button:hover {
    background: #1e9268;
  }



footer {
  background: linear-gradient(to bottom, #155f44 0%, #0d3b2c 60%, #000000 100%);
  color: #fff;
  padding: 20px 20px;
  text-align: center;
  font-size: 16px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
}


/* Logo y mail en la misma línea */
.footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px; /* espacio entre logo y mail */
  margin-bottom: 15px;
}

.footer-top img {
  height: 40px;
}



.footer-top a {
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  position: relative;
  padding-bottom: 3px; /* espacio para el subrayado */
  transition: color 0.3s ease;
}

.footer-top a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-color: #fff;
  transition: width 0.3s ease;
  display: block;
}

.footer-top a:hover::after {
  width: 100%;
}
/* Texto de copyright debajo */
.footer-bottom {
  font-size: 14px;
  opacity: 0.8;
}






 /* Fondo del popup */
  .popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  /* Contenedor del popup */
  .popup-content {
    background: white;
    padding: 20px;
    width: 400px;
    max-width: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
  }

  /* Inputs */
  .popup-content input,
  .popup-content textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }

  /* Contenedor botones */
  .popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
  }

  /* Botón enviar */
  .popup-buttons .btn-enviar {
    background: #155f44;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
  }

  /* Botón salir */
  .popup-buttons .btn-salir {
    background: #888;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
  }

  .popup-buttons button:hover {
    opacity: 0.9;
  }