/* Header quick actions: theme, cotizador and contact */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  flex: 0 0 auto;
}

.header-actions .theme-toggle,
.header-icon-link {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.header-actions .theme-toggle {
  margin-left: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.header-actions .theme-toggle-icon {
  width: 44px;
  height: 44px;
}

.header-icon-link {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--graphite-light);
  box-shadow: 0 8px 18px rgba(52, 56, 59, 0.06);
}

.header-icon-link:hover,
.header-actions .theme-toggle:hover {
  transform: none;
}

.header-calculator {
  background: #f06a12;
  border-color: rgba(240, 106, 18, 0.26);
  box-shadow: 0 10px 24px rgba(234, 94, 7, 0.18);
  color: var(--white);
}

.header-calculator svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-calculator:hover {
  color: var(--white);
  background: var(--orange);
  border-color: rgba(234, 94, 7, 0.34);
  box-shadow: 0 14px 28px rgba(234, 94, 7, 0.24);
  transform: none;
}

.header-calculator .calculator-screen {
  fill: rgba(255, 255, 255, 0.16);
}

.header-calculator .calculator-key {
  fill: currentColor;
  stroke: none;
}

.header-calculator .calculator-plus {
  stroke-width: 1.45;
}

.header-calculator.is-active {
  background: var(--orange);
  border-color: rgba(234, 94, 7, 0.38);
  color: var(--white);
  box-shadow:
    0 0 0 6px rgba(234, 94, 7, 0.18),
    0 18px 34px rgba(234, 94, 7, 0.30);
}

.header-actions .header-whatsapp {
  padding: 0;
  gap: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: transparent;
  border-color: transparent;
  color: var(--white);
  box-shadow: none;
}

.site-header.is-scrolled .header-actions .header-whatsapp {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0 !important;
}

.header-actions .header-whatsapp:hover {
  background: transparent;
  color: var(--white);
  box-shadow: none;
  transform: none;
}

.header-actions .whatsapp-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #25d366;
  border: 1px solid rgba(13, 157, 63, 0.32);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.24);
}

.header-actions .header-whatsapp:hover .whatsapp-icon {
  background: #20c765;
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.30);
}

.header-actions .header-whatsapp.is-active .whatsapp-icon {
  background: #20c765;
  border-color: rgba(13, 157, 63, 0.38);
  color: var(--white);
  box-shadow:
    0 0 0 6px rgba(37, 211, 102, 0.18),
    0 18px 34px rgba(37, 211, 102, 0.32);
}

.header-actions .whatsapp-icon svg {
  width: 29px;
  height: 29px;
}

html[data-theme="dark"] .header-icon-link {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f0f2f1;
}

html[data-theme="dark"] .header-actions .theme-toggle {
  background: transparent;
  border: 0;
  box-shadow: none;
}

html[data-theme="dark"] .header-calculator {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--amber);
}

html[data-theme="dark"] .header-calculator:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(251, 156, 9, 0.34);
  color: #ffc35c;
}

html[data-theme="dark"] .header-calculator.is-active {
  background: #f06a12;
  border-color: rgba(240, 106, 18, 0.26);
  box-shadow: 0 10px 24px rgba(234, 94, 7, 0.18);
  color: var(--graphite-light);
}

html[data-theme="dark"] .header-actions .header-whatsapp {
  background: transparent;
  border-color: transparent;
  color: var(--white);
}

html[data-theme="dark"] .header-actions .whatsapp-icon {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: #25d366;
}

html[data-theme="dark"] .header-actions .header-whatsapp:hover .whatsapp-icon {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(37, 211, 102, 0.34);
  color: #31e477;
}

html[data-theme="dark"] .header-actions .header-whatsapp.is-active .whatsapp-icon {
  background: #25d366;
  border-color: rgba(13, 157, 63, 0.32);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.24);
  color: var(--white);
}

