/* === VARIABLES DE COLOR === */
:root {
  --color-primary: #1e3a5f; /* Azul aluminio oscuro */
  --color-secondary: #4a90d9; /* Azul claro */
  --color-accent: #f59e0b; /* Ámbar para botones */
  --color-bg-light: #f8f9fa; /* Gris claro */
  --color-text: #1a1a1a; /* Gris oscuro */
  --color-white: #ffffff;
}

/* === RESET BÁSICO === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth; /* Scroll suave al hacer clic en el menú */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--color-text);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === HEADER === */
.site-header {
  background-color: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-img {
  height: 45px; /* Ajustá el tamaño del ícono */
  width: auto;
  transition: transform 0.3s;
}

.logo:hover .logo-icon-img {
  transform: scale(1.05);
}

.logo-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #1e3a5f 0%, #4a90d9 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-tagline {
  font-size: 10px;
  color: #666;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 500;
}

/* === NAVEGACIÓN === */
.nav-list {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-list a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-list a:hover {
  color: var(--color-secondary);
}

/* === HERO CON SLIDER === */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  margin-top: 70px;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transform: scale(1.1);
  transition: transform 6s ease;
}

.slide.active .slide-bg {
  transform: scale(1);
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 58, 95, 0.7);
}

.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 0 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-highlight {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 700px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--color-accent);
  color: white;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 18px;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
}

/* Flechas del slider */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 40px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

/* Puntos indicadores */
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: white;
}

/* === FOOTER === */
.site-footer {
  background: #0f1e33; /* Azul más oscuro que el primary, para cerrar */
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  color: var(--color-secondary);
}
.footer-brand-name {
  font-size: 24px;
  font-weight: 800;
  color: white;
}
.footer-col p {
  font-size: 14px;
  line-height: 1.7;
}
.footer-col h4 {
  color: white;
  margin-bottom: 15px;
  font-size: 16px;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-col ul a:hover {
  color: var(--color-accent);
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  transition: background 0.3s;
}
.footer-social a:hover {
  background: var(--color-accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 20px;
  font-size: 13px;
}
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-logo-icon {
  height: 32px;
  width: auto;
  /* Esto invierte el logo oscuro a blanco, sin tocar el archivo */
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* === SECCIÓN PRODUCTOS === */
.products {
  padding: 100px 0;
  background-color: var(--color-bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  color: var(--color-secondary);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 40px;
  color: var(--color-primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.section-subtitle {
  font-size: 18px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Categorías (bloques grandes) */
.product-category {
  margin-bottom: 70px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--color-secondary);
}

.category-icon {
  color: var(--color-secondary);
}

.category-header h3 {
  font-size: 26px;
  color: var(--color-primary);
  font-weight: 600;
}

/* Grid responsive: se adapta solo a cualquier pantalla */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Siempre 3 columnas */
  gap: 25px;
}

/* En pantallas chicas, 2 columnas */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* En celulares, 1 columna */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Tarjetas con hover dinámico */
.product-card {
  background: white;
  padding: 35px 25px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  overflow: hidden;
}

/* La línea de color que aparece arriba al hacer hover */
.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-secondary),
    var(--color-accent)
  );
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(30, 58, 95, 0.15);
}

.product-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 90px;
  height: 90px;
  background: var(--color-bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition:
    background 0.4s,
    transform 0.4s;
  overflow: hidden;
}

.card-icon img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: transform 0.4s;
}

.product-card:hover .card-icon {
  background: var(--color-primary);
  transform: rotate(-8deg) scale(1.1);
}

.product-card:hover .card-icon img {
  transform: scale(1.15);
}

/* === SECCIÓN CONTACTO === */
.contact {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #2c5282 100%);
  color: white;
}

.contact .section-tag {
  color: var(--color-accent);
}

.contact .section-title {
  color: white;
}

.contact .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-top: 50px;
}

