/* Bibliotecas Redentoristas — OCA-inspired shell, BRESP brand */

:root {
  --br-teal: #006d78;
  --br-teal-dark: #00545c;
  --br-teal-soft: #e6f4f5;
  --br-accent: #05b2c3;
  --br-text: #3d4a54;
  --br-text-muted: #7a8894;
  --br-heading: #1a3a40;
  --br-border: #dce6ea;
  --br-surface: #ffffff;
  --br-surface-soft: #f4f8f9;
  --br-footer: #123f46;
  --br-font: "Lato", "Poppins", system-ui, sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--br-font);
  color: var(--br-text);
  background: var(--br-surface);
  line-height: 1.55;
}

body.high-contrast {
  --br-teal: #fc0;
  --br-teal-dark: #fc0;
  --br-teal-soft: #000;
  --br-accent: #fc0;
  --br-text: #fff;
  --br-text-muted: #fc0;
  --br-heading: #fc0;
  --br-border: #fc0;
  --br-surface: #000;
  --br-surface-soft: #111;
  --br-footer: #000;
  background: #000 !important;
  color: #fff !important;
}

body.high-contrast,
body.high-contrast main,
body.high-contrast .analytics-site-header,
body.high-contrast .analytics-top-bar,
body.high-contrast .site-footer,
body.high-contrast .container,
body.high-contrast section,
body.high-contrast article,
body.high-contrast .card,
body.high-contrast .sg-search-card,
body.high-contrast .busca-section,
body.high-contrast .analytics-dropdown,
body.high-contrast .mobile-primary-menu {
  background: #000 !important;
  color: #fff !important;
  border-color: #fc0 !important;
}

body.high-contrast a,
body.high-contrast .analytics-nav-link,
body.high-contrast .menu-link,
body.high-contrast .analytics-brand-title,
body.high-contrast .analytics-brand-subtitle {
  color: #fc0 !important;
  text-decoration: underline;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast p,
body.high-contrast li,
body.high-contrast label,
body.high-contrast span,
body.high-contrast td,
body.high-contrast th {
  color: #fff !important;
}

body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea,
body.high-contrast button,
body.high-contrast .acess-btn {
  background: #000 !important;
  color: #fc0 !important;
  border: 1px solid #fc0 !important;
}

body.high-contrast img:not([src*="logo"]) {
  filter: grayscale(1) contrast(1.2);
}

a {
  color: var(--br-teal);
  text-decoration: none;
}

a:hover {
  color: var(--br-teal-dark);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--br-teal);
  color: #fff;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Header (OCA analytics pattern) ---------- */

#header.analytics-site-header {
  background: #fff;
  border-bottom: 1px solid var(--br-border);
}

.analytics-top-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.analytics-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 96px;
  gap: 1.5rem;
}

.analytics-brand-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  min-width: 0;
  margin-right: auto;
  order: -1;
}

.analytics-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 1rem;
  border-right: 1px solid var(--br-border);
}

.analytics-brand-logo img,
.analytics-brand-logo .standard-logo img {
  width: 64px !important;
  height: auto !important;
  max-height: 88px;
  display: block;
  object-fit: contain;
}

.analytics-brand-copy {
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none !important;
  color: inherit;
}

.analytics-brand-copy:hover {
  text-decoration: none !important;
}

.analytics-brand-copy:hover .analytics-brand-title {
  color: var(--br-teal-dark);
}

@media (min-width: 992px) {
  .analytics-brand-copy {
    display: flex;
  }
}

.analytics-brand-title {
  color: var(--br-teal);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.analytics-brand-subtitle {
  color: var(--br-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-desktop-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  gap: 1rem;
  min-width: 0;
}

@media (min-width: 992px) {
  .analytics-desktop-nav {
    display: flex;
  }
}

.analytics-nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.analytics-nav-item {
  position: relative;
  margin: 0;
}

.analytics-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 2rem 0.85rem 1.85rem;
  color: var(--br-text-muted) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  cursor: pointer;
  line-height: 1.05;
}

.analytics-nav-item:hover > .analytics-nav-link,
.analytics-nav-item.active > .analytics-nav-link {
  color: var(--br-teal) !important;
}

.analytics-nav-item.active > .analytics-nav-link::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.9rem;
  height: 2px;
  background: var(--br-teal);
}

