/* Hao Roofing: five-language selector and insured-contractor trust UI. */
.lang-btn { display: none !important; }

.hao-language-switcher {
  --hao-green: #163526;
  --hao-orange: #d97b28;
  position: relative;
  z-index: 2147482000;
  flex: 0 0 auto;
  order: 3;
  margin-left: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.2;
}

.hao-language-trigger {
  min-width: 132px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 0 13px;
  border: 2px solid var(--hao-orange);
  border-radius: 999px;
  background: #fff;
  color: var(--hao-green);
  box-shadow: 0 7px 20px rgba(22, 53, 38, .17);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.hao-language-trigger:hover,
.hao-language-trigger:focus-visible,
.hao-language-switcher.is-open .hao-language-trigger {
  border-color: #f2a45e;
  box-shadow: 0 10px 28px rgba(22, 53, 38, .23);
  outline: none;
}

.hao-language-trigger:active { transform: translateY(1px); }

.hao-language-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hao-language-flag {
  width: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  font-size: 22px;
  line-height: 1;
}

.hao-language-chevron {
  width: 9px;
  height: 9px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}

.hao-language-switcher.is-open .hao-language-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.hao-language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 224px;
  padding: 10px;
  border: 1px solid rgba(22, 53, 38, .15);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(22, 53, 38, .25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.hao-language-switcher.is-open .hao-language-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hao-language-option {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #33413a;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}

.hao-language-option:hover,
.hao-language-option:focus-visible {
  background: #f4f7f4;
  color: var(--hao-green);
  outline: none;
}

.hao-language-option[aria-current="true"] {
  background: var(--hao-green);
  color: #fff;
}

.hao-language-check {
  margin-left: auto;
  color: #f7c387;
  font-size: 20px;
  font-weight: 900;
}

.header-inner > .brand { order: 1; }
.header-inner > .site-nav { order: 2; margin-left: auto; flex-wrap: nowrap; }
.header-inner > .menu-toggle { order: 4; }

header > .container > .logo { order: 1; }
header > .container > .hao-blog-nav { order: 2; margin-left: auto; }
header > .container > .hao-language-switcher { order: 3; margin-left: 10px; }
header > .container > .menu-toggle { order: 4; }

.hao-translate-status {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(22, 53, 38, .95);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
  font: 650 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.hao-translate-status.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hao-translate-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #f7c387;
  border-radius: 50%;
  animation: hao-spin .7s linear infinite;
}

@keyframes hao-spin { to { transform: rotate(360deg); } }

#hao-google-translate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.goog-te-gadget,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
body > .skiptranslate,
body > [class*="VIpgJd-ZVi9od-ORHb"],
iframe[class*="VIpgJd-ZVi9od-ORHb"],
iframe.skiptranslate {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
}

html,
body,
body.translated-ltr,
body.translated-rtl { top: 0 !important; }

html[lang="en"] .hero h1,
html[lang="es"] .hero h1,
html[lang="ko"] .hero h1,
html[lang="ru"] .hero h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 4.3vw, 3.35rem);
}

/* Trust and conversion sections shared across the site. */
.hao-trust-ribbon,
.hao-section,
.hao-cta-section {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto 48px;
}

.hao-trust-ribbon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(31, 77, 54, .15);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(247,237,222,.96));
  box-shadow: var(--shadow-soft);
}

.hao-trust-ribbon-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 24px;
}

