/* =========================================================
   Solarenergy-UL • CSS base
   Inspirado en layouts tipo Webflow (Kaleo): limpio, aireado,
   cards con sombra suave, tipografía sistema.
   (Versión revisada conservando secciones originales)
   ========================================================= */

/* 1. Variables y reset mínimo */
:root {
  --bg: #0f172a;
  --bg-soft: #0f172a08;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0ea5e9;
  --radius-lg: 1.2rem;
  --radius-md: .8rem;
  --shadow: 0 20px 40px rgba(15,23,42,.05);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: #f6f6f6;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* 2. Contenedor principal */
.section,
.container {
  width: min(1120px, 100% - 2.6rem);
  margin: 0 auto;
  padding: 3.5rem 0;
}

.section-sm {
  width: min(1120px, 100% - 2.6rem);
  margin: 0 auto;
  padding: 2rem 0 1.5rem;
}

/* 3. Topbar / navegación */
.topbar {
  position: sticky;
  top: 0;
  z-index: 9999; /* por encima del hero */
  background: rgba(15,23,42,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.nav-wrap {
  width: min(1120px, 100% - 2.6rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.7rem;
}
.logo {
  color: #fff;
  font-weight: 700;
  letter-spacing: -.01em;
}
.nav {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  z-index: 10000;
}
.nav a {
  color: rgba(255,255,255,.88);
  font-weight: 500;
  font-size: .83rem;
}
.nav a:hover {
  color: #fff;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: .7rem;
  color: #fff;
  font-size: 1.25rem;
  padding: 0 .6rem .15rem;
}

/* 4. Hero (base) */
.hero {
  background: #0f172a;
  color: #fff;
}
.hero-inner {
  width: min(1120px, 100% - 2.6rem);
  margin: 0 auto;
  display: grid;
  gap: 2.6rem;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
}
.badge {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  background: rgba(14,165,233,.18);
  color: #fff;
  padding: .25rem .7rem .3rem;
  border-radius: 999px;
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}
.hero p {
  max-width: 540px;
  color: rgba(255,255,255,.7);
  margin-bottom: 1.3rem;
}
.hero-visual {
  background: rgba(15,23,42,.25);
  border: 1px solid rgba(255,255,255,.03);
  border-radius: 1.5rem;
  min-height: 250px;
}

/* 5. Botones */
.btn,
.button,
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #0ea5e9;
  border-radius: .7rem;
  padding: .55rem 1.2rem .65rem;
  font-weight: 600;
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(14,165,233,.25);
}
.btn-secondary {
  background: rgba(14,165,233,.05);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff !important;
}
.btn-sm {
  padding: .4rem .8rem .5rem;
  font-size: .75rem;
}

/* 6. Grids y cards (estilo Kaleo) */
.grid {
  display: grid;
  gap: 1.1rem;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

.card {
  background: #fff;
  border-radius: 1.2rem;
  padding: 1.2rem 1.3rem 1.15rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15,23,42,.03);
  transition: transform .15s ease-out, box-shadow .15s ease-out;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15,23,42,.15);
}
.card h3 {
  margin-top: 0;
  margin-bottom: .4rem;
}
.card p {
  color: var(--muted);
  font-size: .82rem;
}

/* 7. Sección de contacto / formulario */
.contact-block {
  background: #fff;
  border-radius: 1.3rem;
  padding: 1.3rem 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  max-width: 720px;
}
.contact-block h2 {
  margin-top: 0;
}
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea,
form select {
  width: 100%;
  padding: .55rem .7rem;
  border-radius: .6rem;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  font: inherit;
  margin-bottom: .75rem;
}
form textarea {
  min-height: 120px;
}

/* 8. Footer */
.site-footer {
  text-align: center;
  padding: 1.4rem 0 2.8rem;
  font-size: .75rem;
  color: #94a3b8;
}

/* 9. Responsive (layout general) */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* 10. Ajustes generales adicionales */
body.solarblank {
  background: #f6f6f6;
}

/* 11. Hero a pantalla completa con fondo (SOLO cuando NO es híbrido) */
.hero-full {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4.5rem 0 4rem;
}

/* ⬇️ Importante: el background-image de hero-full solo aplica si NO es hero--media */
.hero-full:not(.hero--media) {
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-full .hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15,23,42,.05), rgba(15,23,42,.7));
  backdrop-filter: blur(1px);
}

.hero-full .hero-content {
  position: relative;
  z-index: 2;
  width: min(600px, 100% - 2.6rem);
  color: #fff;
}

.hero-full h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-full p {
  color: rgba(255,255,255,.8);
  margin-bottom: 1.3rem;
}

@media (max-width: 768px) {
  .hero-full {
    min-height: 85vh;
    justify-content: center;
    text-align: left;
  }
  .hero-full .hero-content {
    width: min(540px, 100% - 1.8rem);
  }
}