.analytics-nav-item.sub-menu > .analytics-nav-link::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-top: -0.1rem;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg);
}

.analytics-dropdown {
  display: none;
  position: absolute;
  top: calc(100% - 0.75rem);
  left: 50%;
  min-width: 14rem;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--br-border);
  border-radius: 0.35rem;
  box-shadow: 0 14px 32px rgba(0, 80, 90, 0.12);
  transform: translateX(-50%);
  z-index: 400;
}

@media (min-width: 992px) {
  .analytics-nav-item:hover > .analytics-dropdown {
    display: block;
  }
}

.analytics-dropdown .menu-link {
  display: block;
  padding: 0.7rem 0.9rem;
  color: var(--br-text) !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 0.28rem;
}

.analytics-dropdown .menu-link:hover {
  color: var(--br-teal) !important;
  background: var(--br-teal-soft);
}

.analytics-utilities {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.analytics-a11y {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.analytics-a11y .acess-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--br-border);
  border-radius: 0.35rem;
  background: var(--br-surface-soft);
  color: var(--br-heading);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  appearance: none;
}

.analytics-a11y .acess-btn:hover {
  border-color: var(--br-teal);
  color: var(--br-teal);
}

.analytics-a11y .acess-btn:focus-visible {
  outline: 2px solid var(--br-teal);
  outline-offset: 2px;
}

.analytics-a11y .acess-btn img {
  width: 14px;
  height: 14px;
}

.analytics-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.analytics-language-switcher .language-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.analytics-language-switcher .lang-select {
  border: 0;
  background: transparent;
  color: var(--br-teal);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 3.25rem;
  padding: 0.15rem 0.1rem;
  cursor: pointer;
  appearance: auto;
}

.analytics-language-switcher .lang-select:focus-visible {
  outline: 2px solid var(--br-teal);
  outline-offset: 2px;
}

.analytics-utility-icon {
  display: inline-flex;
  color: var(--br-text-muted);
  cursor: pointer;
}

.analytics-utility-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* Mobile nav */

.analytics-mobile-nav {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
}

@media (min-width: 992px) {
  .analytics-mobile-nav {
    display: none !important;
  }
}

.mobile-menu-trigger {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--br-border);
  border-radius: 0.35rem;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-menu-trigger span {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--br-heading);
  position: relative;
}

.mobile-menu-trigger span::before,
.mobile-menu-trigger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--br-heading);
}

.mobile-menu-trigger span::before {
  top: -6px;
}

.mobile-menu-trigger span::after {
  top: 6px;
}

.mobile-primary-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--br-border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  z-index: 500;
  padding: 1rem;
}

.analytics-site-header {
  position: relative;
}

.mobile-primary-menu.is-open {
  display: block;
}

.analytics-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.analytics-mobile-menu-list > li {
  border-bottom: 1px solid var(--br-border);
}

.analytics-mobile-menu-list .analytics-nav-link,
.analytics-mobile-menu-list .menu-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.25rem;
  color: var(--br-heading) !important;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  border: 0;
}

.analytics-mobile-menu-list .analytics-dropdown {
  position: static;
  display: none;
  transform: none;
  box-shadow: none;
  border: 0;
  padding-left: 0.75rem;
}

.analytics-mobile-menu-list .analytics-menu-open > .analytics-dropdown {
  display: block;
}

.analytics-mobile-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-top: 1rem;
}

.header-search {
  display: none;
}

