/* Calculadora de consumo eléctrico residencial - Frío Servicios L.S. */
.energy-page {
  background: var(--color-bg-alt);
}

/* Ocultar el botón flotante en esta página para que no colisione con el CTA */
.energy-page .floating-whatsapp {
  display: none !important;
}

/* ==========================================================================
   HERO ELEGANTE CON RESPIRO (NUNCA CHOCA CON EL MENÚ)
   ========================================================================== */
.energy-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height, 80px) + 3.25rem) 0 2rem;
  color: var(--color-text-main);
  background: linear-gradient(135deg, #ffffff 0%, #f4fbfe 60%, #e6f6fb 100%);
  border-bottom: 1px solid var(--color-border-light);
  text-align: center;
}

.energy-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand-blue);
  background: rgba(0, 119, 182, 0.08);
  border: 1px solid rgba(0, 119, 182, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.65rem;
}

.energy-hero h1 {
  margin: 0 0 0.5rem 0;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.3rem + 1.2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

.energy-hero p {
  max-width: 540px;
  margin: 0 auto;
  color: var(--color-text-muted);
  font-size: clamp(0.9rem, 0.86rem + 0.15vw, 1rem);
  line-height: 1.5;
}

/* ==========================================================================
   LAYOUT RESPONSIVO (2 COLUMNAS EN DESKTOP / 1 TARJETA EN MÓVIL)
   ========================================================================== */
.energy-calculator-section {
  padding: 2.5rem 0 5rem;
}

.energy-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  max-width: 1120px;
  margin: 0 auto;
  align-items: start;
}

/* Tarjeta izquierda (Formulario de Configuración) */
.energy-form-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 6px 20px -4px rgba(10, 37, 64, 0.05);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  position: relative;
}

/* Tarjeta derecha (Ficha de Resultados con jerarquía y presencia) */
.energy-results-card {
  position: sticky;
  top: calc(var(--header-height, 80px) + 1.5rem);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #f5faff 0%, #ffffff 50%);
  border: 1.5px solid #c0e0f8;
  box-shadow: 0 12px 35px -8px rgba(0, 119, 182, 0.12), 0 2px 6px rgba(10, 37, 64, 0.03);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
}

@media (min-width: 860px) {
  .energy-card[hidden] {
    display: block !important;
  }
}

/* Elementos exclusivos de móvil */
.mobile-only {
  display: none !important;
}

/* ==========================================================================
   FORMULARIO CON CAMPOS NUMÉRICOS ESTÁNDAR
   ========================================================================== */
.form-card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.form-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0 0 0.25rem 0;
}

.form-card-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}

.input-field-group {
  margin-bottom: 1.4rem;
}

.input-field-group:last-of-type {
  margin-bottom: 0;
}

.input-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.45rem;
  cursor: pointer;
}

.input-suffix-wrapper {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 0 14px;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 3px rgba(10, 37, 64, 0.04);
}

.input-suffix-wrapper:focus-within {
  border-color: var(--color-brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
}

.std-number-input {
  flex: 1;
  height: 48px;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  padding: 0;
  -moz-appearance: textfield;
}

.std-number-input::-webkit-outer-spin-button,
.std-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-suffix {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  padding-left: 10px;
  border-left: 1px solid #e2e8f0;
  line-height: 24px;
  user-select: none;
}

.input-help {
  display: block;
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 5px;
  line-height: 1.4;
}

.input-help strong {
  color: var(--color-primary);
}

/* Botón calcular en móvil */
.step-action {
  margin-top: 1.5rem;
}

.energy-calc-btn {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 119, 182, 0.25);
}

.energy-calc-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

/* ==========================================================================
   TARJETA DE RESULTADOS (FICHA DE RESUMEN CON CONTRASTE)
   ========================================================================== */
.result-header {
  text-align: center;
}

.energy-result-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0.4rem;
  color: var(--color-brand-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0, 119, 182, 0.08);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Precio con jerarquía */
.energy-cost {
  margin: 0.35rem 0 1.25rem;
  padding: 0.5rem 0;
  background: transparent;
  box-shadow: none;
  border: none;
  text-align: center;
}

.energy-cost-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-primary);
}

.energy-cost-period {
  display: block;
  margin-top: 6px;
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

/* Métricas enmarcadas con líneas sutiles */
.energy-metrics {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(0, 119, 182, 0.12);
  border-bottom: 1px solid rgba(0, 119, 182, 0.12);
  margin-bottom: 1.15rem;
}

.energy-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-muted);
  padding: 2px 0;
  border-bottom: none;
}

.energy-metric:last-child {
  border-bottom: 0;
}

.energy-metric strong {
  color: var(--color-primary);
  font-weight: 700;
}

/* ==========================================================================
   BLOQUE DE ASESORÍA Y CONVERSIÓN
   ========================================================================== */
.cta-consult-box {
  margin-top: 0.5rem;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  text-align: center;
}

.cta-consult-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.35;
  margin-bottom: 4px;
}

.cta-consult-text {
  font-size: 12.5px;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0 0 12px 0;
}

.energy-wa {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  height: 46px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
  gap: 8px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
}

.energy-wa .wa-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex-shrink: 0;
}

.cta-consult-sub {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.btn-back-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 0.75rem;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s;
}

.btn-back-edit:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Animación sutil de cambio */
@keyframes energyViewFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   MODO MÓVIL (< 860px): CONTROLES CENTRADOS Y FLUJO 2 PASOS
   ========================================================================== */
@media (max-width: 859px) {
  .energy-hero {
    padding-top: calc(var(--header-height-mobile, 68px) + 1.5rem);
    padding-bottom: 1rem;
  }
  .energy-calculator-section {
    padding-top: 1rem;
    padding-bottom: 3rem;
  }
  .energy-layout {
    display: block;
    max-width: 460px;
  }
  .energy-card {
    padding: 1.35rem 1.15rem;
    border-radius: var(--radius-lg);
    animation: energyViewFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .energy-card[hidden] {
    display: none !important;
  }

  .form-card-header {
    text-align: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.85rem;
  }

  .input-field-group {
    margin-bottom: 1.15rem;
  }

  .input-label {
    font-size: 13.5px;
  }

  .std-number-input {
    height: 46px;
    font-size: 17px;
  }

  .mobile-only {
    display: block !important;
  }
  .btn-back-edit.mobile-only {
    display: inline-flex !important;
  }
}