/* 12. Animación de entrada básica */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .4s ease-out, transform .4s ease-out;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Variantes (opcional) */
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* 13. Menú móvil (unificado, sin duplicados) */
@media (max-width: 768px) {
  .nav { display: none; }
  .nav.nav-open { 
    display: flex;
    flex-direction: column;
    position: absolute;
    right: 1.4rem;
    top: 3.6rem;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 1rem;
    padding: .8rem .9rem;
    gap: .6rem;
    min-width: 190px;
    z-index: 10000;
  }
  .nav.nav-open a { color: #fff; }
  .nav-toggle { display: block; z-index: 10001; }
}

/* 14. Hero alternativo (hero-solar) — CONSERVADO */
.hero-solar {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2.5rem;
  padding: 6.5rem min(6vw, 5rem) 4rem;
  background: #fff;
  align-items: center;
}
.hero-left .hero-pill {
  background: #00b894;
  color: #fff;
  display: inline-block;
  padding: .3rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  color: #555;
  font-size: .9rem;
}
.hero-bullets li::before {
  content: "•";
  color: #00b894;
  margin-right: .4rem;
}
.hero-solar h1 {
  font-size: clamp(2.4rem, 4vw, 3rem);
  margin-bottom: .5rem;
  color: #0f172a;
}
.hero-sub {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.hero-form {
  background: #787a7c;
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 1.5rem;
  padding: 0.5rem 0.5rem 0.8rem;
  box-shadow: 0 12px 35px rgba(15,23,42,.06);
}
.hero-form h2 {
  margin-bottom: .2rem;
}

/* Ajuste de los campos del formulario CF7 */
.hero-form form {
  width: 100%;
  max-width: 420px;             /* límite visual para centrar el bloque */
  margin: 0 auto;
}

.hero-form input[type="text"],
.hero-form input[type="email"],
.hero-form input[type="tel"],
.hero-form textarea {
 	min-height: 48px;      /* antes eran 120px */
  resize: vertical;      /* permite agrandar si el usuario quiere */
  padding: .55rem .7rem;
  line-height: 1.4;
}

.hero-form input[type="submit"],
.hero-form button[type="submit"] {
  display: inline-block;
  margin: 0.2rem auto 0;
}
@media (max-width: 880px) {
  .hero-solar {
    grid-template-columns: 1fr;
    padding-top: 0.2rem;
  }
  .hero-cta {
    flex-direction: column;
  }
  .hero-form {
    order: 99;
  }
}

/* 15. HERO HÍBRIDO (nuevo): IMAGEN desktop + VÍDEO móvil */
.hero--media{
  position: relative;
  isolation: isolate;
  min-height: 90vh; /* altura base desktop */
}

/* Fondo IMAGEN (visible por defecto en desktop) */
.hero--media .hero-bg-desktop{
  position: absolute; inset: 0;
  z-index: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* VÍDEO móvil (oculto por defecto) */
.hero--media .hero-video-mobile{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  display: none !important; /* 🔒 oculto en desktop */
}

/* Overlay por encima del medio */
.hero--media .hero-overlay{
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,.30), rgba(0,0,0,.18));
}

/* Texto por encima de todo */
.hero--media .hero-content{ position: relative; z-index: 2; }

/* ====== MÓVIL ====== */
@media (max-width: 767px){
  /* Mostrar vídeo y ocultar imagen */
  .hero--media { min-height: 100svh; }
  .hero--media .hero-bg-desktop{
    display: none !important;
    background-image: none !important;
  }
  .hero--media .hero-video-mobile{
    display: block !important;
  }

  /* Reubicar el copy para no tapar caras */
  .hero--media .hero-content{
    display: grid; align-content: start; justify-items: center;
    text-align: center; padding-top: 14vh;
  }
}

/* Accesibilidad: reduce motion */
@media (prefers-reduced-motion: reduce){
  .hero--media .hero-video-mobile{
    animation: none !important;
  }
}
/* HERO embebido responsive con overlay de contenido */
.hero-embed-wrap { position: relative; isolation: isolate; }
.hero-embed-ratio {
  position: relative;
  width: 100%;
  height: 100vh;              /* pantalla completa; cámbialo a 80vh si prefieres */
  min-height: 520px;
  overflow: hidden;
}
.hero-embed-ratio iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.hero-embed-content {
  position: absolute; inset: 0;
  display: grid; place-content: center;
  padding-inline: min(6vw, 48px);
  color: #fff; text-align: left;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 100%);
}
.hero-embed-content .badge { margin-bottom: 1rem; }
.hero-embed-content h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.05; margin: 0 0 .7rem; }
.hero-embed-content p { max-width: 640px; color: rgba(255,255,255,.85); margin: 0 0 1.2rem; }
.hero-embed-content .btn { margin-right: .6rem; }

@media (max-width: 768px) {
  .hero-embed-ratio { height: 82vh; min-height: 460px; }
  .hero-embed-content { padding-inline: 18px; }
}
/* Botón de envío del formulario – ancho completo */
.hero-form input[type="submit"],
.hero-form button[type="submit"],
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0ea5e9;
  color: #fff !important;
  border: none;
  border-radius: .7rem;
  padding: .3rem 1.2rem .75rem;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .12s ease-out, box-shadow .12s ease-out;
  width: 100%;                 /* ✅ ocupa todo el ancho disponible */
  box-sizing: border-box;      /* evita desbordes */
  margin-top: .8rem;
}

.hero-form input[type="submit"]:hover,
.hero-form button[type="submit"]:hover,
.wpcf7-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(14,165,233,.25);
}



