/**
 * Estilos de la web corporativa publica (Gestiona Energia).
 * Se carga DESPUES de app.css para reusar variables --primary, --text, etc.
 * y sobreescribir solo lo necesario.
 */

/* Reset suave del body solo para la web (no rompe el CRM) */
.web-body {
  margin: 0;
  background: #ffffff;
  color: var(--text, #111827);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.web-body a { color: var(--primary, #2563eb); text-decoration: none; }
.web-body a:hover { text-decoration: underline; }

.web-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.web-muted { color: var(--text-muted, #5b6573); font-size: 0.9rem; }

/* ========== Navbar ========== */
.web-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border, #e1e6ee);
}
.web-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.web-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text, #111827) !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none !important;
}
.web-brand-logo {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  background: var(--primary, #2563eb);
  color: #fff;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}
.web-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.web-nav-links a {
  color: var(--text, #111827);
  font-weight: 500;
}
.web-nav-links a:hover { color: var(--primary, #2563eb); text-decoration: none; }
.web-nav-cta {
  background: var(--primary, #2563eb);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.web-nav-cta:hover { background: var(--primary-hover, #1d4ed8); text-decoration: none !important; }

/* Burger menu (mobile) — toggle puro CSS con checkbox oculto */
.web-nav-toggle { display: none; }
.web-nav-burger {
  display: none;
  width: 40px; height: 40px;
  cursor: pointer;
  position: relative;
}
.web-nav-burger span {
  position: absolute;
  left: 8px;
  width: 24px;
  height: 2px;
  background: var(--text, #111827);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s, top 0.2s;
}
.web-nav-burger span:nth-child(1) { top: 14px; }
.web-nav-burger span:nth-child(2) { top: 20px; }
.web-nav-burger span:nth-child(3) { top: 26px; }

/* ========== Hero ========== */
.web-hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--primary-soft, #eff5ff) 0%, #ffffff 100%);
}
.web-hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.web-hero-eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  background: #fff;
  border: 1px solid var(--border, #e1e6ee);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted, #5b6573);
  font-weight: 500;
}
.web-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text, #111827);
}
.web-hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted, #5b6573);
  margin: 0 0 28px;
  max-width: 540px;
}
.web-hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.web-hero-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text, #111827);
  font-size: 1.05rem;
}
.web-hero-phone strong { font-size: 1.2rem; }

.web-hero-card {
  background: #fff;
  border: 1px solid var(--border, #e1e6ee);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md, 0 4px 12px -2px rgba(15,23,42,.08));
}
.web-hero-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #e1e6ee);
  font-size: 1rem;
}
.web-hero-card-row:last-of-type { border-bottom: none; }
.web-hero-card-row strong { color: var(--primary, #2563eb); }
.web-hero-card-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted, #5b6573);
  font-style: italic;
}

/* ========== Botones ========== */
.web-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, color 0.15s;
}
.web-btn:hover { text-decoration: none; }
.web-btn:active { transform: translateY(1px); }
.web-btn-primary {
  background: var(--primary, #2563eb);
  color: #fff !important;
}
.web-btn-primary:hover { background: var(--primary-hover, #1d4ed8); }
.web-btn-ghost {
  background: transparent;
  color: var(--text, #111827) !important;
  border-color: var(--border-strong, #cbd2dc);
}
.web-btn-ghost:hover { background: #f7f9fc; }

/* ========== Secciones ========== */
.web-section {
  padding: 72px 0;
}
.web-section-alt {
  background: #f7f9fc;
}
.web-section-head {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 680px;
}
.web-eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary, #2563eb);
  font-weight: 600;
}
.web-section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  letter-spacing: -0.01em;
  color: var(--text, #111827);
}
.web-section-sub {
  margin: 0;
  color: var(--text-muted, #5b6573);
  font-size: 1.05rem;
}
.web-section-cta {
  text-align: center;
  margin-top: 36px;
}

/* ========== Cards ========== */
.web-cards {
  display: grid;
  gap: 20px;
}
.web-cards-3 { grid-template-columns: repeat(3, 1fr); }
.web-cards-4 { grid-template-columns: repeat(4, 1fr); }

.web-card {
  background: #fff;
  border: 1px solid var(--border, #e1e6ee);
  border-radius: 14px;
  padding: 24px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.web-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px -2px rgba(15,23,42,.08));
  border-color: var(--border-strong, #cbd2dc);
}
.web-card-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.web-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--text, #111827);
}
.web-card p {
  margin: 0;
  color: var(--text-muted, #5b6573);
  font-size: 0.97rem;
}

/* Pilares (sin caja, mas tipograficos) */
.web-cards-bare .web-pillar {
  background: none;
  border: none;
  padding: 0;
}
.web-cards-bare .web-pillar:hover {
  transform: none;
  box-shadow: none;
}
.web-pillar-num {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary, #2563eb);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.web-pillar h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: var(--text, #111827);
}
.web-pillar p {
  margin: 0;
  color: var(--text-muted, #5b6573);
  font-size: 0.97rem;
}

/* ========== Sobre nosotros ========== */
.web-nosotros {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.web-nosotros h2 { margin-top: 0; }
.web-nosotros-text p {
  color: var(--text-muted, #5b6573);
  margin: 0 0 16px;
  font-size: 1.05rem;
}
.web-nosotros-stats {
  display: grid;
  gap: 16px;
}
.web-stat {
  background: #fff;
  border: 1px solid var(--border, #e1e6ee);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.web-stat strong {
  font-size: 1.8rem;
  color: var(--primary, #2563eb);
  letter-spacing: -0.02em;
  font-weight: 800;
  white-space: nowrap;
}
.web-stat span {
  color: var(--text-muted, #5b6573);
  font-size: 0.95rem;
}

/* ========== Contacto ========== */
.web-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.web-contact-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border, #e1e6ee);
  border-radius: 14px;
  padding: 28px;
  color: var(--text, #111827) !important;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.web-contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary, #2563eb);
  box-shadow: var(--shadow-md, 0 4px 12px -2px rgba(15,23,42,.08));
  text-decoration: none !important;
}
.web-contact-card-static { cursor: default; }
.web-contact-card-static:hover { transform: none; border-color: var(--border, #e1e6ee); box-shadow: none; }
.web-contact-icon { font-size: 1.8rem; margin-bottom: 8px; }
.web-contact-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.web-contact-card p { margin: 0 0 4px; font-size: 1.05rem; font-weight: 500; }

/* ========== Footer ========== */
.web-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 0;
  padding: 56px 0 0;
}
.web-footer a { color: #cbd5e1; }
.web-footer a:hover { color: #fff; }
.web-footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.web-footer-col h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #f1f5f9;
  font-weight: 600;
}
.web-footer-col p { margin: 0 0 6px; font-size: 0.92rem; line-height: 1.55; }
.web-footer-col ul { list-style: none; padding: 0; margin: 0; }
.web-footer-col ul li { margin-bottom: 8px; font-size: 0.92rem; }
.web-brand-footer { color: #fff !important; }
.web-brand-footer .web-brand-name { color: #fff; }
.web-footer-tagline { color: #94a3b8; margin-top: 12px; max-width: 320px; }
.web-footer-copy {
  border-top: 1px solid #1e293b;
  padding: 20px 0;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .web-hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .web-hero-card { order: 2; }
  .web-cards-3, .web-cards-4 { grid-template-columns: repeat(2, 1fr); }
  .web-nosotros { grid-template-columns: 1fr; gap: 32px; }
  .web-footer-inner { grid-template-columns: 1fr 1fr; }
  .web-contact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .web-nav-burger { display: block; }
  .web-nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border, #e1e6ee);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .web-nav-toggle:checked ~ .web-nav-links { max-height: 500px; }
  .web-nav-links a {
    padding: 14px 20px;
    border-top: 1px solid var(--border, #e1e6ee);
    width: 100%;
    box-sizing: border-box;
  }
  .web-nav-cta {
    margin: 12px 20px;
    width: calc(100% - 40px);
    text-align: center;
  }
  .web-cards-3, .web-cards-4 { grid-template-columns: 1fr; }
  .web-section { padding: 56px 0; }
  .web-hero { padding: 48px 0; }
  .web-hero-ctas { flex-direction: column; }
  .web-hero-ctas .web-btn { width: 100%; }
  .web-footer-inner { grid-template-columns: 1fr; }
}
