/* ===================================================================
   Gasyelec — Hoja de estilos principal
   Fuente: Poppins | Paleta: celeste corporativo + navy + acento cálido
   =================================================================== */

:root {
  --color-primary: #0EA5E9;
  --color-primary-dark: #0284C7;
  --color-primary-darker: #075985;
  --color-navy: #0B2A3B;
  --color-navy-soft: #123B52;
  --color-accent: #FF7A1A;
  --color-accent-dark: #E05F00;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F3FAFD;
  --color-border: #E2ECF1;
  --color-text: #1C2B33;
  --color-text-muted: #55707D;
  --color-white: #FFFFFF;

  --font-base: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(11, 42, 59, 0.06);
  --shadow-md: 0 12px 32px rgba(11, 42, 59, 0.10);
  --shadow-lg: 0 24px 60px rgba(11, 42, 59, 0.16);

  --container-width: 1200px;
  --header-height: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font: inherit; color: inherit; }

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 700; color: var(--color-navy); line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Icons ---------- */
.icon { width: 22px; height: 22px; flex-shrink: 0; }
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 34px; height: 34px; }
.icon-xl { width: 48px; height: 48px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.btn .icon { width: 19px; height: 19px; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 122, 26, 0.32);
}
.btn-primary:hover { background: var(--color-accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }

.btn-ghost {
  background: rgba(14, 165, 233, 0.08);
  color: var(--color-primary-darker);
}
.btn-ghost:hover { background: rgba(14, 165, 233, 0.16); }

.btn-light {
  background: #fff;
  color: var(--color-accent-dark);
}
.btn-light:hover { background: #fff9f4; }

.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding-inline: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; }
.brand-logo { height: 46px; width: auto; }
.brand-logo-footer { height: 62px; }

.main-nav ul { display: flex; gap: 30px; }
.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-navy-soft);
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--color-navy);
}
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 80px; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(14, 165, 233, 0.18), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(255, 122, 26, 0.10), transparent 60%),
    var(--color-bg-alt);
  z-index: -1;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.12);
  color: var(--color-primary-darker);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.hero-lead { margin-top: 18px; font-size: 1.08rem; color: var(--color-text-muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; }
.hero-stats li {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.9rem; color: var(--color-navy-soft);
}

.hero-card {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--color-navy), var(--color-primary-darker));
  box-shadow: var(--shadow-lg);
}
.hero-card-media {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-card-badge {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  background: #fff;
  color: var(--color-navy);
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.hero-card-badge .icon { color: var(--color-primary); }
.hero-card-badge-seal { padding: 8px 16px; border-radius: var(--radius-md); }
.hero-card-badge-seal img { height: 46px; width: auto; display: block; }

/* ---------- Trust bar ---------- */
.trust-bar { background: var(--color-navy); padding: 20px 0; }
.trust-bar-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.trust-item {
  display: flex; align-items: center; gap: 12px;
  color: #fff; font-size: 0.88rem; font-weight: 500;
}
.trust-item .icon { color: var(--color-primary); }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--color-bg-alt); }

.section-head { max-width: 700px; margin: 0 auto 48px; text-align: center; }
.section-kicker {
  display: inline-block;
  color: var(--color-primary-dark);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section-head p { margin-top: 14px; color: var(--color-text-muted); }
.sello-sec { height: 90px; width: auto; margin: 26px auto 0; }
.section-cta { text-align: center; margin-top: 44px; }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: 1fr; }

/* ---------- Cards / Servicios ---------- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.10);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--color-text-muted); font-size: 0.94rem; }

/* ---------- Beneficios (features) ---------- */
.feature { display: flex; gap: 18px; align-items: flex-start; }
.feature-icon {
  width: 50px; height: 50px; flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
}
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--color-text-muted); font-size: 0.94rem; }

/* ---------- Proceso ---------- */
.process {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  counter-reset: step;
}
.process-step {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: center;
}
.process-number {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #fff;
  font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.process-icon {
  width: 56px; height: 56px;
  margin: 10px auto 16px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.10);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
}
.process-step p { color: var(--color-text-muted); font-size: 0.9rem; margin-top: 6px; }

/* ---------- Cobertura ---------- */
.cobertura-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.cobertura-grid p { color: var(--color-text-muted); margin-top: 14px; }
.cobertura-grid .btn { margin-top: 22px; }

.comuna-list { display: flex; flex-wrap: wrap; gap: 12px; }
.comuna-chip {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 500; font-size: 0.9rem;
}
.comuna-chip .icon { color: var(--color-primary); }
.comuna-chip-more { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }
.comuna-chip-more .icon { color: var(--color-accent); }

