/* ===================================
   VARIABLES Y RESETEO
=================================== */

/* 
   Si cargas la fuente vía HTML con <link> desde fonts.googleapis.com,
   asegúrate de usar "display=swap" para evitar texto invisible 
   y así reducir CLS:
   <link
     rel="stylesheet"
     href="https://fonts.googleapis.com/css2?family=Alata&display=swap"
   />
*/

:root {
  --color_primario: #6495ed;
  --color_primario_suave: #add8e6;
  --color_blanco: #fff;
  --altura_header: 80px;
  --padding_left_right: 2rem;
  --ancho_maximo: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #fff;
  font-family: "Alata", sans-serif;
}

/* ===================================
   ENLACES, LISTAS Y TIPOGRAFÍA
=================================== */

a {
  text-decoration: none;
  color: inherit; /* Mantén el color por defecto del contenedor */
}

ul {
  list-style: none;
}

/* ===================================
   CABECERA (NAVBAR)
=================================== */

.header {
  height: var(--altura_header);
  background-color: var(--color_primario);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
}

.navbar {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  padding: 0 var(--padding_left_right);
}

.logo {
  color: var(--color_blanco);
}

.logo img {
  height: 3.5rem; /* Ajustado para que encaje en el header */
  width: auto;
}

.fa-solid {
  color: var(--color_blanco);
  font-size: 30px;
  cursor: pointer;
}

/* 
   Menú hamburguesa:
   - Se usa checkbox para abrir/cerrar el menú.
   - Con position: fixed; evitamos que el contenido
     de la página "salte" al abrir el menú en mobile.
*/

.menu_hamburguesa {
  display: none;
}

.label_hamburguesa {
  display: block;
  cursor: pointer;
}

.ul_links {
  position: fixed; /* Fijo para evitar desplazar el contenido */
  top: var(--altura_header);
  left: 0;
  right: 0;
  height: 0;
  overflow: hidden;
  background-color: var(--color_primario_suave);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  transition: height 0.3s;
  z-index: 998;
}

.menu_hamburguesa:checked + .ul_links {
  height: calc(100vh - var(--altura_header));
}

.links {
  font-size: 3rem;
  color: var(--color_blanco);
  font-weight: bold;
}

/* ================================
   NAVBAR - VISTA ESCRITORIO
================================ */

@media (min-width: 768px) {
  .label_hamburguesa {
    display: none;
  }

  .ul_links {
    position: static;
    width: auto;
    height: auto;
    background-color: var(--color_primario);
    flex-direction: row;
    gap: 2rem;
  }

  .links {
    font-size: 1.5rem;
    transition: all 0.3s;
  }

  .links:hover {
    color: var(--color_primario_suave);
    padding: 0.2rem 0.7rem;
  }
}

/* ===================================
   SLIDER
=================================== */

.slider-container {
  overflow: hidden;
  width: 100%;
  margin-top: var(--altura_header); /* Para compensar el header fijo */
  position: relative;
}

.slider {
  display: flex;
  transition: transform 0.5s ease;
}

.slide {
  flex: 0 0 100%;
}

.slide img {
  width: 100%;
  height: auto;
}

.prev-button,
.next-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s, background-color 0.3s;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.prev-button:hover,
.next-button:hover {
  color: var(--color_primario);
  background-color: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.2);
}

.prev-button {
  left: 20px;
}

.next-button {
  right: 20px;
}

@media (max-width: 768px) {
  .prev-button,
  .next-button {
    font-size: 16px;
    padding: 8px;
  }
}

/* ===================================
   SECCIÓN PRINCIPAL (content-home)
=================================== */

.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.left,
.right {
  flex: 1;
  margin: 10px;
}

.right {
  flex: 2;
  order: 2;
}

.content-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 100px; /* Ajustar según necesites en pantallas grandes */
}

.content-home h1 {
  font-size: 40px;
  font-style: italic;
  text-align: center;
}

.content-home h2 {
  margin: 50px 0;
  font-size: 25px;
  text-align: center;
}

.content-home p {
  font-size: 25px;
  text-align: justify;
  margin: 0 20px;
}

.content-home img {
  margin-top: 10px;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 20px;
}

/* Responsividad de content-home */

