/* ==========================================================================
   Ecoenergia y Solar - Hoja de estilos principal
   Paleta: verde #1B5E20 · amarillo solar #F9A825 · azul #0D47A1
   Tipografía: Montserrat (títulos) / Inter (texto)
   ========================================================================== */

:root {
  --green-900: #0f3d14;
  --green: #1B5E20;
  --green-light: #2E7D32;
  --yellow: #F9A825;
  --yellow-dark: #e0920f;
  --blue: #0D47A1;
  --blue-light: #1565C0;
  --dark: #132a18;
  --ink: #263238;
  --muted: #5f6f66;
  --gray: #f4f7f5;
  --gray-2: #e8efea;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(19, 42, 24, 0.08);
  --shadow-md: 0 8px 24px rgba(19, 42, 24, 0.12);
  --shadow-lg: 0 18px 48px rgba(19, 42, 24, 0.18);
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 74px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-title);
  line-height: 1.2;
  color: var(--dark);
}

::selection {
  background: var(--yellow);
  color: var(--dark);
}

:focus-visible {
  outline: 3px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 2000;
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  transition: left 0.2s;
}

.skip-link:focus {
  left: 8px;
}

/* ---------- Utilidades ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.accent {
  color: var(--yellow);
}

section {
  padding: 90px 0;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(27, 94, 32, 0.08);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}

.btn:hover::after {
  left: 130%;
}

.btn--lg {
  padding: 16px 34px;
  font-size: 1rem;
}

.btn--yellow {
  background: var(--yellow);
  color: var(--dark);
}

.btn--yellow:hover {
  background: var(--yellow-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn--green {
  background: var(--green);
  color: #fff;
}

.btn--green:hover {
  background: var(--green-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 18px rgba(19, 42, 24, 0.12);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header__logo-img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-title);
  white-space: nowrap;
}

.header__logo-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green);
}

.header__logo-text span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
}

.header.is-scrolled .header__logo-text strong { color: var(--green); }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__link {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--dark);
  position: relative;
  padding: 6px 2px;
  transition: color 0.25s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--yellow);
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

.nav__link:hover { color: var(--green); }

.nav__cta {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: var(--green);
  border: none;
  border-radius: 10px;
  padding: 0 11px;
  z-index: 1101;
}

.nav__toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: #fff;
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__toggle.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 100px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url("../assets/img/fotovoltaico%2C%20paneles%20solares.jpeg") center 40% / cover no-repeat;
  animation: heroZoom 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroZoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(13, 33, 19, 0.94) 0%, rgba(15, 61, 20, 0.82) 45%, rgba(13, 71, 161, 0.45) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin-left: 0;
}

.hero__tag {
  display: inline-block;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--yellow);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(249, 168, 37, 0.4);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
  backdrop-filter: blur(4px);
}

.hero__title {
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 22px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 36px;
  max-width: 600px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 38px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero__badge {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 8px 16px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 30px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.hero__scroll-icon {
  width: 4px;
  height: 10px;
  background: var(--yellow);
  border-radius: 3px;
  animation: scrollDot 1.6s ease-in-out infinite;
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Stats ---------- */
.stats {
  background: var(--gray);
  padding: 60px 0;
  margin-top: -60px;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat__number {
  display: block;
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 900;
  color: var(--green);
}

.stat__number--suffix { color: var(--blue); }

.stat__label {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Servicios ---------- */
.services {
  padding-top: 80px;
}

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

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-card__icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(27, 94, 32, 0.1);
  color: var(--green);
  margin-bottom: 20px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.service-card__icon svg {
  width: 30px;
  height: 30px;
}

.service-card:nth-child(2n) .service-card__icon { background: rgba(13, 71, 161, 0.1); color: var(--blue); }
.service-card:nth-child(3n) .service-card__icon { background: rgba(249, 168, 37, 0.18); color: #c67f06; }

.service-card:hover .service-card__icon {
  transform: rotate(-6deg) scale(1.08);
}

.service-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.service-card--featured {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-900) 100%);
  border-color: transparent;
  color: #fff;
}

.service-card--featured h3 { color: #fff; }
.service-card--featured p { color: rgba(255, 255, 255, 0.85); }
.service-card--featured .service-card__icon { background: rgba(255, 255, 255, 0.16); color: var(--yellow); }

.service-card__link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--yellow);
  transition: color 0.25s, transform 0.25s;
}

.service-card__link:hover { color: #fff; transform: translateX(4px); }

/* ---------- Proyectos / Galería ---------- */
.projects {
  background: var(--gray);
}

.filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter__btn {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-2);
  background: #fff;
  color: var(--ink);
  transition: all var(--transition);
}

.filter__btn:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
}

