:root {
  --black: #000000;
  --near-black: #1d1e20;
  --darkest: #0d141a;
  --gold: #ffd113;
  --gold-text: #695400;
  --gray-bg: #eff2f9;
  --white: #ffffff;
  --whatsapp-green: #37a300;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-button: 'Lato', sans-serif;

  --max-width: 1200px;
  --header-height: 88px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--near-black);
  background: var(--white);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Accesibilidad */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--white);
  color: var(--near-black);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--whatsapp-green);
  outline-offset: 2px;
}

section[id] {
  scroll-margin-top: var(--header-height) + 16px;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

/* Header */
.site-header {
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-header .logo img { height: 56px; width: auto; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--white);
  font-family: var(--font-button);
  font-size: 15px;
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover { opacity: 0.8; }

.nav-links a:hover,
.nav-links a.active {
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

/* Buttons */
.btn-outline {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 28px;
  border: 1px solid currentColor;
  font-family: var(--font-button);
  font-weight: 500;
  font-size: 16px;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-outline.on-dark:hover { background: var(--white); color: var(--near-black); }
.btn-outline.on-light:hover { background: var(--darkest); color: var(--white); }

.btn-outline.on-dark { color: var(--white); }
.btn-outline.on-light { color: var(--darkest); }

.btn-solid-dark {
  display: inline-block;
  background: var(--darkest);
  color: var(--white);
  border-radius: 28px;
  padding: 14px 40px;
  font-family: var(--font-button);
  font-weight: 500;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-solid-dark:hover { background: var(--black); }

/* WhatsApp flotante */
.whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 200;
  transition: transform 0.2s ease;
}

.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 30px; height: 30px; }

/* Hero */
.hero {
  position: relative;
  color: var(--white);
  padding: 100px 0 60px;
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--near-black);
  opacity: 0.45;
}

.hero .container { position: relative; z-index: 1; text-align: center; }

.hero h1 {
  font-size: 64px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.hero p.subtitle { font-size: 18px; margin-bottom: 32px; }

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}

.hero-features div {
  background: rgba(255, 255, 255, 0.08);
  padding: 24px;
  border-radius: 4px;
}

.hero-features h2 {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 8px;
}

.hero-features p { font-size: 15px; }

/* Generic section paddings */
section { padding: 80px 0; }

.section-title { text-align: center; margin-bottom: 12px; font-size: 40px; }
.section-subtitle { text-align: center; color: #555; margin-bottom: 48px; }

/* Sobre nosotros (gold teaser) */
.about-teaser { background: var(--gold); }

.about-teaser .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-teaser h2 { color: var(--gold-text); font-size: 48px; margin-bottom: 20px; }
.about-teaser p { margin-bottom: 32px; }

.about-teaser .logo-circle {
  border-radius: 50%;
  overflow: hidden;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
  background: var(--black);
}

/* Servicios */
.services { background: var(--gray-bg); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card img {
  border-radius: 4px;
  aspect-ratio: 4 / 2.8;
  object-fit: cover;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.service-card:hover img { transform: scale(1.02); }

.service-card h3 { font-size: 20px; margin-bottom: 10px; }
.service-card p { color: #555; font-size: 15px; }

/* Redes de cerramiento (info gold section) */
.care-info { background: var(--gold); }

.care-info > .container > h2 {
  color: var(--gold-text);
  font-size: 44px;
  margin-bottom: 24px;
  text-align: center;
}

.care-info > .container > p.intro {
  margin: 0 auto 48px;
  max-width: 900px;
  text-align: center;
}

.care-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.care-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.care-card > img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.care-card-body { padding: 32px; }
.care-card-body h3 { font-size: 22px; margin-bottom: 12px; color: var(--near-black); }
.care-card-body p { margin-bottom: 16px; color: #333; }

.diagram-wrap {
  background: var(--gray-bg);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-top: 8px;
}

.diagram-wrap img.diagram { width: 100%; max-width: 320px; margin: 0 auto; }
.diagram-caption { margin-top: 12px; margin-bottom: 0; font-size: 13px; color: #666; }

/* Productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px 20px;
}

.product-item {
  text-align: center;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  width: 100%;
}

.product-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-item:hover img,
.product-item:focus-visible img {
  transform: scale(1.04);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.product-item span {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  color: var(--near-black);
}

/* Galeria */
.gallery { background: var(--gold); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-grid button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: block;
  width: 100%;
}

.gallery-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  border: 4px solid var(--white);
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.gallery-grid button:hover img,
.gallery-grid button:focus-visible img {
  transform: scale(1.03);
}

/* Contacto */
.contact {
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 100px 0;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(13, 20, 26, 0.6);
}

.contact .container { position: relative; z-index: 1; display: flex; justify-content: center; }

.contact-form {
  background: var(--white);
  border-radius: 8px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
}

.contact-form h2 { color: var(--near-black); margin-bottom: 8px; text-align: center; }
.contact-form .lead { text-align: center; color: #555; margin-bottom: 8px; }

.contact-form label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  margin-top: 18px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
}

.contact-form textarea { min-height: 110px; resize: vertical; }

.contact-form button { margin-top: 28px; width: 100%; }

.form-honeypot { position: absolute; left: -9999px; }
.form-message { margin-top: 16px; font-size: 14px; min-height: 20px; }
.form-message.success { color: #2a7d00; }
.form-message.error { color: #c0392b; }

/* About page - nuestra empresa */
.company-intro { background: var(--gray-bg); }

.company-intro h1 { font-size: 40px; margin-bottom: 20px; }
.company-intro p { margin-bottom: 24px; max-width: 800px; }
.company-intro img { border-radius: 4px; margin: 32px 0; }

.company-values h2 { font-size: 22px; margin: 32px 0 16px; }
.company-values ul { list-style: none; }
.company-values li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
}
.company-values li::before {
  content: '•';
  color: var(--gold-text);
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: var(--darkest);
  color: var(--white);
  padding: 64px 0 24px;
  text-align: center;
}

.site-footer h2 { color: var(--gold); font-size: 40px; margin-bottom: 16px; }
.site-footer .tagline { max-width: 600px; margin: 0 auto 24px; }
.site-footer .tagline strong { color: var(--gold); }

.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  text-align: left;
  margin-top: 48px;
}

.footer-columns h3 { color: var(--gold); font-size: 15px; letter-spacing: 0.5px; margin-bottom: 10px; }
.footer-columns .middle { text-align: center; }
.footer-columns .middle a { color: var(--gold); display: block; margin-top: 12px; }
.footer-columns .middle a.footer-whatsapp svg { margin: 0 auto; }
.footer-columns address { font-style: normal; }

.footer-copy {
  margin-top: 48px;
  font-size: 13px;
  color: #999;
  text-align: left;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--black);
    padding: 24px;
    gap: 20px;
  }

  .hero h1 { font-size: 40px; }
  .hero-features { grid-template-columns: 1fr; }

  .about-teaser .grid,
  .care-grid,
  .services-grid,
  .footer-columns { grid-template-columns: 1fr; }

  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }

  .section-title { font-size: 30px; }
  .contact-form { padding: 32px 24px; }

  .whatsapp-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }

  .contact { background-attachment: scroll; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Lightbox */
body.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: min(90vw, 900px);
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: var(--white);
  font-size: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { width: 44px; height: 44px; font-size: 20px; }
}
