/* Pedrita - folha de estilos única */

:root {
  --green: #8aa357;
  --green-dark: #4a650e;
  --green-soft: #eef3e1;
  --yellow: #ffff00;
  --text: #333;
  --muted: #666;
  --bg: #f6f7ee;
  --card: #fff;
  --ink: #4a650e;
  --ink-hover: #2f4308;
  --line: #d9e2c0;
  --row-alt: #f4f6ec;
  --row-current: #fff7a8;
  --focus: #1a73e8;
  --current-ring: #4a650e;
  --radius: 18px;
  --shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 8px 24px rgba(74, 101, 14, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-rounded, "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font: 16px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--ink); }
a:hover { color: var(--ink-hover); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
/* Sobre fundo verde escuro o azul não tem contraste suficiente */
.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--yellow);
}
.to-top:focus-visible { box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(0, 0, 0, .3); }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--card);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Barra superior ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

.bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  color: #fff;
  text-decoration: none;
  font: 800 1.4rem/1 var(--font-head);
  letter-spacing: .02em;
  padding: 8px 0;
}
.brand:hover { color: var(--yellow); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-main {
  display: flex;
  gap: 2px;
}

.site-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
}
.site-nav a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.site-nav a[aria-current="page"] { background: var(--yellow); color: #2b3a05; }

.nav-extra { display: none; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  height: 3px;
  border-radius: 2px;
  background: #fff;
  transition: transform .2s, opacity .2s;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { left: 0; right: 0; top: -8px; }
.nav-toggle span::after { left: 0; right: 0; top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Cabeçalho com imagem ---------- */

.hero {
  background: var(--yellow);
  border-bottom: 10px solid var(--green);
  text-align: center;
  line-height: 0;
}
.hero img {
  display: inline-block;
  width: 100%;
  max-width: 990px;
}

/* ---------- Grelha principal ---------- */

.layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-areas: "side main";
  gap: 28px;
  align-items: start;
}
.layout > main { grid-area: main; }
.layout > aside { grid-area: side; }

.content {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
}

.content h1,
.content h2,
.content h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.25;
}
.content h1 {
  font-size: 2rem;
  margin: 0 0 1.2rem;
  padding-bottom: .5rem;
  border-bottom: 4px solid var(--green);
  display: inline-block;
}
.content h2 { font-size: 1.4rem; margin: 2rem 0 .8rem; }
.content h3 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
.content > h1:first-child { margin-top: 0; }
.content p { margin: 0 0 1em; }
.content ul { padding-left: 1.4rem; }
.content li { margin-bottom: .35rem; }

.center { text-align: center; }

.quote {
  font-family: var(--font-head);
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--green-soft);
  border-left: 6px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 24px;
  margin: 0 0 1.5rem;
}