@media (min-width: 992px) {
  .header-search {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
}

.header-search input {
  border: 1px solid var(--br-border);
  border-radius: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  min-width: 10rem;
}

.header-search button {
  border: 1px solid var(--br-teal);
  background: var(--br-teal);
  color: #fff;
  border-radius: 0.35rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Breadcrumb */

.analytics-breadcrumb-bar {
  background: var(--br-surface-soft);
  border-bottom: 1px solid var(--br-border);
}

.analytics-breadcrumb-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--br-text-muted);
}

.analytics-breadcrumb-nav a {
  color: var(--br-teal);
}

/* ---------- Page layout ---------- */

#main-content {
  min-height: 50vh;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.page-shell-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .page-shell-grid.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
}

.section-title h2,
.main-highlights-h2 {
  margin: 0;
  color: var(--br-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.page-text,
.page-wrapper {
  color: var(--br-text);
}

.page-subtitle {
  color: var(--br-heading);
  margin: 1.5rem 0 0.75rem;
}

.page-img img {
  border-radius: 0.35rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid figcaption {
  font-size: 0.85rem;
  color: var(--br-text-muted);
  margin-top: 0.35rem;
}

/* ---------- Home hero search ---------- */

.hero-search {
  background:
    linear-gradient(135deg, rgba(0, 109, 120, 0.92), rgba(5, 178, 195, 0.78)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18), transparent 45%);
  color: #fff;
  padding: 3.5rem 1rem 3rem;
}

.hero-search-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-search h1,
.main-search-h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #fff;
}

.hero-search-box,
.main-search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0.5rem;
  padding: 0.75rem;
}

.main-search-searchbox,
.main-selector {
  border: 0;
  border-radius: 0.35rem;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
}

.main-search-searchbox {
  flex: 1 1 220px;
  min-width: 180px;
}

.main-selector {
  flex: 0 0 auto;
  min-width: 8rem;
}

.main-search-btn,
.main-submit {
  border: 0;
  border-radius: 0.35rem;
  background: #fff;
  color: var(--br-teal);
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  cursor: pointer;
}

.main-search-btn:hover,
.main-submit:hover {
  background: var(--br-teal-soft);
}

.main-search-description {
  margin-top: 1rem;
  font-size: 0.95rem;
  opacity: 0.95;
}

/* ---------- Search autocomplete ---------- */

.search-autocomplete-menu {
  position: fixed;
  z-index: 1200;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid var(--br-border);
  border-radius: 0.4rem;
  box-shadow: 0 12px 28px rgba(0, 80, 90, 0.12);
}

.search-autocomplete-menu[hidden],
.search-autocomplete-menu:not(.is-open) {
  display: none;
}

.search-autocomplete-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--br-text);
  cursor: pointer;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.is-active {
  background: var(--br-teal-soft, rgba(0, 109, 120, 0.1));
  color: var(--br-heading, #0b3d44);
}

body.high-contrast .search-autocomplete-menu {
  background: #000;
  border-color: #fff;
}

body.high-contrast .search-autocomplete-item {
  color: #fff;
}

body.high-contrast .search-autocomplete-item:hover,
body.high-contrast .search-autocomplete-item.is-active {
  background: #fff;
  color: #000;
}

/* ---------- Cards / lists ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.item-wrapper {
  display: block;
  color: inherit !important;
  background: #fff;
  border: 1px solid var(--br-border);
  border-radius: 0.4rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.item-wrapper:hover {
  box-shadow: 0 10px 24px rgba(0, 80, 90, 0.1);
  transform: translateY(-2px);
}

.item-img-wrapper img {
  width: 100%;
  display: block;
  aspect-ratio: 300 / 210;
  object-fit: cover;
}

.item-textblock {
  padding: 0.85rem 1rem;
}

.item-title {
  font-weight: 700;
  color: var(--br-heading);
}

.main-selections-more {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
}

.library-list {
  display: grid;
  gap: 0.75rem;
}

.main-bibliotecas-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border: 1px solid var(--br-border);
  border-radius: 0.4rem;
  background: var(--br-surface-soft);
  color: var(--br-heading) !important;
  font-weight: 700;
}

.main-bibliotecas-button:hover {
  border-color: var(--br-teal);
  background: var(--br-teal-soft);
}

/* Highlights slider */

.highlights-slider {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--br-border);
  background: #000;
}