@media (max-width: 1024px) {
  .content-home {
    margin: 50px;
  }
  .content-home h1 {
    font-size: 35px;
  }
  .content-home h2 {
    font-size: 22px;
    margin: 40px 0;
  }
  .content-home p {
    font-size: 22px;
  }
  .container {
    flex-direction: column;
    align-items: center;
  }
  .left,
  .right {
    margin: 10px 0;
    order: initial;
  }
}

@media (max-width: 768px) {
  .content-home {
    margin: 20px;
  }
  .content-home h1 {
    font-size: 30px;
  }
  .content-home h2 {
    font-size: 20px;
    margin: 30px 0;
  }
  .content-home p {
    font-size: 20px;
    margin: 0 10px;
  }
}

@media (max-width: 480px) {
  .content-home h1 {
    font-size: 25px;
  }
  .content-home h2 {
    font-size: 18px;
    margin: 20px 0;
  }
  .content-home p {
    font-size: 18px;
  }
}

/* ===================================
   PRODUCTOS
=================================== */

.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 60px 150px 0; /* margen superior y laterales */
  border-radius: 10px;
}

.productos-imagenes {
  flex: 0 0 calc(20% - 20px);
  margin: 10px;
}

.imagen-contenedor {
  position: relative;
  overflow: hidden;
  background-color: var(--color_primario_suave);
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.imagen-contenedor img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  margin-bottom: 50px;
}

.informacion-tarjeta {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color_primario);
  color: #fff;
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
  transition: opacity 0.3s ease;
  opacity: 0.8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(10px + 0.3vw);
}

.imagen-contenedor img:hover {
  cursor: pointer;
  transform: scale(1.05);
}

.imagen-contenedor:hover .informacion-tarjeta {
  cursor: pointer;
  opacity: 1;
}

/* Responsividad de Productos */

@media (max-width: 1200px) {
  .products {
    margin: 0 100px;
  }
  .productos-imagenes {
    flex: 0 0 calc(25% - 20px);
  }
}

