/* Le Energy - CSS especifico de la pagina 'home'. Carga DESPUES del nucleo. */

/* ── Banda compromiso ambiental — Bajas emisiones CO₂ / DS N°38 (decorativa, foto de fondo) ── */
.eco-band {
  background: url('/wp-content/uploads/leenergy/img/motor-detalle.jpg') center / cover no-repeat;
  color: #fff; position: relative; overflow: hidden;
}
.eco-seal-box .seal-sec {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.1);
}
.eco-seal-box .seal-sec img { width: 88%; margin: 0 auto; }
.eco-seal-box .seal-cap {
  display: block; margin-top: 8px; text-align: center;
  font-family: var(--ff-mono); font-size: 9.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
/* Foto industrial real como fondo a todo ancho */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/wp-content/uploads/leenergy/img/home-hero.jpg') center 35% / cover no-repeat;
  pointer-events: none;
}
/* Hero visual — espacio de imagen de producto / campaña */
.hero-visual {
  position: relative; align-self: center; overflow: hidden;
  min-height: 440px;
  background: #1c1c1d url('/wp-content/uploads/leenergy/img/ds38-caja-publicidad.jpg') center / cover no-repeat;
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.hero-visual::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,20,21,0) 45%, rgba(20,20,21,.4) 100%);
}
.hero-photo-badge {
  position: absolute; left: 0; bottom: 22px; z-index: 2;
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(42,42,43,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-left: 3px solid var(--green); color: var(--white);
  padding: 9px 16px 9px 13px;
}
.hero-photo-badge .dot { display: none; }
/* ═══════════════ LÍNEAS DE NEGOCIO (verde protagonista + foto de faena tenue) ═══════════════ */
.lines-section {
  background: url('/wp-content/uploads/leenergy/img/flota-equipos.jpg') center / cover no-repeat fixed;
  border: none; position: relative; overflow: hidden;
  border-top: 4px solid var(--green);
  box-shadow: inset 0 14px 30px -14px rgba(0,0,0,.55);
}
.lines-section .section-head .eyebrow { color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.lines-section .section-head h2 { color: var(--white); text-shadow: 0 2px 5px rgba(0,0,0,.5), 0 0 1px rgba(0,0,0,.6); }
.lines-section .section-head p { color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.45); }
.product-footer .link {
  font-family: var(--ff-head); font-weight: 600; font-size: 13px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 4px;
}
/* ═══════════════ VIDEO ═══════════════ */
.video-section { padding: 0 0 96px; background: var(--bg); }
.video-wrap {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 16px 48px rgba(42,42,43,.14); background: var(--ink);
}
.video-el { display: block; width: 100%; height: auto; max-height: 560px; object-fit: cover; }
.video-caption {
  position: absolute; left: 20px; bottom: 16px; z-index: 2;
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: #fff;
  background: rgba(42,42,43,.62); padding: 7px 14px; border-radius: 6px;
  backdrop-filter: blur(2px);
}
.case-cover .case-label .id {
  font-family: var(--ff-mono); font-size: 11px; color: #5EE89A;
  font-weight: 700; letter-spacing: 0.14em; margin-bottom: 6px;
  text-shadow: 0 1px 6px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.6);
}
.case-cover .case-label .nm {
  font-family: var(--ff-head); font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,.75), 0 1px 3px rgba(0,0,0,.6);
}
.case-cover .badge-img {
  position: absolute; top: 20px; right: 20px; z-index: 1;
  font-family: var(--ff-mono); font-size: 10px; font-weight: 700; color: var(--white);
  background: var(--green); border: 1px solid rgba(255,255,255,.35);
  padding: 7px 12px; border-radius: var(--r-pill); letter-spacing: 0.12em; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(27,164,95,.45);
}
.case-cover .case-power .lbl {
  font-family: var(--ff-mono); font-size: 9px; color: #5EE89A;
  letter-spacing: 0.16em; text-transform: uppercase; margin-top: 5px; font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.6);
}
.ceo-portrait {
  aspect-ratio: 1;
  background: radial-gradient(circle at 30% 30%, rgba(27,164,95,.3), transparent 50%), linear-gradient(135deg, #3A393A 0%, #2A2A2B 100%);
  border-radius: var(--r-md); position: relative; display: grid; place-items: center;
  color: var(--green); font-family: var(--ff-head); font-weight: 700; font-size: 96px; letter-spacing: -0.04em;
  overflow: hidden;
}
.ceo-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ceo-signature { display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }
.ceo-sign-img { height: 64px; width: auto; flex-shrink: 0; }
/* Carrusel auto-desplazable de logos (marquee infinito) */
.clients-marquee {
  position: relative; overflow: hidden; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients-track {
  display: flex; width: max-content;
  animation: clients-scroll 90s linear infinite;
}
/* Segunda fila: desplazamiento en sentido opuesto (viene desde la izquierda) */
.clients-track.rev { animation: clients-scroll-rev 90s linear infinite; }
.clients-marquee + .clients-marquee { margin-top: 14px; }
.clients-marquee:hover .clients-track { animation-play-state: paused; }
@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes clients-scroll-rev {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.client-logo {
  flex: 0 0 auto; width: 210px; height: 110px; margin: 0 4px;
  display: grid; place-items: center; overflow: hidden;
}
/* Logos normalizados a canvas 400x200 uniforme → ocupan todo el ancho, quedan parejos */
.client-logo img {
  width: 100%; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s;
}
.client-logo:hover img { filter: grayscale(0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .clients-track { animation: none; } }
@media (max-width: 600px) { .client-logo { width: 160px; height: 88px; } }
.cta-final .eyebrow { color: rgba(255,255,255,.92); text-shadow: 0 1px 3px rgba(0,0,0,.55); }
.cta-final h2 { font-family: var(--ff-head); font-size: 52px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 20px; text-shadow: 0 2px 6px rgba(0,0,0,.45), 0 0 1px rgba(0,0,0,.6); }
.cta-final > .cta-grid > div > p { font-size: 18px; opacity: .95; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
/* Degradado inferior para legibilidad del rótulo sobre la foto */
.case-cover.has-photo::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(20,20,21,.82) 0%, rgba(20,20,21,.28) 44%, rgba(20,20,21,0) 70%);
}
.case-cover.has-photo .case-label,
.case-cover.has-photo .badge-img,
.case-cover.has-photo .case-power { z-index: 2; }
/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 960px) {
  .hero h1 { font-size: 42px; }
  .hero-grid, .publico-grid, .cta-grid, .ceo-card { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 340px; }
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .stat-item { padding: 0; border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 24px; }
  .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
  .lines-grid { grid-template-columns: 1fr; }
  .solutions-grid { grid-template-columns: 1fr 1fr; }
  .catalogo-grid { grid-template-columns: 1fr 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .sectores-grid { grid-template-columns: 1fr; }
  .clients-strip { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .ceo-card { padding: 40px; }
  .ceo-portrait { max-width: 240px; margin: 0 auto; }
  .stat-value, .cta-final h2 { font-size: 42px; }

  /* ── Menú móvil ── */
  .header-row { flex-wrap: wrap; }
  .menu-toggle { display: flex; order: 3; margin-left: 4px; }
  .header-cta { order: 2; margin-left: auto; }
  #primary-nav { order: 4; width: 100%; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    margin-top: 12px;
    border-top: 1px solid var(--line);
  }
  .main-nav.open { display: flex; }
  .main-nav li { width: 100%; }
  .main-nav a {
    display: block;
    width: 100%;
    padding: 14px 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--line-soft);
  }
  .main-nav a.active::after { display: none; }
  .main-nav a.active { color: var(--green-dark); }

  /* Dropdown como acordeón en móvil */
  .nav-parent {
    width: 100%;
    justify-content: space-between;
    padding: 14px 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--line-soft);
  }
  .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0;
    background: var(--bg-soft, #f4f6f5);
    border-radius: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .dropdown.open { max-height: 320px; }
  .dropdown a {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }
  .dropdown::before { display: none; }
}
@media (max-width: 560px) {
  .solutions-grid, .catalogo-grid, .footer-grid, .clients-strip { grid-template-columns: 1fr; }
  .hero-visual { height: 280px; }
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
  .hero { padding: 60px 0; }
  .hero h1 { font-size: 32px; }
  .section-head h2 { font-size: 28px; }
}
/* Renders del cliente: badge DS 38 vive en la esquina inferior -> anclar abajo (arriba solo hay fondo gris) */
.product-img .cover-photo[src*="render-"] {
  object-fit: contain; object-position: center;
  background: linear-gradient(135deg, #3a3a3e 0%, #2a2a2b 100%);
}
/* Renders del fabricante (ds38-* y prod-*): mismo set, fondo oscuro texturizado propio y ratio 1.41
   → llenan la tarjeta con cover. Anclados abajo porque el badge DS 38 vive abajo-izquierda:
   así el recorte se lo lleva el borde superior (solo fondo) y el badge nunca se corta. */
.product-img .cover-photo[src*="ds38-"],
.product-img .cover-photo[src*="prod-"] {
  object-fit: cover; object-position: center bottom;
  background: #1c1c1d;
}
