/* WithYou - Acompanhamento de Vítimas e Testemunhas */
/* Reconstrução fiel ao design original - withyou.com.pt */

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

:root {
  --blue: #204199;
  --black: #000000;
  --bg-light: #f0f0f0;
  --white: #ffffff;
  --font-size-base: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-size: var(--font-size-base);
  color: #000;
  background: #fff;
  line-height: 1.6;
}

/* Accessibility font resize */
body.font-size-plus { font-size: 120%; }
body.font-size-plus-plus { font-size: 140%; }
body.font-size-minus { font-size: 85%; }
body.negative-contrast { background: #000 !important; color: #fff !important; filter: invert(1); }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== TOPO / HERO SECTION ===== */
#page { min-height: 100vh; display: flex; flex-direction: column; }

/* imagemtopo1: container do topo que engloba acessibilidade + hero */
.imagemtopo1 {
  background: #fff;
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
}

/* topcol3: coluna única que ocupa toda a largura */
.topcol3 {
  background: #fff;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Barra de acessibilidade + idioma: fundo branco, centrado */
#pojo-a11y-toolbar {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
}

.pojo-a11y-toolbar-inner {
  text-align: center;
  padding: 6px 10px;
  background: #fff;
}

/* Language selector */
.langselect {
  display: inline-block;
  margin-bottom: 8px;
}

.lbllang {
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 5px;
  color: #333;
}

.DDlang {
  font-size: 0.85rem;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  cursor: pointer;
  background: #fff;
}

/* Accessibility buttons */
.accessbut {
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

.pojo-a11y-toolbar-items {
  list-style: none;
  display: inline-flex;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.pojo-a11y-toolbar-item { display: inline-flex; }

.pojo-a11y-toolbar-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.2s;
}

.pojo-a11y-toolbar-link:hover { background: #ddd; }
.pojo-a11y-toolbar-link.active { background: #ccc; }

/* Hero section — fiel ao original: fundo rgba(240,240,240,1), altura 12vw */
#hero {
  background: rgba(240,240,240,1);
  height: 14vw;
  min-height: 120px;
  max-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex: 1;
  flex-wrap: nowrap;
  width: 100%;
}

.hero-bg {
  display: none; /* sem imagem de background no hero */
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0;
  width: 100%;
}

.hero-large-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  flex-wrap: nowrap;
  padding: 0 20px;
}

.hero-large-text img {
  display: inline-block;
  height: auto;
}

/* Imagem WithYou logo: 16vw */
.hero-large-text .wp-image-1696 {
  width: 18vw;
  min-width: 120px;
  max-width: 360px;
}

/* Imagem 116006: 10vw */
.hero-large-text .wp-image-1699 {
  width: 11vw;
  min-width: 80px;
  max-width: 200px;
}

/* Imagem APAV: 10vw */
.hero-large-text .wp-image-1702 {
  width: 11vw;
  min-width: 80px;
  max-width: 200px;
}

/* ===== NAVIGATION ===== */
#site-navigation {
  background: var(--blue);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.onepress-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  justify-content: center;
}

.onepress-menu > li {
  position: relative;
}

.onepress-menu > li > a {
  display: block;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 14px 20px;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}

.onepress-menu > li > a:hover,
.onepress-menu > li.current > a {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

.onepress-menu > li.current > a {
  background: rgba(255,255,255,0.2);
}

/* Dropdown arrow */
.nav-toggle-subarrow {
  display: none; /* hidden on desktop, shown on mobile */
}

/* Submenu */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--blue);
  list-style: none;
  min-width: 260px;
  z-index: 2000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.onepress-menu > li:hover > .sub-menu { display: block; }

.sub-menu li a {
  display: block;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 10px 16px;
  white-space: normal;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: background 0.2s;
}

.sub-menu li a:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

/* ===== CONTENT AREA ===== */
#content { flex: 1; }
#content-inside { max-width: 1400px; margin: 0 auto; padding: 0 40px; }
#primary { width: 100%; }
.entry-content { padding: 20px 0; }
.entry-content p { margin-bottom: 1em; }

/* Page title banner */
.wp-block-media-text {
  display: grid;
  grid-template-columns: auto 15%;
  align-items: center;
  background: var(--bg-light);
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.wp-block-media-text.has-media-on-the-right {
  grid-template-columns: auto 15%;
}

.wp-block-media-text__content { padding: 10px 20px; }
.wp-block-media-text__media { display: flex; justify-content: center; order: 2; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__content { order: 1; }
.wp-block-media-text.has-media-on-the-right .wp-block-media-text__media { order: 2; }

.wp-block-media-text__content h1 {
  color: var(--blue);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}

/* Separator */
.wp-block-separator {
  border: none;
  height: 3px;
  background: var(--bg-light) !important;
  margin: 30px 0;
}

.wp-block-separator.alignfull { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); width: 100vw; max-width: 100vw; }
.wp-block-separator.alignwide { max-width: 100%; }

/* ===== COLUMNS ===== */
.wp-block-columns {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
  align-items: center;
  margin: 1em 0;
}

.wp-block-columns.rodape1 { justify-content: center; align-items: center; }

.wp-block-column { flex: 1; min-width: 0; }
.wp-block-column.coluna_1qeq { flex-basis: 80%; }
.wp-block-column.coluna_2qeq { flex-basis: 20%; }

/* Alignfull */
.alignfull {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
  width: 100vw;
}

.alignwide { max-width: 100%; }
.aligncenter { margin-left: auto !important; margin-right: auto !important; display: block; }

/* Buttons */
.wp-block-buttons {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  border: 2px solid #000;
  color: #000;
  background: transparent;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

/* Texto introdutório homepage */
.entry-content-text p {
  margin-bottom: 1em;
  line-height: 1.7;
}

/* Cover block (separator image) */
.wp-block-cover.alignfull {
  background-repeat: repeat;
  background-size: auto;
  min-height: 83px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Pre / menu blocks */
pre.wp-block-preformatted {
  background: var(--bg-light);
  padding: 8px 15px;
  margin-bottom: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}

pre.wp-block-preformatted:hover { border-left-color: var(--blue); }
pre.wp-block-preformatted.menu1dpa { font-weight: 700; }
pre.wp-block-preformatted.menu12dpa { padding-left: 30px; }
pre.wp-block-preformatted a { color: #000; text-decoration: none; }
pre.wp-block-preformatted a:hover { text-decoration: underline; }

/* Images in content */
.wp-block-image { margin: 1em 0; }
.wp-block-image figure { margin: 0; }

/* ===== QEM É QUEM PAGE specific ===== */
.qeq-section {
  margin: 30px 0;
  scroll-margin-top: 80px;
}

.qeq-title-banner {
  background: var(--bg-light);
  padding: 12px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qeq-section h2 {
  color: var(--blue);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 15px 0 10px 0;
  border-bottom: 2px solid var(--bg-light);
  margin-bottom: 15px;
}

/* ===== FOOTER RODAPE ===== */
.rodape-sep {
  background: var(--bg-light);
  padding: 20px 0;
  margin: 10px 0;
}

.site-footer {
  background: #fff;
  border-top: 1px solid #eee;
  padding: 20px 0;
  margin-top: 20px;
}

.site-info { text-align: center; }
.site-info p {
  font-size: 0.8rem;
  color: #333;
  line-height: 1.5;
  white-space: pre-line;
}

/* Back to top */
.btt {
  text-align: center;
  margin-bottom: 10px;
}

.back-to-top {
  display: inline-block;
  font-size: 1.5rem;
  color: #666;
  transition: color 0.2s;
}

.back-to-top:hover { color: var(--blue); }

/* ===== MOBILE MENU ===== */
.mob-menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
}

.mobmenu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 8000;
}

.mobmenu-overlay.active { display: block; }

.mobmenu-panel {
  position: fixed;
  top: 0; left: -300px;
  width: 280px;
  height: 100vh;
  background: var(--blue);
  z-index: 9000;
  overflow-y: auto;
  transition: left 0.3s ease;
  padding: 20px 0;
}

.mobmenu-panel.open { left: 0; }

.mobmenu-panel ul { list-style: none; padding: 0; margin: 0; }
.mobmenu-panel ul li a {
  display: block;
  color: #fff;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
}

.mobmenu-panel ul .sub-menu {
  display: block;
  position: static;
  box-shadow: none;
  background: rgba(0,0,0,0.15);
}

.mobmenu-panel ul .sub-menu li a { padding-left: 36px; font-size: 0.78rem; }

.mobmenu-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== SKIP LINK ===== */
.pojo-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--blue);
  color: #fff;
  padding: 8px;
  z-index: 99999;
  font-size: 0.9rem;
  text-decoration: none;
  transition: top 0.2s;
}

.pojo-skip-link:focus { top: 0; }

/* ===== HERO HOME PAGE ===== */
.hero-home-bar {
  background: #f8f8f8;
  border-bottom: 2px solid var(--bg-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .onepress-menu { display: none; }
  .mob-menu-toggle { display: block; }

  #site-navigation {
    display: flex;
    align-items: center;
    padding: 5px 15px;
    min-height: 50px;
  }

  .wp-block-columns {
    flex-direction: column;
    gap: 1em;
  }

  .wp-block-column.coluna_1qeq,
  .wp-block-column.coluna_2qeq {
    flex-basis: 100%;
  }

  .wp-block-media-text {
    grid-template-columns: 1fr;
  }

  .wp-block-media-text__media { order: 1; }
  .wp-block-media-text__content { order: 2; }

  .hero-large-text { flex-wrap: wrap; gap: 10px; }
  #hero { height: auto; min-height: 80px; max-height: none; padding: 10px 0; }

  .alignfull {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .topcol3 { padding: 8px 10px; }
  .DDlang { font-size: 0.75rem; }
  .accessbut { margin-left: 5px; }
  #content-inside { padding: 0 15px; }
  .wp-block-media-text__content h1 { font-size: 1.1rem; }
}
