/*
Theme Name: Fs Solar
Theme URI: https://fssolar.cl
Author: Fs Solar
Description: Tema corporativo Fs Solar - Energía solar e ingeniería.
Version: 1.0.2
License: GNU General Public License v2 or later
Text Domain: fssolar
*/

:root {
  --primary: #1B263B;
  --primary-light: #415A77;
  --gold: #C5A059;
  --gold-dark: #B8923E;
  --white: #fff;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--primary); line-height: 1.6; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(27, 38, 59, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: background 0.3s;
}
.site-header.scrolled { background: rgba(27, 38, 59, 0.98); }
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 94px;
  padding: 0.25rem 0;
}
.site-logo {
  display: flex;
  align-items: center;
}
.site-logo img,
.site-logo .site-logo-img {
  height: 90px !important;
  min-height: 90px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain !important;
  display: block !important;
}
@media (min-width: 768px) {
  .site-logo img,
  .site-logo .site-logo-img {
    height: 120px !important;
    min-height: 120px !important;
  }
  .header-inner { min-height: 124px; }
}
.nav-menu { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
}
.nav-menu a:hover { color: var(--gold); }
.nav-menu .current a { color: var(--gold); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}
.hero .container {
  margin-left: 0;
  margin-right: auto;
  width: 100%;
  max-width: 1280px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(27,38,59,0.95) 0%, rgba(27,38,59,0.8) 50%, transparent 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 6rem 0 4rem;
  max-width: 42rem;
  text-align: left;
}
.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(197,160,89,0.2);
  border: 1px solid var(--gold);
  border-radius: 9999px;
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.28;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  max-width: 20em;
}
.hero h1 .line2 { display: block; margin-top: 0.2em; }
.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 36rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 1rem;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(to right, var(--gold-dark), var(--gold));
  color: var(--white);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); }

/* Sections */
.section { padding: 4rem 0; }
.section-dark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
  color: var(--white);
}
.section-light { background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%); }
.section-title {
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
}
.section-title.text-white { color: var(--white); }
.section-title:not(.text-white) { color: var(--primary); }

/* Metrics grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.metric-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  transition: transform 0.2s;
}
.metric-card:hover { transform: translateY(-4px); }
.metric-value { font-size: 2.5rem; font-weight: 800; color: var(--gold); margin-bottom: 0.5rem; }
.metric-label { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem; }
.metric-desc { font-size: 0.875rem; opacity: 0.85; }

/* Cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
  border: 1px solid var(--gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.card-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--gold), #D4AF37);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--white);
  font-size: 1.5rem;
}
.card h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 1rem; }
.card p { color: var(--primary-light); line-height: 1.7; }

/* Cotizador 4 pasos (estilo Intisolar) */
.cotizador-section { background: #f0f2f5; }
.cotizador-subtitle {
  text-align: center;
  color: var(--primary-light);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}
.cotizador-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(27, 38, 59, 0.1), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(27, 38, 59, 0.08);
  border-left: 4px solid var(--gold);
}
.cotizador-progress {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1.5rem;
}
.cotizador-step {
  display: none;
  min-height: 200px;
}
.cotizador-step.active { display: block; }
.cotizador-step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.cotizador-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 500px) { .cotizador-options { grid-template-columns: 1fr; } }
.cotizador-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: center;
}
.cotizador-option:hover { border-color: var(--gold); background: rgba(197, 160, 89, 0.06); }
.cotizador-option[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.12);
  box-shadow: 0 0 0 1px var(--gold);
}
.cotizador-option__title { font-size: 1.125rem; font-weight: 700; color: var(--primary); margin-bottom: 0.35rem; }
.cotizador-option__desc { font-size: 0.875rem; color: var(--gray-600); }
.cotizador-form-group { margin-bottom: 1.5rem; }
.cotizador-label { display: block; font-weight: 600; color: var(--primary); margin-bottom: 0.5rem; font-size: 0.9375rem; }
.cotizador-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
}
.cotizador-input:focus { outline: none; border-color: var(--gold); }
.cotizador-radio-row { display: flex; gap: 1rem; margin-top: 0.5rem; }
.cotizador-radio { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9375rem; }
.cotizador-resumen {
  background: #f8f9fa;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  color: var(--primary);
  line-height: 1.6;
}
.cotizador-resumen strong { color: var(--primary); }
.cotizador-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.cotizador-actions .btn { min-width: 140px; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: rgba(27, 38, 59, 0.06); }

