:root {
  --header: #004466;
  --header-text: #ffffff;
  --body: #eef6f9;
  --body-text: #004466;

  --catalogo: #dceaf4;
  --catalogo-text: #004466;
  --catalogo-text-hover: #006196;

  --footer: #004466;
  --footer-text: #ffffff;
  --footer-socials: #ffffff;

  --topbar-height: 44px;
  --nav-height: 56px;
}

body {
  font-family: "Montserrat", sans-serif;
  background: var(--body);
  color: var(--body-text);
  margin: 0;
  padding: 0;
}

.topbar {
  display: flex;
  height: 36px;
  justify-content: space-between; /* centra el texto */
  align-items: center;
  height: var(--topbar-height);
  background-color: #1e293b;
  color: white;
  font-size: 0.85rem;
  padding: 0 0.5rem;
  text-align: center;
  width: auto;
  box-sizing: border-box;
}

.topbar p {
  margin: 0;
  line-height: 36px;
  display: block;
}

header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--header);
  color: var(--header-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 0.3rem 0.5rem;
  box-sizing: border-box;
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  width: 100%;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  background: transparent;
  margin: 0 0 5px 5px;
}

.navbar a {
  position: relative;
  text-decoration: none;
  color: var(--header-text);
  font-weight: bold;
  white-space: nowrap;
  text-align: center;
}

.navbar a:hover {
  color: #00aaff;
}

.navbar a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--catalogo-text-hover);
  transition: width 0.3s;
  white-space: nowrap;
  margin: 0 0.1rem;
}

.navbar a:hover::after {
  width: 100%;
}

@media (max-width: 600px) {
  header {
    padding: 0.2rem 0.3rem;
  }
  .topbar {
    font-size: 0.5rem;
  }
  .navbar {
    font-size: 0.9rem;
    gap: 1rem;
  }

  .navbar a {
    white-space: nowrap;
  }
}

html {
  scroll-behavior: smooth;
}

#trabajos {
  margin-bottom: 2.5rem;
  text-align: center;
  padding: 2rem 1rem;
}

.galeria {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.galeria img {
  width: 100%;
  max-width: 300px;
  height: 350px;
  aspect-ratio: unset;
  object-fit: contain;
  border-radius: 8px;
  background: var(--body);
}

#sobre-nosotros {
  text-align: center;
  padding: 2rem 1rem;
}

#sobre-nosotros p {
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
  line-height: 1.6;
  font-size: 16px;
}

#sobre-nosotros ul {
  list-style: none;
  padding: 0;
  margin: 1rem auto;
  max-width: 700px;
  text-align: left;
}

#sobre-nosotros li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1rem;
}

#sobre-nosotros li::before {
  content: "✔";
  color: var(--header);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.nosotros {
  display: flex;
  justify-content: center;
  align-items: center;
}

#catalogo {
  text-align: center;
  padding: 2rem 1rem;
}

.catalogo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 2rem 0;
}

.productos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.producto {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  max-width: 500px;
  flex: 1 1 300px;
  margin-bottom: 20px;
}

.producto:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.producto img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.info-producto {
  padding: 0.5rem;
}

.info-producto h3 {
  margin: 0.5rem 0;
  font-size: 1.3rem;
  color: var(--catalogo-text);
}

.info-producto p {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #444;
}

.info-producto strong {
  color: #000;
}

#contacto {
  background-color: #f9f9f9;
  padding: 40px 20px;
  text-align: center;
  border-radius: 10px;
  margin: 20px auto;
  max-width: 1200px;
}

#contacto h2 {
  font-size: 2rem;
  margin-bottom: 50px;
}

#contacto a img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#contacto a img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.contacto-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.contacto-info {
  flex: 1 1 300px;
}

.contacto-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.contacto-item img {
  width: 30px;
  height: 30px;
}

.contacto-item div {
  text-align: left;
}

.contacto-mapa {
  flex: 1 1 300px;
}

.contacto-mapa img {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
}

.contacto-redes {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.contacto-redes a {
  color: #222;
  font-size: 1.5rem;
  transition: color 0.3s;
}

.contacto-redes a:hover {
  color: #facc15;
}

@media (max-width: 768px) {
  .topbar {
    width: auto;
    font-size: 12px;
  }
  .topbar p {
    font-size: 0.75rem;
  }
  .contacto-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .contacto-mapa img {
    max-width: 100%;
  }
}

#mapa {
  padding: 40px 20px;
  background: #eef6f9;
  text-align: center;
}

#mapa h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--body);
}

#direct-wsp {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: #25d366;
  padding: 10px;
  border-radius: 50%;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
  z-index: 1000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#direct-wsp:hover {
  transform: scale(1.1);
}

#img-wsp {
  width: 30px;
  height: 30px;
  display: block;
}

footer {
  background: #004466;
  color: white;
  text-align: center;
  padding: 20px 10px;
  margin-top: 40px;
}

footer .social {
  margin-bottom: 10px;
}

footer .social a {
  margin: 0 10px;
  display: inline-block;
}

footer .social img {
  width: 35px;
  height: 35px;
}

footer p {
  font-size: 0.9rem;
}

.parallax {
  position: relative;
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../img/og-image.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.parallax h1 {
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 700;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  padding: 0 1rem;
  max-width: 100%;
  line-height: 1.2;
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1.2s ease-out forwards;
  animation-delay: 0.7s;
}

.fade-in-delayed {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1.2s ease-out forwards;
  animation-delay: 0.8s; /* más delay que el parallax */
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
  }

  .galeria {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .galeria img {
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
  }

  #sobre-nosotros p {
    font-size: 14px;
    padding: 0 10px;
  }

  .catalogo-grid {
    grid-template-columns: 1fr;
    margin: 10px 5px;
  }

  .producto {
    max-width: 90vw;
  }

  .producto img {
    height: 150px;
    max-width: 350px;
  }

  .contacto-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .contacto-mapa img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
  }

  #mapa {
    padding: 30px 10px;
  }

  #mapa h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 400px) {
  .contacto-wrapper {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    gap: 1rem;
  }

  .contacto-info {
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
  }

  .contacto-info p {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .contacto-mapa {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
  }

  .contacto-mapa img {
    width: 100%;
    max-width: none;
    height: auto;
    border-radius: 6px;
    display: block;
  }

  #mapa {
    padding: 25px 10px;
  }

  #mapa h2 {
    font-size: 1.2rem;
  }
}

#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
}
.productos {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.producto img {
  cursor: pointer;
  width: 200px;
  height: auto;
  transition: transform 0.2s;
}
.producto img:hover {
  transform: scale(1.05);
}

#cerrar {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 60px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.2s;
  z-index: 1001;
}

#cerrar:hover {
  color: rgb(121, 121, 121);
}

@media (max-width: 400px) {
  .navbar {
    padding: 0.3rem 0.5rem;
  }

  .navbar a {
    font-size: 0.85rem;
  }
}
@media (max-width: 340px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }

  .navbar a {
    font-size: 0.8rem;
  }
}

@media (max-width: 320px) {
  header {
    padding: 0.5rem 0.3rem;
  }
}

#cotizar {
  text-align: center;
  margin: 50px 0;
}

.btn-cotizar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: #25d366;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s;
}

.btn-cotizar:hover {
  background-color: #1ebe57;
  transform: scale(1.05);
}

.icon-btn {
  width: 24px;
  height: 24px;
}

@media (max-width: 480px) {
  .btn-cotizar {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  .icon-btn {
    width: 40px;
    height: 40px;
  }
}
