:root {
  --csx-navy: #01042D;
  --csx-navy-2: #061C40;
  --csx-cyan: #00CEEA;
  --csx-orange: #FF9E00;
  --csx-orange-2: #FF6B00;
  --csx-blue: #2467F2;
  --csx-white: #FFFFFF;
  --csx-text: #101828;
  --csx-muted: #667085;
  --csx-border: #E4E7EC;
  --csx-soft: #F8FAFC;
}

html,
body {
  overflow-x: hidden !important;
}

.csx-header,
.csx-header *,
.csx-header *::before,
.csx-header *::after {
  box-sizing: border-box;
}

.csx-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(1, 4, 45, .98), rgba(1, 4, 45, .92));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: .24s ease;
  font-family: 'Inter', 'Poppins', Arial, sans-serif;
}

body.admin-bar .csx-header {
  top: 32px;
}

.csx-header.csx-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(1, 4, 45, .98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

.csx-nav {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 106px;
  display: grid;
  grid-template-columns: auto minmax(520px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 14px 16px 24px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 7% 50%, rgba(0, 206, 234, .13), transparent 25%),
    linear-gradient(135deg, rgba(6, 28, 64, .96), rgba(1, 4, 45, .98));
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 70px rgba(0, 0, 0, .34);
}

.csx-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  min-width: 158px;
}

.csx-header .csx-brand img {
  width: 158px !important;
  height: auto !important;
  max-width: 158px !important;
  max-height: 58px !important;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .28));
}

.csx-center {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.csx-menu-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex-wrap: nowrap;
}

.csx-menu-mini a,
.csx-menu-mini .csx-dropdown-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .82) !important;
  font-size: 11.5px;
  line-height: 1;
  font-weight: 850;
  text-decoration: none !important;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: .18s ease;
  white-space: nowrap;
}

.csx-menu-mini a:hover,
.csx-menu-mini .csx-dropdown:hover .csx-dropdown-toggle {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, .12);
}

.csx-search {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  height: 54px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 8% 50%, rgba(0, 206, 234, .24), transparent 34%), rgba(255, 255, 255, .10);
  border: 1px solid rgba(0, 206, 234, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 14px 36px rgba(0, 0, 0, .22);
  transition: .2s ease;
}

.csx-search:focus-within {
  border-color: rgba(0, 206, 234, .74);
  background: radial-gradient(circle at 8% 50%, rgba(0, 206, 234, .34), transparent 34%), rgba(255, 255, 255, .13);
  box-shadow: 0 0 0 4px rgba(0, 206, 234, .10), 0 18px 44px rgba(0, 0, 0, .26);
}

.csx-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.csx-search-icon svg {
  width: 21px;
  height: 21px;
  stroke: #FFFFFF;
  stroke-width: 2.4;
  fill: none;
}

.csx-search input[type="search"] {
  width: 100%;
  height: 52px;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: #FFFFFF !important;
  font-size: 13.5px;
  font-weight: 800;
  padding: 0 10px 0 0;
  box-shadow: none !important;
}

.csx-search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, .62);
}