/* Calculator */
.calculator-section { background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%); }
.calculator-section .container {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}
.calculator-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 520px;
  margin: 0 auto;
}
.calculator-wrap.has-results {
  grid-template-columns: 1fr 1fr;
  max-width: none;
  margin: 0;
}
@media (max-width: 968px) {
  .calculator-wrap.has-results { grid-template-columns: 1fr; max-width: none; }
}
.calc-form {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(27, 38, 59, 0.1), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(27, 38, 59, 0.08);
  border-left: 4px solid var(--gold);
}
.calc-form .form-group { margin-bottom: 1.5rem; }
.calc-form label { display: block; font-weight: 600; color: var(--primary); margin-bottom: 0.5rem; }
.calc-form input, .calc-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
}
.calc-form input:focus, .calc-form select:focus {
  outline: none;
  border-color: var(--gold);
}
.calc-results {
  display: none;
}
.calc-results.visible {
  display: block;
}
.calc-results-inner {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 8px 32px rgba(27, 38, 59, 0.1), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(27, 38, 59, 0.08);
  border-left: 4px solid var(--gold);
}
.calc-results-grid {
  display: grid;
  gap: 1.25rem;
}
.calc-result-item {
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.calc-result-item:last-child { padding-bottom: 0; border-bottom: none; }
.calc-result-item .label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.calc-result-item .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.calc-result-item.calc-result-item--highlight .value { color: var(--gold); font-size: 1.75rem; }

/* Footer */
.site-footer {
  background: var(--primary);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  color: var(--gold);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.footer-grid a, .footer-grid p { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9375rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--primary-light);
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
}

/* Page content */
.main-content { padding-top: 70px; }
.page-content { padding: 3rem 0; max-width: 800px; margin: 0 auto; }
.page-content h1 { margin-bottom: 1.5rem; color: var(--primary); }
.page-content p { margin-bottom: 1rem; color: var(--gray-600); line-height: 1.8; }

/* ===== Contact page (vista profesional) ===== */
/* Evitar fondo o logo fantasma en página de contacto */
body.page-slug-contacto,
body.page-slug-contacto .main-content,
.page-slug-contacto .contact-section { background-image: none !important; }
body.page-slug-contacto { background-color: #eef1f5; }

.contact-hero {
  background: linear-gradient(135deg, #1B263B 0%, #415A77 50%, #1B263B 100%);
  color: #fff;
  padding: 4.5rem 0 3.5rem;
  margin-top: 0;
  text-align: center;
}
.contact-hero .container {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  text-align: center;
  box-sizing: border-box;
}
.contact-hero__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.contact-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  color: #fff;
}
.contact-hero__subtitle {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.9);
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.65;
}

.contact-section {
  padding: 3.5rem 0 4.5rem;
  background: #eef1f5;
}
.contact-section .container.contact-section__inner {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
  width: 100%;
}
@media (max-width: 920px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-form-wrap {
  background: #fff;
  border-radius: 1rem;
  padding: 2.25rem 2.5rem;
  box-shadow: 0 8px 32px rgba(27, 38, 59, 0.1), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(27, 38, 59, 0.08);
  border-left: 4px solid var(--gold);
  min-width: 0;
}
.contact-form .form-row { display: grid; gap: 1.25rem; }
.contact-form .form-row--half { grid-template-columns: 1fr 1fr; }
@media (max-width: 500px) {
  .contact-form .form-row--half { grid-template-columns: 1fr; }
}
.contact-form .form-group { margin-bottom: 1.75rem; }
.contact-form .form-group:last-of-type { margin-bottom: 1.5rem; }
.contact-form .form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.contact-form .form-group .required { color: var(--gold); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1.125rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover { border-color: #9ca3af; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}
.contact-form textarea { resize: vertical; min-height: 200px; }
.contact-form .btn--block { width: 100%; justify-content: center; margin-top: 0.5rem; padding: 1rem 1.5rem; font-size: 1.0625rem; }

.contact-message {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.contact-message__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}
.contact-message--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.contact-message--success .contact-message__icon { background: #10b981; color: #fff; }
.contact-message--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.contact-message--error .contact-message__icon { background: #dc2626; color: #fff; }
.contact-message strong { display: block; margin-bottom: 0.25rem; }
.contact-message p { margin: 0; }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}
.contact-info__card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 8px 32px rgba(27, 38, 59, 0.08), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(27, 38, 59, 0.06);
}
.contact-info__card--dark {
  background: linear-gradient(160deg, #1B263B 0%, #415A77 100%);
  color: #fff;
  border: none;
  box-shadow: 0 8px 32px rgba(27, 38, 59, 0.25);
}
.contact-info__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
  letter-spacing: 0.02em;
}
.contact-info__card--dark .contact-info__title {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.2);
}
.contact-info__list { list-style: none; padding: 0; margin: 0; }
.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.contact-info__item:last-of-type { margin-bottom: 0; }
.contact-info__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(197, 160, 89, 0.18);
  color: var(--gold);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}
.contact-info__item strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}
.contact-info__item a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9375rem;
}
.contact-info__item a:hover { color: var(--gold); }
.contact-info__item span { font-size: 0.9375rem; color: var(--primary); }
.contact-info__note {
  font-size: 0.8125rem;
  color: var(--gray-600);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  line-height: 1.5;
}
.contact-info__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.95);
}
.contact-info__bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.875rem;
}
.contact-info__bullets li:last-child { margin-bottom: 0; }
.contact-info__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

/* ===== Servicios (centrado y proporción correcta) ===== */
body.page-slug-servicios { background-color: #eef1f5; }
.page-slug-servicios .contact-section {
  padding: 2.5rem 1rem 3.5rem;
  box-sizing: border-box;
}
.page-slug-servicios .contact-section .container.contact-section__inner {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  width: 100%;
  box-sizing: border-box;
}
.contact-section .cards-grid--square {
  margin-bottom: 2.5rem;
  width: 100%;
  box-sizing: border-box;
}
.cards-grid--square {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 920px) {
  .cards-grid--square { grid-template-columns: 1fr; }
  .page-slug-servicios .contact-section .container.contact-section__inner { padding-left: 1rem; padding-right: 1rem; }
}
.cards-grid--square .card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: visible;
}
@media (min-width: 921px) {
  .cards-grid--square .card {
    min-height: 300px;
    overflow: visible;
  }
}
.cards-grid--square .card-icon {
  flex-shrink: 0;
}
.cards-grid--square .card h3 {
  flex-shrink: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.cards-grid--square .card p {
  flex: 1 0 auto;
  margin-bottom: 0;
  overflow: visible;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.services-cta {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.services-cta .contact-info__title { border-bottom: none; padding-bottom: 0; margin-bottom: 0.5rem; }
.services-cta .btn { margin-top: 0; }
