/* Tipografía y colores base */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: #f9fafb;
  color: #04192d;
}

a {
  text-decoration: none;
}

header, footer {
  text-align: center;
  color: white;
}

footer {
  background: #007acc;
  padding: 1rem;
  margin-top: 0rem;
}

.container, main {
  max-width: 1200px;
  margin: auto;
  padding: 1rem 1rem;
}

/* HERO */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  height: 220px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 8px solid #f9c846;
  height: 30vh; /* 30% de la altura visible de la pantalla */

}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #007acc;
  z-index: 1;
}

.hero .container,
.hero .logo,
.hero .hero-text {
  position: relative;
  z-index: 2;
  font-size: 2rem;
  margin-top: 0rem;
  margin-bottom: -1rem;
  text-align: center;
}

.logo {
  height: 80px;
  margin-bottom: 1rem;
}

.logo-hero {
  height: 60px;
  margin-bottom: 3rem;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 0;
}

.hero-text p, .subtitulo {
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

.grupo-campos {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.grupo-campos > div {
  flex: 1;
  min-width: 200px;
}


.boton, button {
  background: #f9c846;
  color: #04192d;
  padding: 0.7rem 2.5rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  transition: background 0.3s ease;
  cursor: pointer;
  display: inline-block;
  width: 290px;
  text-align: center;
  box-sizing: border-box;
  margin: 1rem; /* ← dejamos esto por defecto */
}

/* 🚫 Quitamos margen en versión móvil solo dentro del contenedor */
@media (max-width: 768px) {
  .boton-container .boton {
    margin: 0;
    width: 100%;
  }

  .boton-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
}



.boton:hover, button:hover {
  background: #e6b730;
}

/* Formularios */
input, textarea {
  width: 95%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Tablas */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}

th {
  background: #f9c846;
  color: #04192d;
}

.tabla-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 1rem;
}

/* Grid general */
.grid, .contenedor-final, .contenedor-resumido {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.contacto-grid {
  display: flex;
  flex-direction: row; /* izquierda a derecha */
  align-items: center;
  gap: 2rem;
}

.contacto-img {
  flex: 1 1 40%;
  max-width: 40%;
  height: auto;
  border-radius: 8px;
}

.formulario-contacto {
  flex: 1 1 55%;
}

/* Servicios y ventajas */
.servicio, .ventaja {
  flex: 1 1 30%;
  text-align: center;
  transition: transform 0.3s ease;
}
.servicio:hover, .ventaja:hover {
  transform: translateY(-5px);
}

.ventajas {
  background: #fff;
  padding: 4rem 1rem;
  text-align: center;
}
.ventajas .grid {
  margin-top: 2rem;
}
.ventaja img {
  height: 60px;
  margin-bottom: 1rem;
}

/* Contacto */
.contacto-img {
  flex: 1 1 40%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.formulario-contacto input,
.formulario-contacto textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1rem;
  padding: 0.5rem;
  font-size: 1rem;
}

/* Titular */
.titulo-hero {
  font-size: 2rem;
  margin: 0.5rem 0;
}

/* Secciones resumen y totales */
.detalles-cotizacion,
.totales-cotizacion,
.resumen-cotizacion,
.resumen-datos {
  background: #f1f9ff;
  border-left: 4px solid #007acc;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 1rem;
  flex: 1 1 300px;
  max-width: 350px;
}

.preguntas-frecuentes {
  background: #f1f9ff;
  border-left: 4px solid #007acc;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 1rem;
  flex: 1 1 300px;
  max-width: 1400px;
}

/* Contenedor resumen doble */
.resumen-cotizacion, .resumen-datos {
  flex:  1 1 45%; 
  text-align: left;
}

.resumen-cotizacion { order: 2; }
.resumen-datos { order: 1; }

/* Botón WhatsApp */
.boton-whatsapp {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 999;
  background: transparent;
}
.boton-whatsapp img {
  width: 60px;
  height: 60px;
}

/* Botón y caja de chat */
.boton-chat {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  background: #007acc;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.chat-box {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 300px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  z-index: 999;
}

.chat-header {
  background: #007acc;
  color: #fff;
  padding: 10px;
  border-radius: 10px 10px 0 0;
  font-weight: bold;
  text-align: center;
}

.chat-mensajes {
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.9rem;
}

#chat-input {
  border: none;
  border-top: 1px solid #ddd;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    height: 300px;
    flex-direction: column;
    padding: 1rem;
  }

  .hero-text h1 {
    font-size: 1.2rem;
  }

  .grid,
  .contenedor-resumido {
    flex-direction: column;
  }

  .resumen-cotizacion, .resumen-datos {
    order: unset;
  }
}

/* Impresión */
@media print {
  body {
    width: 21cm;
    height: 29.7cm;
    margin: 0 auto;
    zoom: 100%;
  }

  html, body {
    overflow: visible !important;
  }

  .no-imprimir {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .resumen-cotizacion {
    flex: 1 1 100%;
  }
}

form input[type="text"],
form input[type="tel"],
form input[type="number"] {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem;
  box-sizing: border-box;
}

/* Para que los campos consumo y pago estén lado a lado */
.grupo-campos {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.grupo-campos .campo {
  flex: 1; /* Que ambos ocupen mismo espacio */
  
}

@media (max-width: 768px) {
  .boton-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .boton-container .boton {
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .contacto-grid {
    flex-direction: column;
    align-items: center;
  }

  .contacto-img,
  .formulario-contacto {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .boton-container > * {
    margin: 0 !important;
  }
}

#btnOcultarDetalles {
  margin-left: 10;
  display: block;
}



input[type="number"][id^="cantidad-inversor-"] {
  display: block;
  width: 70px;
  margin: 6px auto;
  font-size: 1rem;
  padding: 6px 8px;
  text-align: center;
  border: none;
  border-radius: 4px;
}


@media (min-width: 768px) {
  input[type="number"][id="cantidad-inversor-${inv.modelo}"] {
    margin-left: 1px;
    margin-right: auto;
  }
}

select::-ms-expand {
  display: none; /* IE10+ */
}

.container, .content {
    max-width: 900px !important;
    margin: 40px auto !important;
    padding: 25px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 0 18px rgba(0,0,0,0.12) !important;
}

button {
    background-color: #007acc !important;
    color: white !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    transition: background-color 0.3s ease !important;
}


.card-resumen {
  background: white;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  max-width: 900px;
  margin: 1rem auto;
  padding: .5rem;
}

/* En tu archivo CSS */


.select-panel {
    margin-left: 15px; /* Ajusta el valor según lo necesites */
}

/* Agregar a estilos.css */
.input-error {
  border: 2px solid #e74c3c !important;
}

.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  display: none;
}

.loader-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

section.container h2 {
    
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

section.container p {
    font-size: 1.1rem;
    color: #04192d;
    line-height: 1.5;
}

section.container ul {
    font-size: 1rem;
    color: #333;
}

section.container ul li {
    margin-bottom: 10px;
}

section.container img {
    margin-top: 1rem;
}