.highlights-track {
  display: flex;
  transition: transform 0.45s ease;
}

.highlights-slide {
  min-width: 100%;
  position: relative;
}

.highlights-slide img {
  width: 100%;
  display: block;
  max-height: 420px;
  object-fit: cover;
}

.main-destaques-textblock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
}

.main-destaques-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.main-destaques-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.highlights-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 0.5rem;
}

.highlights-nav button {
  pointer-events: auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--br-teal);
  font-weight: 700;
  cursor: pointer;
}

.highlights-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.65rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.highlights-dots button {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.highlights-dots button.active {
  background: #fff;
}

/* Social sidebar */

.main-sidebar {
  background: var(--br-surface-soft);
  border: 1px solid var(--br-border);
  border-radius: 0.45rem;
  padding: 1rem;
}

.main-social-embed iframe,
.main-social-embed .twitter-timeline {
  max-width: 100%;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--br-footer);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
  color: rgba(255, 255, 255, 0.88);
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footer-icon img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-title {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.footer-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.footer-text a {
  color: var(--br-accent);
}

.footer-text a:hover {
  color: #fff;
}

.footer-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

.footer-partner-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  min-height: 3.25rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.footer-partner-link:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(5, 178, 195, 0.55);
  transform: translateY(-1px);
}

.footer-partner-link img {
  display: block;
  width: auto;
  height: 1.85rem;
  max-width: 7.5rem;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.footer-textlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0.35rem 0.5rem 0.35rem 0;
  padding: 0.4rem 0.55rem;
  border-radius: 0.35rem;
  background: rgba(0, 0, 0, 0.35);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: var(--br-accent);
}

.footer-social-link:hover {
  background: #fff;
}

.footer-social-link:hover img {
  filter: brightness(0) saturate(100%) invert(28%) sepia(42%) saturate(742%) hue-rotate(146deg);
}

.footer-social-link img {
  filter: none;
}

.site-footer .form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.65rem;
  color: rgba(255, 255, 255, 0.92);
}

.site-footer .main-input,
.site-footer .selector,
.site-footer .form-control,
.site-footer .form-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.35rem;
  padding: 0.55rem 0.7rem;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.site-footer .main-input::placeholder,
.site-footer .form-control::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.site-footer .main-input:focus,
.site-footer .selector:focus,
.site-footer .form-control:focus,
.site-footer .form-select:focus {
  outline: none;
  border-color: var(--br-accent);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(5, 178, 195, 0.25);
}

.form .main-input,
.form .selector,
.form .main-text-field-big {
  width: 100%;
  border: 1px solid var(--br-border);
  border-radius: 0.35rem;
  padding: 0.55rem 0.7rem;
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

.site-footer .main-submit {
  margin-top: 0.85rem;
  background: var(--br-accent);
  color: #fff;
  border: none;
  border-radius: 0.35rem;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
}

.site-footer .main-submit:hover {
  background: #fff;
  color: var(--br-heading);
}

.site-footer .p-min,
.site-footer .text-help {
  color: rgba(255, 255, 255, 0.55);
}

.p-min,
.text-help {
  font-size: 0.75rem;
  color: var(--br-text-muted);
  margin: 0.2rem 0 0;
}

/* Forms on content pages */

.contato-form-wrapper {
  max-width: none;
}

.form.contactpage label,
.form label {
  display: block;
  margin-top: 0.85rem;
  font-weight: 600;
}

.br-form-page {
  max-width: 820px;
  margin: 0 auto;
}

.br-form-hero {
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.5rem;
  border-radius: 0.55rem;
  background:
    linear-gradient(135deg, rgba(0, 109, 120, 0.94), rgba(5, 178, 195, 0.78)),
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 50%);
  color: #fff;
}

.br-form-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}