.filter__btn.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

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

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--gray-2);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.gallery__item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.gallery__item img,
.gallery__item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery__item video { cursor: pointer; }

.gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 26, 15, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery__item:hover .gallery__overlay { opacity: 1; }

.gallery__overlay h3 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.gallery__overlay p {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.gallery__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(13, 71, 161, 0.9);
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.gallery__item.is-hidden {
  display: none;
}

/* ---------- Nosotros ---------- */
.about {
  background: var(--white);
}

.about__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__media {
  position: relative;
}

.about__img--main {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about__img--side {
  position: absolute;
  right: -24px;
  bottom: -30px;
  width: 46%;
  border-radius: var(--radius);
  border: 6px solid #fff;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about__badge {
  position: absolute;
  top: -22px;
  left: -18px;
  background: var(--yellow);
  color: var(--dark);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  z-index: 2;
}

.about__badge-num {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 900;
}

.about__badge-txt {
  font-family: var(--font-title);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.about__content p {
  color: var(--muted);
  margin-bottom: 18px;
}

.about__timeline {
  margin: 28px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.timeline-item {
  display: flex;
  gap: 18px;
  position: relative;
  padding-left: 8px;
}

.timeline-dot {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  border: 4px solid var(--yellow);
  box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.12);
}

.timeline-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-item p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* ---------- Contacto ---------- */
.contact {
  background: var(--gray);
}

.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-card {
  display: flex;
  gap: 18px;
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.contact-card__icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(27, 94, 32, 0.1);
  color: var(--green);
  border-radius: 14px;
}

.contact-card h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.contact-card p {
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-word;
}

.contact-card__link {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  transition: color 0.25s;
}

.contact-card__link:hover { color: var(--green); }

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 8px;
  color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fcfdfc;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-group textarea { resize: vertical; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.12);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: #d32f2f;
}

.form-error {
  display: none;
  color: #c62828;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fdecea;
  border-radius: 8px;
}

.form-error.is-visible { display: block; }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-note {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.82);
  padding-top: 70px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
}

.footer__logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 16px;
}

.footer__brand p {
  font-size: 0.92rem;
  max-width: 300px;
}

.footer__col h3 {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.footer__col h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  background: var(--yellow);
  border-radius: 3px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col ul a {
  font-size: 0.9rem;
  transition: color 0.25s, padding-left 0.25s;
}

.footer__col ul a:hover {
  color: var(--yellow);
  padding-left: 5px;
}

.footer__social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: transform var(--transition), background var(--transition);
}

.social-icon svg {
  width: 22px;
  height: 22px;
}

.social-icon:hover {
  transform: translateY(-4px);
  background: var(--green-light);
}

.social-icon--wa:hover { background: #25d366; }
.social-icon--fb:hover { background: #1877f2; }
.social-icon--mail:hover { background: var(--blue-light); }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ---------- Botón flotante WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 999;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid #25d366;
  animation: waPulse 2s ease-out infinite;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8, 20, 12, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 26px;
  font-size: 2.2rem;
  background: none;
  border: none;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transition: background 0.25s, transform 0.25s;
}

.lightbox__close:hover { background: rgba(255, 255, 255, 0.15); transform: rotate(90deg); }

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: background 0.25s;
}

.lightbox__nav:hover { background: var(--green); }

.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }

.lightbox__caption {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 18px;
  font-size: 0.95rem;
  text-align: center;
  max-width: 70vw;
}

/* ---------- Animaciones de aparición ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal { transition-delay: var(--d, 0s); }
.hero__tag { --d: 0s; }
.hero__title { --d: 0.12s; }
.hero__subtitle { --d: 0.24s; }
.hero__actions { --d: 0.36s; }
.hero__badges { --d: 0.48s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
  .about__grid { grid-template-columns: 1fr; }
  .about__img--side { right: 8px; bottom: -20px; }
}

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

  .nav__toggle { display: flex; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(320px, 85vw);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    background: var(--white);
    box-shadow: -12px 0 40px rgba(19, 42, 24, 0.2);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 40px 32px;
  }

  .nav.is-open { transform: translateX(0); }

  .nav__list {
    flex-direction: column;
    gap: 22px;
    text-align: center;
  }

  .nav__link { font-size: 1.05rem; }

  .nav__cta { width: 100%; }

  body.nav-locked { overflow: hidden; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .hero { min-height: 92vh; min-height: 92svh; }
  .hero__actions .btn { width: 100%; }
  .services__grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-form { padding: 26px 20px; }
  .about__badge { left: 0; top: -18px; }
  .about__img--side { display: none; }
  .lightbox__nav { top: auto; bottom: 24px; transform: none; }
  .lightbox__nav--prev { left: 16px; }
  .lightbox__nav--next { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}