.csx-search > button {
  height: 44px;
  margin-right: 5px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 950;
  background: linear-gradient(135deg, #FF9E00, #FF6B00);
  box-shadow: 0 10px 24px rgba(255, 107, 0, .30);
  transition: .18s ease;
}

.csx-search > button:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.csx-search-preview {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  max-height: min(620px, calc(100vh - 190px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid rgba(1, 4, 45, .08);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .30);
  padding: 10px;
  display: none;
  z-index: 80;
}

.csx-search-preview.csx-show {
  display: block;
  animation: csxPreviewIn .16s ease both;
}

@keyframes csxPreviewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.csx-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px 9px;
}

.csx-preview-title {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.csx-preview-hint {
  color: #98A2B3;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.csx-preview-list {
  display: grid;
  gap: 6px;
}

.csx-preview-item {
  width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  text-decoration: none !important;
  background: #FFFFFF;
  border: 1px solid transparent;
  transition: .16s ease;
  outline: none;
}

.csx-preview-item:hover,
.csx-preview-item.csx-active,
.csx-preview-item:focus-visible {
  background: #F2FBFD;
  border-color: rgba(0, 206, 234, .25);
  box-shadow: 0 10px 26px rgba(1, 4, 45, .06);
}

.csx-preview-thumb {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(135deg, #EEF7FB, #E7ECF9);
  border: 1px solid rgba(1, 4, 45, .06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.csx-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.csx-preview-thumb-placeholder {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 206, 234, .32), rgba(36, 103, 242, .28));
  position: relative;
}

.csx-preview-thumb-placeholder::before,
.csx-preview-thumb-placeholder::after {
  content: "";
  position: absolute;
  background: rgba(1, 4, 45, .44);
  border-radius: 999px;
}

.csx-preview-thumb-placeholder::before {
  width: 12px;
  height: 3px;
  left: 7px;
  top: 7px;
}

.csx-preview-thumb-placeholder::after {
  width: 12px;
  height: 3px;
  left: 7px;
  top: 15px;
}

.csx-preview-content {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.csx-preview-name {
  color: #01042D;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csx-preview-excerpt {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.csx-preview-type {
  align-self: start;
  min-width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: #01042D;
  background: rgba(0, 206, 234, .14);
  font-size: 9.5px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.csx-preview-item[data-type="catalogo"] .csx-preview-type { background: rgba(36, 103, 242, .12); color: #1849A9; }
.csx-preview-item[data-type="video"] .csx-preview-type { background: rgba(255, 107, 0, .12); color: #B54708; }
.csx-preview-item[data-type="blog"] .csx-preview-type { background: rgba(16, 185, 129, .12); color: #067647; }
.csx-preview-item[data-type="evento"] .csx-preview-type { background: rgba(139, 92, 246, .12); color: #6941C6; }
.csx-preview-item[data-type="vaga"] .csx-preview-type { background: rgba(245, 158, 11, .14); color: #B54708; }
.csx-preview-item[data-type="cotacao"] .csx-preview-type { background: rgba(236, 72, 153, .12); color: #C11574; }

.csx-preview-empty,
.csx-preview-status {
  padding: 18px 14px;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
  text-align: center;
}

.csx-preview-status.csx-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  margin: 0 8px -3px 0;
  display: inline-block;
  border: 2px solid #D0D5DD;
  border-top-color: #00AFC6;
  border-radius: 50%;
  animation: csxSpin .7s linear infinite;
}

@keyframes csxSpin {
  to { transform: rotate(360deg); }
}

.csx-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: max-content;
}

.csx-icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(0, 206, 234, .50);
  background: radial-gradient(circle at 30% 20%, rgba(0, 206, 234, .40), transparent 45%), rgba(255, 255, 255, .10);
  color: #FFFFFF !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: .18s ease;
  line-height: 1;
}

.csx-icon-btn:hover {
  transform: translateY(-2px);
  background: radial-gradient(circle at 30% 20%, rgba(0, 206, 234, .58), transparent 45%), rgba(255, 255, 255, .15);
  border-color: rgba(0, 206, 234, .78);
}

.csx-lang-btn {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(0, 206, 234, .48), transparent 48%), linear-gradient(135deg, rgba(0, 206, 234, .16), rgba(36, 103, 242, .14)) !important;
  border: 1px solid rgba(0, 206, 234, .70) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 24px rgba(0, 206, 234, .18) !important;
}

.csx-translate-svg {
  width: 20px;
  height: 20px;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .30));
  transition: .18s ease;
}

.csx-translate-bg { fill: rgba(255, 255, 255, .04); stroke: #FFFFFF; stroke-width: 3.4; }
.csx-translate-line { fill: none; stroke: #FFFFFF; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.csx-translate-accent { fill: #FF9E00; stroke: #FFFFFF; stroke-width: 2.4; }
.csx-lang-btn:hover .csx-translate-svg { transform: scale(1.08); }

.csx-lang {
  position: relative;
}

.csx-lang::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: 100%;
  height: 24px;
  background: transparent;
}

.csx-lang-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 224px;
  padding: 10px;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .30);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: .18s ease;
  z-index: 60;
}

.csx-lang:hover .csx-lang-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.csx-lang-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border-radius: 14px;
  padding: 10px 11px;
  color: #01042D !important;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none !important;
}

.csx-lang-menu a:hover { background: #EEF7FB; }

.csx-login-btn,
.csx-panel-btn,
.csx-register-btn {
  min-height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
  text-decoration: none !important;
  transition: .18s ease;
  white-space: nowrap;
}

.csx-login-btn {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
}

.csx-panel-btn,
.csx-register-btn {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #00CEEA, #2467F2);
  box-shadow: 0 12px 28px rgba(0, 206, 234, .24);
}

.csx-login-btn:hover,
.csx-panel-btn:hover,
.csx-register-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

body.logged-in .csx-login-btn.csx-desktop-action,
body.logged-in .csx-login-btn.csx-mobile-action,
body.logged-in .csx-register-btn.csx-desktop-action,
body.logged-in .csx-register-btn.csx-mobile-action {
  display: none !important;
}

body:not(.logged-in) .csx-panel-btn.csx-desktop-action,
body:not(.logged-in) .csx-panel-btn.csx-mobile-action {
  display: none !important;
}

.csx-mobile-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .10);
  color: #FFFFFF;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}

.csx-mobile-panel {
  display: none;
  position: fixed;
  left: 14px;
  right: 14px;
  top: 128px;
  max-height: calc(100dvh - 142px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 28px;
  background: radial-gradient(circle at 15% 10%, rgba(0, 206, 234, .16), transparent 34%), rgba(1, 4, 45, .98);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
  padding: 16px 16px 24px;
  z-index: 10000;
}

body.admin-bar .csx-mobile-panel {
  top: 160px;
  max-height: calc(100dvh - 174px);
}

.csx-mobile-panel.csx-open { display: block; }

.csx-mobile-grid {
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding-bottom: 10px;
}

.csx-mobile-search {
  position: relative;
  display: block;
  margin-bottom: 12px;
  min-width: 0;
}

.csx-mobile-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.csx-mobile-search input {
  min-width: 0;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .09);
  color: #FFFFFF;
  padding: 0 14px;
  outline: none;
  font-weight: 800;
}

.csx-mobile-search input::placeholder { color: rgba(255, 255, 255, .58); }

.csx-mobile-search button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #FF9E00, #FF6B00);
  color: #FFFFFF;
  padding: 0 16px;
  font-weight: 950;
}

.csx-mobile-search-preview {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  margin-top: 8px;
  max-height: 420px;
  border-radius: 18px;
}

.csx-mobile-grid > a {
  min-width: 0;
  min-height: 46px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, .075);
  text-decoration: none !important;
  font-weight: 850;
  white-space: normal;
  word-break: normal;
}

.csx-mobile-label {
  color: var(--csx-cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 14px 0 6px;
}

.csx-mobile-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-bottom: 10px;
}

.csx-mobile-actions a {
  width: 100%;
  justify-content: center;
  text-align: center;
}

@media (max-width: 1320px) {
  .csx-center { display: none; }
  .csx-nav { grid-template-columns: auto 1fr; min-height: 82px; }
  .csx-mobile-toggle { display: inline-flex; }
}

@media (max-width: 782px) {
  body.admin-bar .csx-header { top: 46px; }
  body.admin-bar .csx-mobile-panel { top: 154px; max-height: calc(100dvh - 166px); }
}

@media (max-width: 767px) {
  .csx-header { padding: 12px; }
  .csx-nav { min-height: 78px; padding: 10px 10px 10px 14px; }
  .csx-header .csx-brand img { width: 128px !important; height: auto !important; max-width: 128px !important; max-height: 48px !important; }

  .csx-register-btn.csx-desktop-action,
  .csx-login-btn.csx-desktop-action,
  .csx-panel-btn.csx-desktop-action { display: none !important; }

  .csx-icon-btn,
  .csx-mobile-toggle { width: 42px; height: 42px; }
  .csx-lang-btn { width: 42px !important; height: 42px !important; }
  .csx-translate-svg { width: 20px; height: 20px; }

  .csx-mobile-panel {
    left: 12px;
    right: 12px;
    top: 108px;
    max-height: calc(100dvh - 120px);
    border-radius: 24px;
  }

  .csx-preview-item {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 10px;
  }

  .csx-preview-thumb { width: 52px; height: 52px; border-radius: 13px; }
  .csx-preview-type { grid-column: 2; justify-self: start; margin-top: -1px; }
  .csx-preview-excerpt { -webkit-line-clamp: 1; }
  .csx-preview-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .csx-header *,
  .csx-header *::before,
  .csx-header *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
