/*------------------------------------
  Importar fuente Inter de Google Fonts
-------------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/*------------------------------------
  Reset básico y estilos globales
-------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: #f8fafc;
  /* Fondo suave y moderno */
  color: #1e293b;
  /* Color texto principal oscuro */
  line-height: 1.6;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}

/*------------------------------------
  Header con imagen de fondo y overlay oscuro
-------------------------------------*/
header {
  background-image: url('../images/header1.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 20px 0;
  position: relative;
}

/* Overlay para oscurecer imagen de fondo */
header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

/* Contenedor menú dentro del header */
.menu.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Logo: texto o imagen */
.logo {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.logo img,
.logo-img {
  height: 100px;
  object-fit: contain;
}

/* Menú oculto por defecto para mobile */
#menu {
  display: none;
}

/* Etiqueta para menú hamburguesa (oculta por defecto) */
label {
  cursor: pointer;
  display: none;
}

/* Navegación principal */
.navbar ul {
  display: flex;
  list-style: none;
}

.navbar ul li a {
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.navbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Iconos en navegación */
.navbar .fa-icon {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Hover para links */
.navbar ul li a:hover {
  color: #93c5fd;
}

/*------------------------------------
  Contenido principal del header
-------------------------------------*/
.header-content.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.header-content .content {
  max-width: 800px;
}

.header-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: white;
}

.header-content p {
  margin-bottom: 30px;
  font-size: 1.1rem;
  color: #e2e8f0;
}

/* Imagen con animación flotante */
.header-content img {
  max-width: 400px;
  animation: float 3s ease-in-out infinite;
}

/*------------------------------------
  Botones principales estilo primario
-------------------------------------*/
.btn1 {
  display: inline-block;
  padding: 12px 30px;
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-right: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn1:hover {
  background-color: #1e40af;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/*------------------------------------
  Sección Servicios - Layout flexible y responsive
-------------------------------------*/
.services.container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 60px auto;
  gap: 30px;
  max-width: 1200px;
  padding: 0 20px;
}

/* Card individual de servicio */
.service {
  background: white;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  flex: 1;
  min-width: 250px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  border-color: #bfdbfe;
}

/* Imagen dentro del servicio */
.service img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid #e2e8f0;
}

/* Título y párrafo servicio */
.service h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #1e293b;
}

.service p {
  color: #64748b;
}

/*------------------------------------
  Sección Portafolio
-------------------------------------*/
.portfolio-section {
  padding: 80px 20px;
  background-color: #f8fafc;
}

.portfolio-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
  color: #1e293b;
}