.br-form-title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.br-form-intro {
  margin: 0.85rem 0 0;
  max-width: 40rem;
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.95;
}

.br-form-card {
  background: #fff;
  border: 1px solid var(--br-border);
  border-radius: 0.55rem;
  padding: 1.5rem 1.35rem 1.75rem;
  box-shadow: 0 12px 30px rgba(0, 80, 90, 0.06);
}

.br-form-card--success {
  text-align: left;
}

.br-form-card--success .br-form-title {
  color: var(--br-heading);
}

.br-form-card--success .br-form-eyebrow {
  color: var(--br-teal);
  opacity: 1;
}

.br-form-success-text {
  margin: 1rem 0 1.35rem;
}

.br-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem 1rem;
}

@media (min-width: 720px) {
  .br-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .br-form-field[data-name="nome"],
  .br-form-field[data-name="rua"],
  .br-form-field[data-name="instituicao"],
  .br-form-field[data-name="mensagem"],
  .br-form-field[data-name="wagtailcaptcha"],
  .br-form-field.br-form-field--full {
    grid-column: 1 / -1;
  }

  .br-form-field[data-name="numero"] {
    grid-column: span 1;
  }
}

.br-form-field {
  min-width: 0;
}

.br-form-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--br-heading);
}

.br-form-required {
  margin-left: 0.2rem;
  color: var(--br-teal);
}

.br-form .br-form-control,
.form.contactpage .br-form-control {
  width: 100%;
  margin-top: 0;
  border: 1px solid var(--br-border);
  border-radius: 0.4rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.95rem;
  color: var(--br-text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.br-form .br-form-control:focus,
.form.contactpage .br-form-control:focus {
  outline: none;
  border-color: var(--br-teal);
  box-shadow: 0 0 0 3px rgba(0, 109, 120, 0.12);
}

.br-form-field.has-error .br-form-control {
  border-color: #c0392b;
}

.br-form-field-errors,
.br-form-errors {
  margin: 0 0 0.4rem;
  color: #c0392b;
  font-size: 0.82rem;
}

.br-form-field-errors ul,
.br-form-errors ul {
  margin: 0;
  padding-left: 1rem;
}

.br-form-help {
  margin-top: 0.35rem;
}

.br-form-captcha {
  margin-top: 0.25rem;
}

.br-form-actions {
  margin-top: 1.35rem;
  display: flex;
  justify-content: flex-end;
}

.br-form-submit,
.form.contactpage .br-form-submit,
a.br-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.4rem;
  background: var(--br-teal);
  color: #fff !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.br-form-submit:hover,
.form.contactpage .br-form-submit:hover,
a.br-form-submit:hover {
  background: var(--br-teal-dark);
}

body.high-contrast .br-form-hero {
  background: #000;
  border: 1px solid #fc0;
}

body.high-contrast .br-form-card {
  background: #000;
  border-color: #fc0;
}

body.high-contrast .br-form-label,
body.high-contrast .br-form-card--success .br-form-title {
  color: #fc0;
}

body.high-contrast .br-form .br-form-control {
  background: #000;
  border-color: #fc0;
  color: #fff;
}

/* Accessibility panel (musicabrasilis-style) */

#accessibilityBar {
  z-index: 9999;
  position: fixed;
  top: 50%;
  right: 0;
  transform: translate(100%, -50%);
  background-color: rgba(34, 34, 34, 0.75);
  border-radius: 0.5rem 0 0 0.5rem;
  box-shadow: 0 5px 30px rgba(34, 34, 34, 0);
  transition: all 0.5s ease-in-out;
}

#accessibilityBar * {
  box-sizing: border-box;
}

#accessibilityBar.active {
  transform: translate(0, -50%);
  box-shadow: 0 5px 30px rgba(34, 34, 34, 0.5);
}

#accessibilityBar button {
  outline: none !important;
  box-shadow: none !important;
  appearance: none;
  cursor: pointer;
}

