/* =====================
   Lightbox Styles
====================== */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.3s;
}
.lightbox-modal[style*="display: flex"] {
  display: flex !important;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
  background: #fff;
  object-fit: contain;
}
.lightbox-caption {
  color: #fff;
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 8px #000;
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 2100;
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--accent);
}
/* Flechas lightbox estilizadas y responsivas */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  border: none;
  font-size: 1.7rem;
  width: 2.5em;
  height: 2.5em;
  min-width: 40px;
  min-height: 40px;
  max-width: 56px;
  max-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.lightbox-prev {
  left: 18px;
}
.lightbox-next {
  right: 18px;
}
@media (max-width: 600px) {
  .lightbox-content {
    max-width: 98vw;
    max-height: 45vh;
  }
  .lightbox-caption {
    font-size: 0.95rem;
  }
  .lightbox-prev {
    font-size: 1.1rem;
    width: 1.8em;
    height: 1.8em;
    min-width: 28px;
    min-height: 28px;
    max-width: 32px;
    max-height: 32px;
    left: 2vw !important;
    right: auto !important;
  }
  .lightbox-next {
    font-size: 1.1rem;
    width: 1.8em;
    height: 1.8em;
    min-width: 28px;
    min-height: 28px;
    max-width: 32px;
    max-height: 32px;
    right: 2vw !important;
    left: auto !important;
  }
  .lightbox-close {
    top: 8px;
    right: 10px;
    font-size: 1.5rem;
  }
}
/* =====================
   Variables y Reset
====================== */
:root {
  --primary: #188c77;
  --secondary: #2a8fbd;
  --accent: #188c77;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.5rem;
}

.mallas-navbar {
  color: var(--dark);
  transition: color 0.3s;
}

.navbar-brand:hover .mallas-navbar {
  color: var(--accent);
}

.navbar-nav .nav-link {
  font-weight: 600;
  color: var(--dark);
  margin: 0 0.5rem;
  transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary);
}

.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../img/mallas_deSeguridad_Saru.jpg") center/cover no-repeat;
  height: 80vh;
  display: flex;
  align-items: center;
  color: white;
  position: relative;
}

.hero-content {
  max-width: 700px;
}

/* Botón principal estilo original */
.btn-primary {
  background-color: var(--accent);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s;
  color: #fff;
}

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

@media (max-width: 768px) {
  .hero .btn-primary {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: fit-content;
    font-size: 1rem;
    padding: 0.7rem 1.5rem;
  }
}

.section {
  padding: 5rem 0;
}

.section-title {
  position: relative;
  margin-bottom: 3rem;
  text-align: center;
}

.section-title:after {
  content: "";
  position: absolute;
  width: 80px;
  height: 4px;
  background-color: var(--accent);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.service-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  font-size: 3rem;
  color: var(--accent); /* Cambiado de #1c4036 a var(--accent) */
  margin-bottom: 1.5rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.portfolio-item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.portfolio-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
  border-radius: 8px 8px 0 0;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 95, 122, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: white;
  padding: 20px;
  text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.form-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
}

.form-control {
  border: 1px solid #e1e5eb;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.25rem rgba(42, 143, 189, 0.25);
}

.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: white;
}

.img-container {
  max-height: 500px;
  overflow: hidden;
}
.main-img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  /* Mejora de renderizado */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
}

.testimonial-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  position: relative;
}

.testimonial-card:before {
  content: "\201C";
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 5rem;
  color: rgba(26, 95, 122, 0.1);
  font-family: Georgia, serif;
}
/* Mejoras para imágenes responsivas en portfolio */
.portfolio-item {
  aspect-ratio: 4/3;
  background: #f8f9fa;
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  transition: transform 0.5s;
}
@media (max-width: 768px) {
  .portfolio-item {
    aspect-ratio: 16/10;
  }
}

.client-info {
  display: flex;
  align-items: center;
  margin-top: 1.5rem;
}

.client-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

footer {
  background-color: var(--dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-title {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.footer-title:after {
  content: "";
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--accent);
  bottom: 0;
  left: 0;
}

.footer-links a {
  display: block;
  color: #dee2e6;
  margin-bottom: 0.8rem;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.social-links a,
.whatsapp-btn {
  text-decoration: none !important;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  margin-right: 10px;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--accent);
  transform: translateY(-5px);
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 992px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 60vh;
    padding: 4rem 0;
  }

  .hero h1 {
    font-size: 2rem;
    text-align: center;
  }

  .hero p {
    text-align: center;
  }

  .section {
    padding: 3rem 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .portfolio-item img {
    aspect-ratio: 16/10;
  }

  .testimonial-card {
    margin: 1rem 0;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .whatsapp-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .service-card {
    margin-bottom: 1rem;
  }

  .client-info img {
    width: 40px;
    height: 40px;
  }

  .footer-title {
    margin-top: 1.5rem;
  }

  .social-links {
    text-align: center;
  }

  .footer-contact {
    margin-top: 1rem;
  }
}

/* Mejoras generales */
img {
  max-width: 100%;
  height: auto;
}

/* Íconos de la sección Sobre Nosotros en color var(--accent) */
#nosotros .fa-check-circle,
#nosotros .fa-award,
#nosotros .fa-shield-alt,
#nosotros .fa-truck {
  color: var(--accent) !important;
}