.hao-trust-ribbon h2,
.hao-trust-ribbon p { margin: 0; }
.hao-trust-ribbon h2 { color: var(--brand-deep); font-size: 1.2rem; }
.hao-trust-ribbon p { color: var(--muted); font-size: .94rem; }
.hao-trust-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.hao-button-dark,
.hao-button-light {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.hao-button-dark { background: var(--brand); color: #fff; }
.hao-button-dark:hover { background: var(--brand-deep); color: #fff; }
.hao-button-light { background: #fff; color: var(--brand-deep); border: 1px solid rgba(31,77,54,.2); }
.hao-button-light:hover { background: #f7f2e9; color: var(--brand-deep); }

.hao-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hao-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(247, 195, 135, .42);
  border-radius: 999px;
  color: #ffe0b8;
  background: rgba(255,255,255,.07);
  font-size: .9rem;
  font-weight: 700;
}

.hao-section { padding-top: 16px; }
.hao-section-heading { max-width: 760px; margin: 0 auto 24px; text-align: center; }
.hao-section-heading h2 { margin: 0 0 10px; color: var(--brand-deep); font-size: clamp(1.7rem, 4vw, 2.45rem); line-height: 1.22; }
.hao-section-heading p { margin: 0; color: var(--muted); }

.hao-insurance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 30px;
  align-items: center;
}

.hao-insurance-copy,
.hao-certificate-card,
.hao-benefit-card,
.hao-process-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(31,77,54,.12);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.hao-insurance-copy { padding: 30px; }
.hao-insurance-copy h2 { margin: 0 0 12px; color: var(--brand-deep); font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.28; }
.hao-insurance-copy > p { margin: 0 0 18px; color: var(--muted); }

.hao-trust-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 12px; }
.hao-trust-list li { display: flex; align-items: flex-start; gap: 11px; }
.hao-check {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  margin-top: 2px;
}

.hao-certificate-card { display: block; padding: 13px; color: inherit; }
.hao-certificate-card:hover { color: inherit; transform: translateY(-2px); }
.hao-certificate-card img { width: 100%; max-height: 560px; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid rgba(31,77,54,.12); }
.hao-certificate-caption { display: flex; justify-content: space-between; gap: 14px; padding: 13px 6px 3px; color: var(--brand-deep); font-size: .9rem; font-weight: 800; }

.hao-benefit-grid,
.hao-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hao-benefit-card,
.hao-process-card { padding: 23px; }
.hao-benefit-card h3,
.hao-process-card h3 { margin: 0 0 8px; color: var(--brand-deep); font-size: 1.08rem; }
.hao-benefit-card p,
.hao-process-card p { margin: 0; color: var(--muted); }
.hao-benefit-icon { font-size: 28px; margin-bottom: 10px; }

.hao-disclaimer {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(217,123,40,.28);
  border-radius: 16px;
  background: rgba(217,123,40,.08);
  color: #5d472f;
  font-size: .88rem;
}

.hao-parent-card {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: rgba(255,255,255,.86);
}
.hao-parent-card h2 { color: #f7c387; margin: 0 0 10px; }
.hao-parent-card p { margin: 0 0 14px; }
.hao-parent-card a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.hao-cta-section {
  padding: 34px;
  border-radius: 28px;
  background: linear-gradient(135deg, #d97b28, #f2a45e);
  color: #18231a;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.hao-cta-section h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
.hao-cta-section p { margin: 0 0 20px; }

@media (max-width: 1120px) {
  .header-inner { gap: 12px; }
  .site-nav { gap: 3px; }
  .site-nav a { padding: 9px 10px; font-size: .92rem; }
  .hao-language-trigger { min-width: 118px; }
}

@media (max-width: 900px) {
  .hao-insurance-grid,
  .hao-benefit-grid,
  .hao-process-grid { grid-template-columns: 1fr; }
  .hao-trust-ribbon { grid-template-columns: auto 1fr; }
  .hao-trust-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 1100px) {
  .hao-language-switcher { margin-left: auto; margin-right: 4px; }
  .header-inner > .site-nav { margin-left: 0; }
}

@media (max-width: 900px) {
  header > .container > .hao-blog-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(22,53,38,.2);
  }
  header > .container > .hao-blog-nav.open { display: flex; }
  header > .container > .menu-toggle { display: block; }
}

@media (max-width: 640px) {
  .hao-trust-ribbon,
  .hao-section,
  .hao-cta-section { width: min(calc(100% - 20px), var(--max)); }
  .hao-language-trigger { min-width: 72px; width: 72px; height: 42px; padding: 0 10px; }
  .hao-language-trigger .hao-language-name { display: none; }
  .hao-language-menu { width: min(224px, calc(100vw - 24px)); right: -48px; }
  .brand-copy { display: none; }
  .brand-mark { width: 46px; height: 46px; }
  .hao-insurance-copy { padding: 22px; }
  .hao-trust-ribbon { grid-template-columns: 1fr; text-align: center; }
  .hao-trust-ribbon-icon { margin: 0 auto; }
  .hao-trust-actions { justify-content: center; }
  .hao-certificate-card img { max-height: 430px; }
  .hao-cta-section { padding: 27px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .hao-language-trigger,
  .hao-language-chevron,
  .hao-language-menu,
  .hao-translate-status { transition: none; }
}
