/*
 * Nexo Base - CSS principal.
 *
 * Regras:
 * - Tipografia local, sem chamadas externas.
 * - Layout full width por padrão.
 * - Estilos visuais base agora pertencem ao tema pai.
 * - Tema filho deve ficar reservado para personalizações específicas.
 */

/* =========================
   TIPOGRAFIA LOCAL
========================= */

@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-italic-variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

/* =========================
   BASE E RESET
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(
    --nexo-font-family-body,
    "Nunito Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif
  );
  font-optical-sizing: auto;
  font-size: var(--nexo-font-size-body, 16px);
  font-weight: var(--nexo-font-weight-body, 400);
  line-height: var(--nexo-line-height-body, 1.6);
  color: #111827;
  background: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================
   BASE TIPOGRÁFICA GLOBAL
========================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(
    --nexo-font-family-headings,
    "Nunito Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif
  );
  font-weight: var(--nexo-font-weight-headings, 400);
  font-style: normal;
}

h1 {
  font-size: var(--nexo-font-size-h1, 40px);
}

h2 {
  font-size: var(--nexo-font-size-h2, 32px);
}

h3 {
  font-size: var(--nexo-font-size-h3, 26px);
}

/* =========================
   ESTRUTURA GLOBAL
========================= */

.site-header,
.site-footer,
.site-layout,
.site-main,
.sidebar {
  width: 100%;
  margin: 0;
  padding: 0;
}

.site-layout {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding-left: 24px;
  padding-right: 24px;
}