/* ---------- Galería ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  padding: 0;
  display: block;
  width: 100%;
  background: var(--color-bg-alt);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.gallery-item-zoom {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 42, 59, 0);
  color: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}
.gallery-item-zoom .icon { width: 28px; height: 28px; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-item-zoom { background: rgba(11, 42, 59, 0.35); color: #fff; }
.gallery-item:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 20, 28, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.icon-flip { transform: scaleX(-1); }

/* ---------- Animaciones de entrada ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 640px) {
  .lightbox-prev { left: 24px; }
  .lightbox-next { right: 24px; }
}

/* ---------- Urgency banner ---------- */
.urgency-banner {
  background: linear-gradient(120deg, var(--color-accent), var(--color-accent-dark));
  padding: 44px 0;
}
.urgency-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}
.urgency-copy { display: flex; gap: 18px; align-items: center; color: #fff; }
.urgency-copy .icon { color: #fff; }
.urgency-copy h2 { color: #fff; font-size: 1.4rem; }
.urgency-copy p { color: rgba(255,255,255,0.9); margin-top: 4px; }

/* ---------- Contacto ---------- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.contacto-info p { color: var(--color-text-muted); margin-top: 14px; }
.contacto-list { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.contacto-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.contacto-list .icon { color: var(--color-primary); }

.social-links { display: flex; gap: 10px; margin-top: 20px; }
.social-links a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.10);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.social-links a:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
.social-links-lg a { width: 46px; height: 46px; }

/* WhatsApp conserva su verde de marca para máximo reconocimiento */
.social-links a.is-whatsapp { background: rgba(37, 211, 102, 0.14); color: #25D366; }
.social-links a.is-whatsapp:hover { background: #25D366; color: #fff; }

.contacto-form-wrap {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 500;
}
.alert-success { background: #ECFDF5; color: #067647; }
.alert-error { background: #FEF2F2; color: #B91C1C; }

.form-row { margin-bottom: 18px; }
.form-row-split { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px; }
.form-row-split .form-row { margin-bottom: 0; }
.form-row label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 8px; color: var(--color-navy-soft); }

.contacto-form input[type="text"],
.contacto-form input[type="tel"],
.contacto-form input[type="email"],
.contacto-form select,
.contacto-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
  outline: none;
}
.contacto-form textarea { resize: vertical; min-height: 100px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-hint { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--color-text-muted); }
.form-hint a { color: var(--color-primary-dark); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-navy); color: rgba(255,255,255,0.85); padding: 70px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { margin: 18px 0; color: rgba(255,255,255,0.65); font-size: 0.92rem; max-width: 40ch; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-col a:hover { color: var(--color-primary); }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; }
.footer-contact .icon { color: var(--color-primary); margin-top: 2px; }

.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 0;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45);
  z-index: 90;
  animation: float-pulse 2.4s ease-in-out infinite;
}
.whatsapp-float .icon { width: 30px; height: 30px; }
.whatsapp-float:hover { transform: scale(1.06); }

@keyframes float-pulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(37, 211, 102, 0.45); }
  50% { box-shadow: 0 12px 28px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.12); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .whatsapp-float { animation: none; }
  .btn:hover, .card:hover { transform: none; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ===================================================================
   Responsive breakpoints
   =================================================================== */

/* Tablet chico (>=560px) */
@media (min-width: 560px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .form-row-split { grid-template-columns: 1fr 1fr; }
  .trust-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet (>=768px) */
@media (min-width: 768px) {
  .urgency-inner { flex-direction: row; align-items: center; }
  .process { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* Desktop (>=1024px) */
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }

  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .trust-bar-inner { grid-template-columns: repeat(4, 1fr); }
  .cobertura-grid { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: repeat(5, 1fr); }
  .contacto-grid { grid-template-columns: 0.9fr 1.1fr; }
}

/* Mobile nav (<1024px) */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .main-nav.is-open { max-height: 400px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px 20px; }
  .main-nav li { border-bottom: 1px solid var(--color-border); }
  .main-nav a { display: block; padding: 14px 0; }
  .main-nav a::after { display: none; }
  .btn-hide-mobile { display: none; }
}

@media (max-width: 480px) {
  .btn-hide-mobile { display: none; }
  .whatsapp-float { width: 54px; height: 54px; bottom: 18px; right: 18px; }
  .contacto-form-wrap { padding: 24px 18px; }
}