@media (max-width: 900px) {
  .products {
    margin: 0 50px;
    justify-content: center;
  }
  .productos-imagenes {
    flex: 0 0 calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  .products {
    margin: 0 20px;
  }
  .productos-imagenes {
    flex: 0 0 calc(100% - 20px);
  }
}

/* ===================================
   INSTALACION Y MANTENIMIENTO
=================================== */

.instalacion {
  text-align: justify;
  margin: 10px 0 100px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.instalacion-item {
  flex: 0 0 calc(50% - 20px);
  box-sizing: border-box;
  margin-bottom: 40px;
}

.instalacion h3 {
  font-size: 30px;
  text-align: center;
  margin: 40px 0 10px;
}

.instalacion img {
  display: block;
  margin: 0 auto 20px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.instalacion img:hover {
  transform: scale(1.1);
}

.instalacion p {
  text-align: justify;
}

@media (max-width: 1200px) {
  .instalacion-item {
    flex: 0 0 calc(50% - 10px);
  }
  .instalacion img {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 900px) {
  .instalacion {
    margin: 0;
  }
  .instalacion-item {
    flex: 0 0 100%;
    margin-bottom: 20px;
  }
  .instalacion img {
    width: 150px;
    height: 150px;
    margin-bottom: 10px;
  }
  .instalacion p {
    margin: 0 10px;
  }
}

@media (max-width: 600px) {
  .instalacion h3 {
    font-size: 24px;
  }
  .instalacion img {
    width: 100px;
    height: 100px;
  }
  .instalacion p {
    font-size: 14px;
  }
}

/* ===================================
   MONITOREO
=================================== */

.monitoreo {
  background: linear-gradient(
      to top,
      rgba(30, 35, 38, 0.8),
      rgba(30, 35, 38, 1)
    ),
    url("img/central.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 100vh;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
  margin: 0;
  overflow-x: hidden;
}

.monitoreo h3 {
  font-size: 2.5rem;
  margin: 10px 0;
}

.monitoreo p {
  text-align: justify;
  margin: 10px 0;
  max-width: 90%;
}

.monitoreo img {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 20px 0;
}

.monitoreo a {
  font-size: 2.5rem;
  color: var(--color_primario_suave);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8),
    -10px -10px 20px rgba(255, 255, 255, 0.5);
  margin: 30px 0;
  max-width: 90%;
  word-break: break-word;
  transition: transform 0.3s, color 0.3s;
}

.monitoreo a:hover {
  color: var(--color_primario);
  transform: scale(1.1);
}

.monitoreo i {
  color: var(--color_primario_suave);
  font-size: 3rem;
  margin: 20px 0;
}

.monitoreo i:hover {
  color: var(--color_primario);
  transform: scale(1.1);
}

@media (max-width: 900px) {
  .monitoreo h3 {
    font-size: 2rem;
  }
  .monitoreo a {
    font-size: 2rem;
    margin: 20px 0;
  }
  .monitoreo i {
    font-size: 2.5rem;
  }
}

/* ===================================
   SERVICIOS
=================================== */

#servicios {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

#servicios h2 {
  font-size: 3.125rem;
  margin-top: -0.9375rem;
}

.titulo-servicios {
  width: 100%;
  text-align: center;
  margin-bottom: 1.25rem;
}

.servicio {
  width: calc(25% - 20px);
  margin-bottom: 1.25rem;
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
}

.servicio img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s, color 0.3s;
}

.servicio img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

.servicio h3 {
  font-size: 1.25rem;
  margin-top: 0.625rem;
}

.servicio p {
  font-size: 1rem;
  margin-top: 0.625rem;
}

@media (max-width: 768px) {
  #servicios {
    justify-content: center;
    margin-top: 5.625rem;
  }
  .servicio {
    width: calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .servicio {
    width: calc(100% - 20px);
  }
}

/* ===================================
   CONTACTO
=================================== */

.contacto {
  background: linear-gradient(
      to top,
      rgba(106, 200, 254, 0.8),
      rgb(7, 126, 195)
    ),
    url("img/wallpaper.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 100px;
  box-sizing: border-box;
  text-align: center;
  width: 100%;
  min-height: 70vh;
}

.contacto h2 {
  font-size: 50px;
  margin-bottom: 20px;
}

.contacto p {
  margin-bottom: 20px;
}

.contacto-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 50px;
  flex-wrap: wrap;
}

.contacto-form {
  max-width: 45%;
  flex: 1;
  min-width: 250px;
  margin: 0 auto;
  text-align: center;
}

.contacto-form label {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
}

.contacto-form input[type="text"],
.contacto-form input[type="email"],
.contacto-form input[type="tel"],
.contacto-form textarea {
  width: calc(100% - 20px);
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.contacto-form input[type="text"]:focus,
.contacto-form input[type="email"]:focus,
.contacto-form input[type="tel"]:focus,
.contacto-form textarea:focus {
  border-color: #007bff;
  outline: none;
}

.contacto-form textarea {
  height: 100px;
}

.contacto-form button[type="submit"] {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  margin: 20px auto;
  font-size: 20px;
}

.contacto-form button[type="submit"]:hover {
  background-color: #0056b3;
}

.contacto-img {
  flex: 1;
  text-align: center;
}

.contacto-img img {
  max-width: 100%;
  height: auto;
  max-height: 300px;
}

.contacto-whatsapp {
  margin-top: 20px;
  text-align: center;
}

.whatsapp-btn {
  background-color: #25d366;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: inline-block;
  text-decoration: none;
  font-size: 20px;
}

.whatsapp-btn:hover {
  background-color: #128c7e;
}

@media (max-width: 900px) {
  .contacto-container {
    flex-direction: column;
    align-items: center;
  }
  .contacto-form {
    max-width: 90%;
    margin-bottom: 20px;
  }
  .contacto-img,
  .contacto-whatsapp {
    text-align: center;
  }
  .contacto-img img {
    margin: 0 auto;
    max-width: 90%;
  }
  .whatsapp-btn {
    width: 100%;
  }
}

/* ===================================
   FOOTER
=================================== */

footer {
  background-color: #333;
  color: #fff;
  padding: 20px 0;
  display: flex;
  justify-content: center;
}

.info-contacto {
  display: flex;
}

.info-contacto p {
  margin: 0 80px;
}

@media (max-width: 768px) {
  .info-contacto p {
    margin: 0 20px;
    font-size: 2vw;
  }
}