@media (min-width: 1041px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .site-header .header-inner,
  .site-header:not(.is-scrolled) .header-inner,
  .site-header.is-scrolled .header-inner {
    min-height: 92px;
    padding-block: 0;
  }

  .site-header .header-brand-mark,
  .site-header:not(.is-scrolled) .header-brand-mark,
  .site-header.is-scrolled .header-brand-mark {
    width: clamp(158px, 14vw, 204px);
  }

  .main-nav {
    justify-self: center;
  }

  .header-actions {
    justify-self: end;
    margin-left: 0;
  }

  .site-header.is-scrolled .header-actions .theme-toggle,
  .site-header.is-scrolled .header-calculator,
  .site-header.is-scrolled .header-whatsapp {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .site-header.is-scrolled .header-actions .theme-toggle-icon {
    width: 44px;
    height: 44px;
  }

  .site-header.is-scrolled .header-calculator svg {
    width: 29px;
    height: 29px;
  }

  .site-header.is-scrolled .header-actions .whatsapp-icon {
    width: 44px;
    height: 44px;
  }

  .site-header.is-scrolled .header-actions .whatsapp-icon svg {
    width: 29px;
    height: 29px;
  }
}

@media (max-width: 1040px) {
  .header-inner {
    column-gap: 24px;
  }

  .site-header .header-inner,
  .site-header:not(.is-scrolled) .header-inner,
  .site-header.is-scrolled .header-inner {
    min-height: 116px;
    padding-block: 0;
  }

  .site-header .header-brand-mark,
  .site-header:not(.is-scrolled) .header-brand-mark,
  .site-header.is-scrolled .header-brand-mark {
    width: clamp(142px, 36vw, 174px);
  }

  .header-actions {
    gap: 24px;
    margin-left: auto;
  }

  .header-calculator {
    order: 1;
  }

  .header-actions .theme-toggle {
    order: 2;
  }

  .header-actions .header-whatsapp {
    display: none;
  }

  .mobile-toggle {
    order: 3;
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .site-header.is-scrolled .header-actions .theme-toggle,
  .site-header.is-scrolled .header-calculator,
  .site-header.is-scrolled .mobile-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }
}

@media (max-width: 520px) {
  .header-inner {
    column-gap: 20px;
  }

  .site-header .header-inner,
  .site-header:not(.is-scrolled) .header-inner,
  .site-header.is-scrolled .header-inner {
    min-height: 116px;
    padding-block: 0;
  }

  .site-header .header-brand-mark,
  .site-header:not(.is-scrolled) .header-brand-mark,
  .site-header.is-scrolled .header-brand-mark {
    width: clamp(132px, 43vw, 158px);
  }

  .header-actions {
    gap: 20px;
  }

  .header-actions .theme-toggle,
  .header-icon-link {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .header-actions .theme-toggle-icon {
    width: 46px;
    height: 46px;
  }

  .site-header.is-scrolled .header-actions .header-whatsapp {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .header-actions .whatsapp-icon {
    width: 46px;
    height: 46px;
  }

  .header-calculator svg {
    width: 29px;
    height: 29px;
  }

  .site-header.is-scrolled .header-inner {
    min-height: 116px;
    padding-block: 0;
  }

  .site-header.is-scrolled .header-brand-mark {
    width: clamp(132px, 43vw, 158px);
  }

  .site-header.is-scrolled .header-actions .theme-toggle,
  .site-header.is-scrolled .header-calculator,
  .site-header.is-scrolled .mobile-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }
}

.site-header,
.header-inner,
.header-brand-mark,
.mobile-toggle,
.header-icon-link,
.header-actions .theme-toggle,
.header-actions .theme-toggle-icon,
.header-actions .whatsapp-icon {
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.2s ease;
}

@media (max-width: 1040px) {
  html[data-theme="dark"] .header-calculator.is-active {
    color: var(--white);
  }

  .site-header .header-actions .theme-toggle,
  .site-header.is-scrolled .header-actions .theme-toggle,
  .site-header .header-calculator,
  .site-header.is-scrolled .header-calculator,
  .site-header .mobile-toggle,
  .site-header.is-scrolled .mobile-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .site-header .header-actions .theme-toggle-icon,
  .site-header.is-scrolled .header-actions .theme-toggle-icon {
    width: 48px;
    height: 48px;
  }

  .site-header .header-calculator svg,
  .site-header.is-scrolled .header-calculator svg {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 520px) {
  .site-header .header-actions .theme-toggle,
  .site-header.is-scrolled .header-actions .theme-toggle,
  .site-header .header-calculator,
  .site-header.is-scrolled .header-calculator {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }

  .site-header .mobile-toggle,
  .site-header.is-scrolled .mobile-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .site-header .header-actions .theme-toggle-icon,
  .site-header.is-scrolled .header-actions .theme-toggle-icon {
    width: 46px;
    height: 46px;
  }

  .site-header .header-calculator svg,
  .site-header.is-scrolled .header-calculator svg {
    width: 29px;
    height: 29px;
  }
}