/* Columna izquierda: datos */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.info-icon {
  font-size: 28px;
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-item h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.info-item p {
  font-size: 16px;
  color: white;
  margin: 0;
}

/* Columna derecha: CTA + redes */
.contact-cta {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #25d366; /* Verde oficial de WhatsApp */
  color: white;
  padding: 20px 30px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
  flex-shrink: 0;
}

/* Redes sociales */
.social-section {
  text-align: center;
}

.social-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-link {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition:
    background 0.3s,
    transform 0.3s;
}

.social-link:hover {
  background: var(--color-accent);
  transform: translateY(-5px);
}

/* Responsive: en celular, una columna */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* === SECCIÓN OBRAS === */
.works {
  padding: 100px 0;
  background: var(--color-white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 50px;
}

.gallery-item {
  position: relative;
  overflow: hidden; /* Clave: corta la imagen que "sale" al hacer zoom */
  border-radius: 12px;
  aspect-ratio: 4 / 3; /* Todas las fotos mismo formato, aunque pesen distinto */
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Rellena sin deformar (lo viste en el hero) */
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.1); /* Zoom sutil al pasar el mouse */
}

.gallery-overlay {
  position: absolute;
  inset: 0; /* Cubre toda la tarjeta */
  background: linear-gradient(
    to top,
    rgba(30, 58, 95, 0.9) 0%,
    rgba(30, 58, 95, 0) 60%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0; /* Oculto por defecto */
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1; /* Aparece al hacer hover */
}

.gallery-overlay h4 {
  color: white;
  font-size: 18px;
  margin: 0;
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0; /* Cubre toda la pantalla */
  background: rgba(10, 20, 35, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img-wrap {
  position: relative; /* Ancla para la marca de agua */
  display: inline-block;
}

.lightbox-img-wrap img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Marca de agua sobre la imagen ampliada */
.lightbox-watermark {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 56px;
  height: 56px;
  background-image: url("../img/logo-watermark.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.7;
  pointer-events: none;
}

.lightbox-caption {
  margin-top: 18px;
  text-align: center;
  color: white;
}

.lightbox-title {
  font-size: 20px;
  margin: 0 0 6px;
}

.lightbox-counter {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* Botones del lightbox */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 32px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--color-accent);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  font-size: 36px;
}
.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 600px) {
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* MARCA CSS DESACTIVADA: ahora la marca va quemada en el píxel
.gallery-item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background-image: url("../img/logo-watermark.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.25;
  pointer-events: none;
  z-index: 3;
}


.lightbox-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  background-image: url("../img/logo-watermark.png");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.6;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.9));
}
*/

/* Logo con ícono SVG */
.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary); /* El SVG hereda este color */
}

.logo-icon {
  flex-shrink: 0;
  transition: transform 0.3s;
}

.logo:hover .logo-icon {
  transform: rotate(-8deg) scale(1.05); /* Efecto dinámico al pasar el mouse */
}

.logo-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #1e3a5f 0%, #4a90d9 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-tagline {
  font-size: 10px;
  color: #666;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 3px;
  font-weight: 500;
}

/* Botón hamburguesa (oculto en escritorio) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle-bar {
  width: 26px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  transition:
    transform 0.3s,
    opacity 0.3s;
}

/* === MOBILE === */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .main-nav.open {
    max-height: 340px;
  }

  .nav-list {
    flex-direction: column; /* acá están "las 3 líneas" apiladas */
    gap: 0;
    padding: 8px 0;
  }
  .nav-list li {
    width: 100%;
    text-align: center;
  }
  .nav-list a {
    display: block;
    padding: 14px 0;
  }

  /* La hamburguesa se transforma en X al abrir */
  .nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Hero mobile: texto más chico y sin flechas (los puntitos alcanzan) */
  .hero-title {
    font-size: 32px;
  }
  .hero-subtitle {
    font-size: 16px;
    padding: 0 20px;
  }
  .slider-prev,
  .slider-next {
    display: none;
  }

  /* Logo un poco más compacto */
  .logo-icon {
    height: 34px;
    width: 34px;
  }
  .logo-text {
    font-size: 22px;
  }
}