.portfolio-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Item de portafolio: layout con imagen y texto */
.portfolio-item {
  display: flex;
  margin-bottom: 60px;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Imagen portafolio */
.portfolio-item img {
  width: 45%;
  object-fit: cover;
  border-right: 1px solid #e2e8f0;
}

/* Contenido texto portafolio */
.portfolio-content {
  width: 55%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Para items pares: invertir layout */
.portfolio-item:nth-child(even) {
  flex-direction: row-reverse;
}

.portfolio-item:nth-child(even) img {
  border-right: none;
  border-left: 1px solid #e2e8f0;
}

.portfolio-content h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #1e293b;
}

.portfolio-content p {
  margin-bottom: 20px;
  color: #64748b;
}

/* Botón secundario para portafolio */
.btn-2 {
  display: inline-block;
  padding: 10px 25px;
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: 15px;
}

.btn-2:hover {
  background-color: #1e40af;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/*------------------------------------
  Footer principal
-------------------------------------*/
footer {
  background-color: #1e293b;
  color: white;
  padding: 15px 0;
  text-align: center;
  flex-shrink: 0;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.informacion hr {
  border: none;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin-bottom: 30px;
}

/* Columnas footer flexibles */
.footer-columns {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.footer-left,
.footer-center,
.footer-right {
  width: 30%;
}

/* Textos y títulos en footer */
.footer-left {
  text-align: left;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
}

.footer-left h3,
.footer-center h3,
.footer-right h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: white;
}

/* Párrafos footer */
.footer-left p {
  color: #e2e8f0;
}

/* Links de dirección y sociales */
.address-link {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.3s ease;
  line-height: 1.6;
  display: inline-block;
}

.address-link:hover {
  color: #93c5fd;
}

.footer-right ul {
  list-style: none;
}

.footer-right li {
  margin-bottom: 10px;
}

.footer-right a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.footer-right a:hover {
  color: #93c5fd;
}

/* Iconos sociales y otros en footer */
.footer-right .fab,
.footer-right .fas {
  width: 20px;
  text-align: center;
}

/* Texto bottom footer */
.footer-bottom {
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

footer small {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 400;
}

/*------------------------------------
  Animación flotante para imagenes header
-------------------------------------*/
@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

/*------------------------------------
  Diseño responsive móvil y tablet
-------------------------------------*/
@media (max-width: 768px) {
  label {
    display: block;
  }

  /* Navbar estilo desplegable */
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #1e293b;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: all 0.5s ease;
  }

  /* Cuando checkbox #menu activo, navbar visible */
  #menu:checked~.navbar {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  .navbar ul {
    flex-direction: column;
    padding: 20px;
  }

  /* Header content se apila y centra */
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  .header-content img {
    margin: 30px 0 0 0;
    max-width: 80%;
  }

  /* Servicios apilados verticalmente */
  .services.container {
    flex-direction: column;
  }

  .service {
    min-width: 100%;
  }

  /* Portafolio vertical */
  .portfolio-item {
    flex-direction: column;
  }

  .portfolio-item img {
    width: 100%;
    border-right: none !important;
    border-bottom: 1px solid #e2e8f0;
  }

  .portfolio-content {
    width: 100%;
  }

  .portfolio-item:nth-child(even) {
    flex-direction: column;
  }

  /* Botón centrado */
  .btn-2 {
    align-self: center;
  }

  /* Footer columnas apiladas */
  .footer-columns {
    flex-direction: column;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
  }

  .footer-right a {
    justify-content: center;
  }
}

/*------------------------------------
  Estilo SIGEM-ER para footer con icono
-------------------------------------*/
.sigem-icon {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Estilos para los botones */
.btn1 {
  display: inline-block;
  padding: 12px 30px;
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  margin-right: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn1:hover {
  background-color: #1e40af;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Estilos específicos para los modales con imagen flotante */
.modal-imagen-flotante {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-imagen-flotante-contenido {
  background-color: white;
  margin: 10% auto;
  padding: 30px;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cerrar-modal-imagen {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #aaa;
  transition: color 0.3s;
}

.cerrar-modal-imagen:hover {
  color: #333;
}

.modal-imagen-titulo {
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

.modal-imagen-texto {
  line-height: 1.6;
  color: #555;
  text-align: left;
  margin-bottom: 20px;
}

.imagen-flotante-especial {
  position: absolute;
  right: 20px;
  /* Cambiado de left a right */
  bottom: 20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #4CAF50;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.modal-imagen-flotante.mostrar-modal-imagen {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .modal-imagen-flotante-contenido {
    width: 90%;
    margin: 20% auto;
    padding: 20px;
  }

  .imagen-flotante-especial {
    width: 60px;
    height: 60px;
    right: 15px;
    /* Cambiado de left a right */
    bottom: 15px;
  }
}

/* ================= MODALES ================= */
.modal-imagen-flotante {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  animation: fadeIn 0.3s;
}

.modal-imagen-flotante-contenido {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  position: relative;
  animation: slideIn 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cerrar-modal-imagen {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
}

.cerrar-modal-imagen:hover,
.cerrar-modal-imagen:focus {
  color: #000;
  text-decoration: none;
}

.modal-imagen-titulo {
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
  font-size: 24px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.modal-imagen-texto {
  color: #34495e;
  line-height: 1.6;
  margin: 10px 0;
  font-size: 16px;
}

.modal-imagen-texto strong {
  color: #2c3e50;
}

.imagen-flotante-especial {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .modal-imagen-flotante-contenido {
    width: 95%;
    margin: 10% auto;
    padding: 15px;
  }

  .modal-imagen-titulo {
    font-size: 20px;
  }

  .modal-imagen-texto {
    font-size: 14px;
  }
}

/* Estilos específicos para el modal de producto */
#modalProductoQR .modal-imagen-flotante-contenido {
  max-width: 700px;
}

#modalProductoQR .modal-imagen-texto {
  font-size: 16px;
  padding: 5px 0;
}

#modalProductoQR .btn1 {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 25px;
  font-size: 16px;
  transition: all 0.3s ease;
}

#modalProductoQR .btn1:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}