#accessibilityBar button#universalAccessBtn {
  font-size: 1.5rem;
  line-height: 1;
  color: #fff;
  background-color: #0B7FDB;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 50%;
  border: none;
  position: absolute;
  top: 50%;
  transform: translate(-110%, -50%);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

#accessibilityBar button#universalAccessBtn.collapsed span {
  opacity: 0;
  right: 50%;
  pointer-events: none;
}

#accessibilityBar button#universalAccessBtn span {
  font-size: 1rem;
  line-height: 1;
  text-align: right;
  font-weight: bold;
  color: #fff;
  background-color: #0B7FDB;
  box-shadow: 0 10px 30px rgba(102, 102, 102, 0.1);
  height: 100%;
  padding: 0 1rem;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
  position: absolute;
  top: 50%;
  right: 120%;
  transform: translateY(-50%);
  transition: all 0.3s ease-in-out;
}

#accessibilityBar button.setAccessibility {
  font-size: 0.75rem;
  color: #222;
  font-weight: 700;
  background-color: #eee;
  width: calc(100% - 0.5rem);
  padding: 0.1rem 0.2rem;
  border-radius: 0.25rem;
  border: none;
  display: flex;
  align-items: center;
  margin: 0.25rem;
  transition: all 0.3s ease-in-out;
}

#accessibilityBar button.setAccessibility:hover {
  background-color: #fff;
}

#accessibilityBar button.setAccessibility strong {
  color: #fff;
  background-color: #0B7FDB;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.25rem;
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  #accessibilityBar {
    top: auto;
    bottom: 4rem;
    transform: translateX(100%);
  }

  #accessibilityBar.active {
    transform: translateX(0);
  }

  #accessibilityBar #universalAccessBtn {
    top: auto;
    bottom: 16px;
    transform: translateX(-120%);
    border-radius: 50%;
  }

  div[vw] {
    top: auto !important;
    bottom: 0.75rem !important;
  }
}

body.contrast #accessibilityBar button[data-accessibility="contrast"],
body.accessibility_readingLine #accessibilityBar button[data-accessibility="readingLine"],
body.accessibility_markerLine #accessibilityBar button[data-accessibility="markerLine"] {
  background-color: #0B7FDB !important;
  color: #fff !important;
}

body.accessibility_readingLine #readingLine {
  background-color: #0B7FDB !important;
  opacity: 1;
  width: 100vw;
  height: 0.5rem;
  position: absolute;
  left: 0;
  z-index: 9999;
  transform: translateY(0.5rem);
  pointer-events: none;
}

body.accessibility_markerLine #markerLine {
  background-color: #e4fd00 !important;
  opacity: 0.75;
  border-width: 0.1px 0;
  border-style: solid;
  border-color: #cde400;
  width: 100vw;
  height: 1.75rem;
  position: absolute;
  left: 0;
  z-index: 9999;
  transform: translateY(-1rem);
  mix-blend-mode: color;
  pointer-events: none;
}

body.accessibility_markerLine.contrast #markerLine,
body.accessibility_markerLine.high-contrast #markerLine {
  mix-blend-mode: multiply;
  opacity: 1;
}

#readingLine,
#markerLine {
  display: none;
}

body.accessibility_readingLine #readingLine,
body.accessibility_markerLine #markerLine {
  display: block;
}

/* VLibras just below the accessibility button */
div[vw] {
  z-index: 9997 !important;
  top: calc(50% + 2.75rem) !important;
  bottom: auto !important;
  right: 0 !important;
  left: auto !important;
}

div[vw].active {
  margin-top: 0 !important;
  top: auto !important;
  bottom: 1rem !important;
}

/* Back to top */

.cd-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--br-teal);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 90;
}

.cd-top.cd-is-visible {
  opacity: 1;
  visibility: visible;
}

/* Utilities kept for legacy JS hooks */

.w-inline-block {
  display: inline-block;
}

.w-list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

mark {
  background: #ffe08a;
  padding: 0 0.1em;
}