.site-main {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.site-layout--full {
  padding-left: 24px;
  padding-right: 24px;
}

.site-main--full {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.main-navigation ul,
.footer-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation li,
.footer-navigation li {
  display: inline-block;
  margin-right: 0.75rem;
}

.main-navigation li:last-child,
.footer-navigation li:last-child {
  margin-right: 0;
}

/* ==========================================================================
   Global icon utilities
   ========================================================================== */

.nexo-has-icon-whatsapp::after {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: var(--nexo-whatsapp-icon-size, 20px);
  height: var(--nexo-whatsapp-icon-size, 20px);
  margin-left: var(--nexo-whatsapp-icon-gap, 12px);
  background-color: currentColor;
  -webkit-mask-image: url("../images/icons/whatsapp.svg");
  mask-image: url("../images/icons/whatsapp.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* =========================
   HEADER
========================= */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  padding: var(--nexo-header-top-offset, 57px) 0 0;
  background: transparent;
  border-bottom: 0;
  opacity: 1;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    padding 0.25s ease;
}

.site-header.is-sticky-enabled {
  position: fixed;
  top: 0;
  left: 0;
}

body.nexo-page-kit-header-overlay .site-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: transparent;
}

body.nexo-page-kit-header-overlay .site-header.is-sticky-enabled,
body.nexo-page-kit-header-overlay .site-header.is-sticky-enabled.is-scrolled {
  position: fixed;
}

body.admin-bar.nexo-page-kit-header-overlay .site-header,
body.admin-bar.nexo-page-kit-header-overlay .site-header.is-sticky-enabled,
body.admin-bar.nexo-page-kit-header-overlay
  .site-header.is-sticky-enabled.is-scrolled {
  top: 0;
}

@media (max-width: 782px) {
  body.admin-bar.nexo-page-kit-header-overlay .site-header,
  body.admin-bar.nexo-page-kit-header-overlay .site-header.is-sticky-enabled,
  body.admin-bar.nexo-page-kit-header-overlay
    .site-header.is-sticky-enabled.is-scrolled {
    top: 0;
  }
}

.site-header__inner {
  width: min(var(--nexo-header-container-width, 1362px), calc(100% - 48px));
  height: var(--nexo-header-height, 89px);
  margin: 0 auto;
  padding: 0 var(--nexo-header-inner-padding-x, 34px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--nexo-header-columns-gap, 28px);
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: 5px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  opacity: 1;
  transition:
    height 0.25s ease,
    padding 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.site-header--no-search .site-header__inner {
  grid-template-columns: auto minmax(0, 1fr);
}

.site-header--no-search .site-header__nav {
  justify-content: center;
  transform: translateX(var(--nexo-header-no-search-menu-offset-x, 70px));
}

.site-header--no-search .site-header__menu {
  justify-content: center;
}

.site-header__brand {
  display: flex;
  align-items: center;
}

.site-header__logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo {
  display: block;
  width: var(--nexo-header-logo-width, 150px);
  height: auto;
  transition: width 0.25s ease;
}

.site-header.is-sticky-enabled.is-scrolled {
  position: fixed;
  top: 0;
  left: 0;
  padding-top: var(--nexo-header-top-offset-scrolled, 24px);
}

.site-header.is-scrolled {
  background: transparent;
  box-shadow: none;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header.is-scrolled .site-header__inner {
  height: var(--nexo-header-height-scrolled, 64px);
  background: rgba(255, 255, 255, var(--nexo-header-scrolled-opacity, 0.92));
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.is-scrolled .site-header__logo {
  width: var(--nexo-header-logo-width-scrolled, 135px);
}

.site-header__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.site-header__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--nexo-header-menu-gap, 26px);
  margin: 0;
  padding: 0;
  list-style: none !important;
}

.site-header__menu,
.site-header__menu ul,
.site-header__menu li {
  margin: 0;
  padding: 0;
  list-style: none !important;
}

.site-header__menu li::before,
.site-header__menu li::marker,
.site-header__menu ul li::before,
.site-header__menu ul li::marker {
  content: none !important;
  display: none !important;
}

.site-header__menu > li {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.site-header__menu > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: #111827;
  text-decoration: none;
  font-family: inherit;
  font-size: var(
    --nexo-header-menu-font-size,
    var(--nexo-font-size-menu, 14px)
  );
  font-weight: 400;
  line-height: 1.2;
  border-radius: 5px;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.site-header__menu > li > a:hover,
.site-header__menu > li > a:focus {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
}

.site-header__menu > li > ul {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 260px;
  margin: 0;
  padding: 8px 0;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: 5px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
  z-index: 3000;
}

.site-header__menu > li > ul::before {
  content: "";
  position: absolute;
  top: -15px;
  right: 0;
  left: 0;
  height: 15px;
  background: transparent;
}

.site-header__menu > li:hover > ul,
.site-header__menu > li:focus-within > ul {
  display: block;
  animation: nexoHeaderDropdown 0.18s ease;
}

.site-header__menu > li > ul > li {
  display: block !important;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none !important;
}

.site-header__menu > li > ul > li > a {
  display: block;
  width: 100%;
  padding: 11px 16px;
  color: #111827;
  text-decoration: none;
  font-size: var(
    --nexo-header-menu-font-size,
    var(--nexo-font-size-menu, 14px)
  );
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  background: transparent;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.site-header__menu > li > ul > li > a:hover,
.site-header__menu > li > ul > li > a:focus {
  background: #f8fafc;
  color: #2563eb;
}

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

.site-header__search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-header__search form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.site-header__search label {
  display: none;
}

.site-header__search input[type="search"] {
  width: var(--nexo-header-search-width, 220px);
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-family: inherit;
}

.site-header__search input[type="search"]::placeholder {
  color: #6b7280;
}

.site-header__search input[type="submit"] {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: #111827;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.site-header__search input[type="submit"]:hover,
.site-header__search input[type="submit"]:focus {
  opacity: 0.9;
}

.site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.site-search-form__input {
  display: block;
  width: var(--nexo-header-search-width, 220px);
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-family: inherit;
  line-height: 1;
  box-sizing: border-box;
}

.site-search-form__input::placeholder {
  color: #6b7280;
}

.site-search-form__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.site-search-form__button:hover,
.site-search-form__button:focus {
  opacity: 0.92;
}

.site-search-form__input:focus,
.site-search-form__button:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* =========================
   HEADER MOBILE ACTIONS
========================= */

.site-header__mobile-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-header__mobile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.site-header__mobile-button:hover,
.site-header__mobile-button:focus {
  background: #f8fafc;
  color: #111827;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

.site-header__mobile-button:focus-visible {
  outline: 2px solid #ff5a00;
  outline-offset: 3px;
}

.site-header__mobile-button:hover {
  transform: translateY(-1px);
}

.site-header__mobile-button--search {
  font-size: 25px;
  line-height: 1;
}

.site-header__mobile-button-lines {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.site-header__mobile-button-lines span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.site-header.is-mobile-menu-open
  .site-header__mobile-button--menu
  .site-header__mobile-button-lines
  span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-mobile-menu-open
  .site-header__mobile-button--menu
  .site-header__mobile-button-lines
  span:nth-child(2) {
  opacity: 0;
}

.site-header.is-mobile-menu-open
  .site-header__mobile-button--menu
  .site-header__mobile-button-lines
  span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   BUSCA / RESULTADOS
========================= */

.search-results-page__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.search-results-page__title {
  margin: 0 0 32px;
  font-size: var(--nexo-font-size-h1, 40px);
  line-height: 1.2;
  color: #111827;
}

.search-result-item {
  padding: 0 0 28px;
  margin: 0 0 28px;
  border-bottom: 1px solid #e5e7eb;
}

.search-result-item__title {
  margin: 0 0 10px;
  font-size: var(--nexo-font-size-h3, 26px);
  line-height: 1.2;
}

.search-result-item__title a {
  color: #0f172a;
  text-decoration: none;
}

.search-result-item__title a:hover,
.search-result-item__title a:focus {
  color: #2563eb;
}

.search-result-item__excerpt {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #374151;
}

.search-result-item__excerpt strong {
  font-weight: 700;
  color: #111827;
}

/* =========================
   SITEORIGIN / EDITOR
========================= */

.site-main .entry-content {
  width: 100%;
}

.site-main .panel-layout,
.site-main .panel-grid,
.site-main .panel-row-style,
.site-main .so-panel {
  max-width: 100%;
}

.site-main .panel-grid {
  margin-left: 0;
  margin-right: 0;
}

.site-main .panel-grid-cell {
  padding-left: 20px;
  padding-right: 20px;
}

.site-main .so-widget-sow-editor,
.site-main .so-widget-sow-text,
.site-main .textwidget,
.site-main .so-widget-sow-image,
.site-main .widget_sow-image,
.site-main .sow-image-container {
  text-align: inherit;
}

.site-main .textwidget[style*="text-align: center"] a,
.site-main .so-widget-sow-editor [style*="text-align: center"] a,
.site-main .panel-grid-cell [style*="text-align: center"] a,
.site-main .entry-content [style*="text-align: center"] a,
.site-main .textwidget[style*="text-align: center"] img,
.site-main .so-widget-sow-editor [style*="text-align: center"] img,
.site-main .panel-grid-cell [style*="text-align: center"] img,
.site-main .entry-content [style*="text-align: center"] img {
  display: inline-block;
  width: auto;
}

.site-main .entry-content img.aligncenter,
.site-main .entry-content p img.aligncenter,
.site-main .entry-content div img.aligncenter,
.site-main .entry-content .wp-caption img,
.site-main .entry-content figure img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.site-main .entry-content .wp-caption.aligncenter,
.site-main .entry-content .wp-caption[style],
.site-main .entry-content figure.aligncenter {
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 100%;
}

.site-main .entry-content .wp-caption-text,
.site-main .entry-content .wp-caption-dd {
  text-align: center;
}

/* =========================
   RESPONSIVO
========================= */

@media (max-width: 1024px) {
  .site-header {
    padding-top: 16px;
  }

  .site-header.is-sticky-enabled.is-scrolled {
    padding-top: 10px;
  }

  .site-header__inner {
    width: min(100% - 28px, 760px);
    height: auto;
    min-height: var(--nexo-header-height, 72px);
    padding: 12px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav"
      "search search";
    align-items: center;
    gap: 0 14px;
    text-align: initial;
    border-radius: 8px;
  }

  .site-header__brand {
    grid-area: brand;
    min-width: 0;
  }

  .site-header__logo {
    width: min(var(--nexo-header-logo-width, 150px), 132px);
    max-width: 100%;
  }

  .site-header__mobile-actions {
    grid-area: actions;
    display: flex;
  }

  .site-header__nav {
    grid-area: nav;
    display: none;
    width: 100%;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
  }

  .site-header.is-mobile-menu-open .site-header__nav {
    display: block;
  }

  .site-header--no-search .site-header__nav {
    transform: none;
  }

  .site-header__menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
  }

  .site-header__menu > li {
    display: block;
    width: 100%;
  }

  .site-header__menu > li > a {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 0 4px;
    font-size: 15px;
    justify-content: flex-start;
    border-radius: 6px;
  }

  .site-header__menu > li > ul {
    position: static;
    display: block;
    min-width: 0;
    margin: 0 0 8px;
    padding: 4px 0 4px 14px;
    border: 0;
    border-left: 2px solid rgba(255, 90, 0, 0.22);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .site-header__menu > li > ul > li > a {
    padding: 9px 8px;
    font-size: 14px;
    white-space: normal;
  }

  .site-header__search {
    grid-area: search;
    display: none;
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    justify-content: stretch;
  }

  .site-header.is-mobile-search-open .site-header__search {
    display: flex;
  }

  .site-header__search form,
  .site-search-form {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .site-header__search input[type="search"],
  .site-search-form__input {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    height: 44px;
  }

  .site-header__search input[type="submit"],
  .site-search-form__button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
  }

  .site-header.is-mobile-menu-open .site-header__inner,
  .site-header.is-mobile-search-open .site-header__inner {
    padding-bottom: 16px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 18px;
  }

  .site-header.is-sticky-enabled.is-scrolled {
    padding-top: 12px;
  }

  .site-layout,
  .site-layout--full {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-header__inner {
    width: calc(100% - 28px);
    min-height: 58px;
    padding: 10px 14px;
    border-radius: 8px;
  }

  .site-header__logo {
    width: min(var(--nexo-header-logo-width, 150px), 104px);
  }

  .site-header__mobile-actions {
    gap: 8px;
  }

  .site-header__mobile-button {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }

  .site-header__mobile-button-lines {
    width: 20px;
    gap: 5px;
  }

  .site-header__menu > li > a {
    min-height: 42px;
    font-size: 14px;
  }

  .site-search-form__input,
  .site-header__search input[type="search"] {
    height: 42px;
  }

  .site-search-form__button,
  .site-header__search input[type="submit"] {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }
}