.photo {
  display: block;
  margin: 1.5rem auto 0;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* ---------- Atalhos (menu lateral) ---------- */

.quick {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 76px;
}

.qcard {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  transition: transform .15s, box-shadow .15s;
}
.qcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1), 0 12px 28px rgba(74, 101, 14, .18);
  color: var(--ink);
}
.qcard[aria-current="page"] { outline: 3px solid var(--current-ring); }
.qcard img {
  flex: none;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

/* ---------- Mosaico da página inicial ---------- */

.tiles {
  max-width: 1100px;
  margin: 28px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.tile {
  display: grid;
  place-items: center;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  min-height: 140px;
  transition: transform .15s, box-shadow .15s;
}
.tile:hover {
  transform: translateY(-4px) rotate(-1deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12), 0 16px 32px rgba(74, 101, 14, .2);
}
.tile img { max-height: 120px; object-fit: contain; }

.tiles + .layout { padding-top: 24px; }

/* ---------- Notícias ---------- */

.news + .news { margin-top: 2.5rem; padding-top: 2rem; border-top: 2px dashed var(--line); }
.news h2 { margin-top: 0; }
.news time {
  display: inline-block;
  background: var(--green-soft);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 12px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 640px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Botões e PDFs ---------- */

.btn {
  display: inline-block;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  transition: background .15s, transform .15s;
}
.btn:hover { background: #2f4308; color: #fff; transform: translateY(-1px); }

.pdf { margin: 0 0 1rem; }
.pdf-embed {
  display: block;
  width: 100%;
  height: 75vh;
  min-height: 480px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.pdf-actions { margin: 12px 0 0; }

@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  .pdf-embed { display: none; }
}

.doc-list { list-style: none; padding: 0; }
.doc-list li { margin: 0 0 .6rem; }

/* ---------- Equipa / Órgãos ---------- */

.team-photo {
  float: right;
  width: 300px;
  margin: 0 0 1rem 1.5rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.people { list-style: none; padding: 0; margin: 0 0 1rem; }
.people li {
  padding: 8px 14px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.people li:last-child { border-bottom: 0; }
.clear { clear: both; }

.role-group { margin: 0 0 1.5rem; }
.role-group h3 { text-align: center; letter-spacing: .04em; }

/* ---------- Roupas ---------- */

.clothes {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.clothes li {
  margin: 0;
  background: var(--green-soft);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}
.clothes img {
  display: block;
  margin: 0 auto 10px;
  width: 150px;
  height: 150px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

/* ---------- Instalações ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 0 1.5rem;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

/* ---------- Testemunhos ---------- */

blockquote.testimonial {
  position: relative;
  margin: 1.5rem 0 0;
  padding: 28px 32px;
  background: var(--green-soft);
  border-radius: var(--radius);
}
blockquote.testimonial::before {
  content: "\201C";
  position: absolute;
  top: -6px;
  left: 14px;
  font: 700 4.5rem/1 Georgia, serif;
  color: var(--green);
}
blockquote.testimonial p { margin: 0 0 1em; }
blockquote.testimonial footer { font-weight: 700; color: var(--ink); }

/* ---------- Ementas ---------- */

.table-wrap { overflow-x: auto; }

.ementa {
  width: 100%;
  max-width: 520px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ementa th {
  background: var(--green-dark);
  color: #fff;
  text-align: left;
  padding: 12px 18px;
}
.ementa td { padding: 11px 18px; }
.ementa tbody tr:nth-child(odd) td { background: var(--row-alt); }
.ementa tbody tr.current td {
  background: var(--row-current);
  font-weight: 700;
  border-top: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
}
.ementa tbody tr.current td:first-child { border-left: 6px solid var(--green-dark); }

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--green-dark);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ---------- Rodapé ---------- */

.site-footer {
  background: var(--green-dark);
  color: #fff;
  padding: 36px 16px 28px;
  border-top: 10px solid var(--green);
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.foot {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.foot p { margin: 0 0 .8rem; }
.foot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
}
.foot-badges img {
  display: block;
  height: 90px;
  width: auto;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
}
.facebook img { width: 44px; height: 44px; border-radius: 10px; }

/* ---------- Voltar ao topo ---------- */

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #2f4308; color: #fff; }

/* ---------- Responsivo ---------- */

@media (max-width: 980px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--green-dark);
    padding: 8px 16px 16px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .nav-main { flex-direction: column; }
  .site-nav a { border-radius: 10px; padding: 12px 14px; }

  .nav-extra {
    display: block;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .25);
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "side";
    padding-top: 20px;
  }
  .quick {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .content { padding: 24px 20px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .foot { grid-template-columns: 1fr; }
  .foot-badges { justify-content: flex-start; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .content h1 { font-size: 1.6rem; }
  .tiles { gap: 10px; }
  .tile { min-height: 110px; padding: 6px; }
  .tile img { max-height: 90px; }
  .team-photo { float: none; display: block; width: 100%; margin: 0 0 1rem; }
  .quick { grid-template-columns: 1fr; }
}

/* ---------- Tamanho dos PDFs ---------- */

.pdf-size { font-weight: 400; font-size: .9em; opacity: .85; }
.pdf-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pdf-actions.center { justify-content: center; }

/* ---------- Botões de mapa ---------- */

.map-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2rem 0 0; }
.btn.alt {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.btn.alt:hover { background: var(--green-soft); color: var(--ink-hover); }

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .tile:hover, .qcard:hover, .btn:hover, .to-top { transform: none; }
}

/* ---------- Impressão ---------- */

@media print {
  :root {
    --bg: #fff;
    --card: #fff;
    --text: #000;
    --ink: #000;
    --line: #999;
    --row-alt: #fff;
    --row-current: #fff;
    --shadow: none;
  }
  html { scroll-behavior: auto; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.45; }

  .site-header, .skip, .nav-toggle, .tiles, .quick, .to-top,
  .pdf-embed, .video, .foot-badges, .facebook, .map-links { display: none !important; }

  .hero { background: none; border-bottom: 2px solid #000; }
  .hero img { max-height: 70pt; width: auto; }

  .layout { display: block; padding: 12pt 0 0; max-width: none; }
  .content { background: none; box-shadow: none; border-radius: 0; padding: 0; }
  .content h1 { border-bottom: 2px solid #000; }
  h1, h2, h3 { break-after: avoid; }
  img, tr, blockquote, .news { break-inside: avoid; }

  .ementa { box-shadow: none; max-width: none; border: 1px solid #000; border-radius: 0; }
  .ementa th { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .ementa tbody tr.current td { background: none; color: #000; border-top: 2px solid #000; border-bottom: 2px solid #000; }
  .badge { background: none; color: #000; border: 1px solid #000; }

  .site-footer { background: none; color: #000; border-top: 2px solid #000; padding: 10pt 0 0; }
  .site-footer a, .site-footer a:hover { color: #000; }
  .foot { display: block; }

  .content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: .85em;
    word-break: break-all;
  }
  .ementa a::after { content: none !important; }
  .btn { background: none; color: #000; padding: 0; box-shadow: none; font-weight: 400; text-decoration: underline; }
}
