/* Sound Booster: one continuous surface for navigation and converters. */
.header { z-index: 100; }
.header.is-converter-open {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.header.is-converter-open #header-lang {
  visibility: hidden;
  pointer-events: none;
}
.header .header-inner { isolation: isolate; }
.header.is-converter-open .header-inner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(100% + var(--converter-panel-height, 280px));
  background: var(--bg, #fff);
  border: 1px solid rgba(26, 29, 38, .06);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(26, 29, 38, .17);
  z-index: -1;
  pointer-events: none;
}
.header .convert-mega {
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-height: calc(100dvh - 100px);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 0 0 20px 20px !important;
}
.header .convert-mega-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 22px 28px 28px;
  border: 0;
  border-top: 1px solid rgba(26, 29, 38, .065);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 28px;
  animation: converter-reveal .18s ease-out both;
}
.header .convert-mega-section + .convert-mega-section {
  border-left: 1px solid var(--soft-2, #eef1f7);
  padding-left: 28px;
}
.header .convert-mega-head {
  padding-bottom: 13px !important;
  border-bottom: 1px solid var(--soft-2, #eef1f7);
  margin: 0 0 12px !important;
}
.header .convert-mega-link:focus-visible,
.header .nav-drop-btn:focus-visible {
  outline: 2px solid var(--blue, #01adfe);
  outline-offset: 2px;
}
/* active color is set per button via aria-expanded (see Resources block below) */
.converter-scrim {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(26, 29, 38, .24);
  animation: converter-scrim-in .18s ease-out both;
  touch-action: none;
}
.converter-scrim[hidden] { display: none !important; }
@keyframes converter-reveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes converter-scrim-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 1100px) {
  .header .nav { margin-left: 0; margin-right: 0; gap: 10px; }
  .header .nav > a, .header .nav-drop-btn { font-size: .9rem; }
  .header .header-inner { gap: 12px; }
}
@media (max-width: 1350px) {
  html:not([lang="en"]) .header .header-inner { height: auto; min-height: 76px; flex-wrap: wrap !important; padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  html:not([lang="en"]) .header .nav { order: 3; flex-basis: 100%; min-width: 0; justify-content: flex-start; gap: 18px; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 900px) {
  .header .header-inner { height: auto; min-height: 76px; flex-wrap: wrap !important; padding-top: 12px; padding-bottom: 12px; gap: 10px; }
  .header .nav { order: 3; flex-basis: 100%; min-width: 0; justify-content: flex-start; gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .header .nav-item-dropdown { position: static !important; }
  .header .convert-mega-panel { grid-template-columns: 1fr 1fr; padding: 20px; gap: 20px; }
  .header .convert-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 2px 12px; }
  .header .convert-mega-section + .convert-mega-section { padding-left: 20px; }
  .header .convert-mega-link { font-size: .9rem !important; white-space: normal !important; }
  .header .convert-mega { max-height: calc(100dvh - 140px); }
}
@media (max-width: 560px) {
  .header.is-converter-open .header-inner::before { border-radius: 0 0 18px 18px; }
  .header .convert-mega-panel { grid-template-columns: 1fr; padding: 18px 16px 24px; gap: 24px; }
  .header .convert-mega-section + .convert-mega-section { border-left: 0; padding-left: 0; }
  .header .nav { gap: 15px; }
  .header .nav > a, .header .nav-drop-btn { font-size: .85rem; }
  .header .header-actions { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .header .convert-mega-panel, .converter-scrim { animation: none; }
}

/* Resources dropdown — compact list like Converter (no large cards) */
.header .resources-mega-panel {
  display: block !important;
  padding: 18px 28px 22px;
  max-width: var(--content, 1120px);
  margin: 0 auto;
}
.header .resources-mega-section {
  max-width: 520px;
}
.header .resources-mega-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2px !important;
}
.header .resources-mega-grid .convert-mega-link {
  display: block !important;
  padding: 9px 8px !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  white-space: normal !important;
}
@media (max-width: 560px) {
  .header .resources-mega-panel { padding: 16px 16px 20px; }
}

/* Resources dropdown: an icon in front of each link (blue line icons; masks are keyed by href so translations cannot remove them) */
.header .resources-mega-grid .convert-mega-link{display:flex !important;align-items:center;gap:14px}
.header .resources-mega-grid .convert-mega-link::before{content:"";flex:none;width:22px;height:22px;background:var(--blue,#01adfe);-webkit-mask:var(--res-ico) center/contain no-repeat;mask:var(--res-ico) center/contain no-repeat}
.header .resources-mega-grid a[href="/use-cases/"]{--res-ico:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Crect%20x=%223%22%20y=%223.5%22%20width=%2218%22%20height=%2213%22%20rx=%222.2%22/%3E%3Cpath%20d=%22M8%2021h8M12%2016.5V21%22/%3E%3Cpath%20d=%22M10.2%207.2v5.6l4.6-2.8z%22/%3E%3C/svg%3E")}
.header .resources-mega-grid a[href="/learn/"]{--res-ico:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M2%204h6a4%204%200%200%201%204%204v12a3%203%200%200%200-3-3H2z%22/%3E%3Cpath%20d=%22M22%204h-6a4%204%200%200%200-4%204v12a3%203%200%200%201%203-3h7z%22/%3E%3C/svg%3E")}
.header .resources-mega-grid a[href="/guides/"]{--res-ico:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Crect%20x=%223%22%20y=%223%22%20width=%228%22%20height=%228%22%20rx=%222%22/%3E%3Cpath%20d=%22M7%2011v4a2%202%200%200%200%202%202h4%22/%3E%3Crect%20x=%2213%22%20y=%2213%22%20width=%228%22%20height=%228%22%20rx=%222%22/%3E%3C/svg%3E")}
.header .resources-mega-grid a[href="/help/"]{--res-ico:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M19.439%207.85c-.049.322.059.648.289.878l1.568%201.568c.47.47.706%201.087.706%201.704s-.235%201.233-.706%201.704l-1.611%201.611a.98.98%200%200%201-.837.276c-.47-.07-.802-.48-.968-.925a2.501%202.501%200%201%200-3.214%203.214c.446.166.855.497.925.968a.979.979%200%200%201-.276.837l-1.61%201.61a2.404%202.404%200%200%201-1.705.707%202.402%202.402%200%200%201-1.704-.706l-1.568-1.568a1.026%201.026%200%200%200-.877-.29c-.493.074-.84.504-1.02.968a2.5%202.5%200%201%201-3.237-3.237c.464-.18.894-.527.967-1.02a1.026%201.026%200%200%200-.289-.877l-1.568-1.568A2.402%202.402%200%200%201%201.998%2012c0-.617.236-1.234.706-1.704L4.23%208.77c.24-.24.581-.353.917-.303.515.077.877.528%201.073%201.01a2.5%202.5%200%201%200%203.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402%202.402%200%200%201%2012%201.998c.617%200%201.234.236%201.704.706l1.568%201.568c.23.23.556.338.877.29.493-.074.84-.504%201.02-.968a2.5%202.5%200%201%201%203.237%203.237c-.464.18-.894.527-.967%201.02Z%22/%3E%3C/svg%3E")}
.header .resources-mega-grid a[href="/blog/"]{--res-ico:url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20viewBox=%220%200%2024%2024%22%20fill=%22none%22%20stroke=%22%23000%22%20stroke-width=%221.8%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22%3E%3Cpath%20d=%22M12%2020h9%22/%3E%3Cpath%20d=%22M16.376%203.622a1%201%200%200%201%203.002%203.002L7.368%2018.635a2%202%200%200%201-.855.506l-2.872.838a.5.5%200%200%201-.62-.62l.838-2.872a2%202%200%200%201%20.506-.854z%22/%3E%3Cpath%20d=%22m15%205%203%203%22/%3E%3C/svg%3E")}
