/* =============================================================================
   ArtChiado — Projetos com os serviços (2026-12-01)
   Ficheiro NOVO: site/templates/styles/servicos.css
   Ligar no head.php a seguir ao grid.css.

   1) Barra do título em Projetos: de cinza #343434 a amarelo #F8D648, texto #1a1a1a,
      com os filtros lá dentro (o HTML vem de parts/project-title.php, sem JavaScript).
   2) Texto do serviço (parts/service-intro.php) e FAQ (parts/service-faq.php).
   O html do sítio tem font-size: 10px, por isso os tamanhos estão em px.
   ============================================================================= */

/* ---------- r3: espaço vertical entre texto e imagens/grelhas (t92u) ----------
   Um só valor para todo o site: 28px no telemóvel, 32 a 48px no desktop
   (a 1440px: ~42px). Usado na intro dos serviços, nos títulos de secção da home,
   no detalhe do projeto (antes e depois da galeria) e no FAQ. */
:root { --ac-gap-text: 28px; }
@media (min-width: 600px) {
  :root { --ac-gap-text: clamp(32px, 2.2vw + 10px, 48px); }
}

/* ---------- 0) Tipografia única do menu e dos filtros (2026-12-01) ----------
   Menu principal (HOME, PROJETOS, PT/EN), dropdowns e filtros da barra amarela
   usam EXACTAMENTE a mesma família, tamanho, espessura e espaçamento: Archivo 600,
   14px, maiúsculas, +0,08em (o mesmo tracking dos botões "Let's talk"). Antes: menu em
   Ubuntu 300 16px e filtros em Archivo 700 13px. Archivo 600 vem do Google Fonts (head.php).
   Só muda a letra: cores, hover amarelo e menu móvel à direita (override.css) ficam como estão. */
:root {
  --ac-nav-font: "Archivo", "Ubuntu", sans-serif;
  --ac-nav-size: 14px;
  --ac-nav-weight: 600;
  --ac-nav-track: .08em;
}

@media only screen and (max-width: 992px) {
  :root { --ac-nav-size: 15px; } /* painel móvel: alvo de toque maior; filtros acompanham */
}

.navbar #navbar .navbar-nav li a,
.navbar #navbar .navbar-nav li.active > a,
.navbar #navbar .navbar-nav .dropdown-menu li a {
  font-family: var(--ac-nav-font);
  font-size: var(--ac-nav-size);
  font-weight: var(--ac-nav-weight);
  letter-spacing: var(--ac-nav-track);
  text-transform: uppercase;
}

/* PT/EN: o override.css põe o idioma ativo a 700 com !important; mesma espessura que o resto */
.navbar #navbar .navbar-nav li.active > a[hreflang] {
  font-weight: var(--ac-nav-weight) !important;
}

/* ---------- 1) Barra amarela com filtros ---------- */

.title:has(#filters) {
  background-color: #F8D648;
  color: #1a1a1a;
}

.title:has(#filters) h1,
.title:has(#filters) h1 .hashtag {
  color: #1a1a1a;
}

.title:has(#filters) h1 .hashtag {
  opacity: .5;
  filter: alpha(opacity=50);
}

.title .container.has-filters {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  gap: 0 24px;
}

/* os :before/:after do .container do Bootstrap (clearfix) contariam como itens do flex */
.title .container.has-filters::before,
.title .container.has-filters::after {
  content: none;
  display: none;
}

.title .container.has-filters h1 {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
}

/* Lista de filtros dentro da barra: mesmas ligações, aspeto novo */
.title #filters {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: end;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  color: #1a1a1a;
  font-family: var(--ac-nav-font);
  font-size: var(--ac-nav-size);
  font-weight: var(--ac-nav-weight);
  letter-spacing: var(--ac-nav-track);
  text-align: right;
  text-transform: uppercase;
  cursor: auto;
  list-style: none;
}

.title #filters li {
  margin: 0;
  padding: 0;
  display: block;
  font-weight: var(--ac-nav-weight);
}

/* Só filhos diretos (>): o Packaging ativo não pinta os seus sub-filtros */
.title #filters li > a,
.title #filters li > a:active,
.title #filters li > a:focus {
  display: block;
  padding: 7px 14px;
  border-radius: 999px;
  background: transparent;
  color: #1a1a1a;
  font-family: var(--ac-nav-font);
  font-size: var(--ac-nav-size);
  font-weight: var(--ac-nav-weight);
  letter-spacing: var(--ac-nav-track);
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-transition: background-color .2s ease, color .2s ease;
  transition: background-color .2s ease, color .2s ease;
}

.title #filters li > a:hover {
  background: #E8C230;
  color: #1a1a1a;
  text-decoration: none;
}

/* Filtro ativo: pílula escura com texto amarelo */
.title #filters li.active > a,
.title #filters li.active > a:hover,
.title #filters li.active > a:focus {
  background: #1a1a1a;
  color: #F8D648;
}

.title #filters li > a:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

/* Telemóvel e tablet estreito: o título em cima, os filtros por baixo, à esquerda */
@media (max-width: 899px) {
  .title .container.has-filters {
    display: block;
  }
  .title #filters {
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
    margin-top: -4px;
    padding-bottom: 14px;
    text-align: left;
  }
}

/* ---------- 1b) Listagem de Projetos com a grelha da home (parts/project-grid.php) ---------- */

/* O .acg da home leva o espaço de uma secção por cima; aqui a barra amarela já separa. */
.acg.acg--list {
  padding-top: 12px; /* r3: era clamp(24px,3vw,40px); telemóvel/tablet: 24px -> 12px (-50%) */
}
@media (min-width: 993px) {
  /* r3: no desktop a distância barra amarela -> texto era 130px (90px do #main-content + 40px de padding).
     Agora 65px: sem padding e -25px de margem (sobe junto com o margin-top de 220px do #main-content). */
  .acg.acg--list {
    padding-top: 0;
    margin-top: -25px;
  }
}

/* Um único cartão no fim (nº ímpar): ocupa a largura toda, em formato mais baixo (21:9) */
.acg .acg-block--solo > .acg-card:only-child {
  grid-column: 1 / -1;
}
.acg .acg-block--solo > .acg-card:only-child .acg-media {
  aspect-ratio: 21 / 9;
}
@media (max-width: 599px) {
  .acg .acg-block--solo > .acg-card:only-child .acg-media { aspect-ratio: 3 / 2; }
}

/* A listagem não tem o botão "Ver todos": o espaço final vem do padding do .acg */
.acg--list .acg-section { margin: 0; }

/* ---------- 1c) Página de detalhe do projeto: imagens com cantos redondos ----------
   Mesmo raio dos cartões da grelha: clamp(13.6px, 1.15vw, 19.2px); 16px no telemóvel.
   O raio vai na <img> (no telemóvel o <a> tem padding lateral, por isso não serve nele). */
.project-gallery #gallery a img,
.project-body img,
.main-content .project-gallery img {
  border-radius: clamp(13.6px, 1.15vw, 19.2px);
}
@media (max-width: 599px) {
  .project-gallery #gallery a img,
  .project-body img,
  .main-content .project-gallery img { border-radius: 16px; }
}

/* ---------- 2) Introdução do serviço e FAQ ---------- */

.acs-intro {
  margin: 0 0 var(--ac-gap-text);
}

.acs-intro-body {
  max-width: 72ch;
  color: #333;
  font-family: "Open Sans", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.acs-intro-body p { margin: 0 0 1em; }

.acs-intro-body > p:first-child strong {
  display: block;
  color: #1a1a1a;
  font-family: "Archivo", "Open Sans", sans-serif;
  font-size: clamp(21px, 1.5vw + 10px, 30px);
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.2;
}

.acs-intro-body ul {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.acs-intro-body ul li {
  position: relative;
  margin: 0;
  padding: 3px 0 3px 22px;
}

.acs-intro-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #F8D648;
}

@media (min-width: 600px) {
  .acs-intro-body ul { columns: 2; -webkit-columns: 2; column-gap: 28px; }
  .acs-intro-body ul li { -webkit-column-break-inside: avoid; break-inside: avoid; }
}

/* Separador entre o texto e a grelha de projetos: "Projetos de Packaging ______ [Todos | Alimentar | Bebidas]".
   A linha fina vai do título até aos pills (ou até ao fim, quando não há pills). */
.acs-projects-label {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  gap: 16px;
  margin: 0 0 var(--ac-gap-text);
  color: #1a1a1a;
  font-family: "Archivo", "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.acs-projects-label::after {
  content: "";
  -webkit-box-ordinal-group: 2;
  -webkit-order: 1;
  order: 1;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 24px;
  height: 1px;
  background: #c2c2c2;
}

.acs-projects-title { -webkit-order: 0; order: 0; }

.acs-pills {
  -webkit-order: 2;
  order: 2;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.acs-pills li { margin: 0; padding: 0; }

/* Mesma tipografia do menu (Archivo 600, tracking do menu); ativo = pílula preta com texto amarelo */
.acs-pills li a,
.acs-pills li a:visited {
  display: block;
  padding: 6px 13px;
  border-radius: 999px;
  background: transparent;
  color: #1a1a1a;
  font-family: var(--ac-nav-font);
  font-size: 13px;
  font-weight: var(--ac-nav-weight);
  letter-spacing: var(--ac-nav-track);
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-transition: background-color .2s ease, color .2s ease;
  transition: background-color .2s ease, color .2s ease;
}

.acs-pills li a:hover,
.acs-pills li a:focus {
  background: #F8D648;
  color: #1a1a1a;
  text-decoration: none;
}

.acs-pills li.active a,
.acs-pills li.active a:hover,
.acs-pills li.active a:focus {
  background: #1a1a1a;
  color: #F8D648;
}

.acs-pills li a:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

/* Telemóvel: título em cima, pills por baixo (sem linha) */
@media (max-width: 599px) {
  .acs-projects-label { -webkit-flex-wrap: wrap; flex-wrap: wrap; gap: 12px 16px; }
  .acs-projects-label::after { display: none; }
  .acs-pills { -webkit-order: 1; order: 1; }
}

.acs-faq {
  margin: clamp(40px, 4.5vw, 64px) 0 0;
  padding-top: var(--ac-gap-text);
  border-top: 1px solid #c2c2c2;
}

.acs-faq-body {
  max-width: 64ch;
  color: #333;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.acs-faq-body h2 {
  margin: 0 0 20px;
  color: #1a1a1a;
  font-family: "Archivo", "Oswald", sans-serif;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 800;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.acs-faq-body h3 {
  margin: 22px 0 6px;
  color: #1a1a1a;
  font-family: "Archivo", "Open Sans", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.acs-faq-body p { margin: 0 0 .8em; }

/* ---------- 1d) Detalhe do projeto: mais ar à volta da galeria e do texto (t92u) ---------- */
#main-content .main-content:has(.project-gallery) { margin-top: var(--ac-gap-text); }

.project-gallery { margin-bottom: var(--ac-gap-text); } /* continua inline-block (contém os floats da galeria) */
.project-gallery #gallery { margin-top: 0; }

@media only screen and (max-width: 991px) {
  /* o texto fica por baixo da galeria: espaço antes e depois */
  .project-gallery #gallery { margin: 0 -15px 0; }
  .project-body { margin-top: 0; margin-bottom: var(--ac-gap-text); }
}

@media only screen and (min-width: 992px) {
  .project-body { margin-top: 0; padding-bottom: var(--ac-gap-text); }
}

/* ---------- 3) Home: títulos de secção com mais espaço antes da grelha (t92u) ---------- */
.acg .acg-services-title { margin-bottom: var(--ac-gap-text); }

/* ---------- 4) Home: secção "Sobre nós" entre o 1.º e o 2.º grupo de projetos (t94u / pt95u) ----------
   Bloco escuro #1a1a1a com cantos dos cartões, texto #f4f3ef, Archivo, título e destaque a amarelo #F8D648. */
.acg .acg-about {
  margin: var(--acg-section-space) 0;
}

.acg .acg-about-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: clamp(28px, 4vw, 64px);
  border-radius: var(--acg-radius);
  background: #1a1a1a;
  color: #f4f3ef;
}

.acg .acg-about-title {
  margin: 0;
  padding: 0;
  color: #F8D648;
  font-family: "Archivo", "Ubuntu", sans-serif;
  font-size: clamp(32px, 4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}

.acg .acg-about-text {
  max-width: 62ch;
  font-family: "Archivo", "Open Sans", sans-serif;
  font-size: clamp(16px, 0.5vw + 12px, 20px);
  font-weight: 500;
  line-height: 1.55;
}

.acg .acg-about-text p { margin: 0 0 .9em; color: inherit; }
.acg .acg-about-text p:last-child { margin-bottom: 0; }
.acg .acg-about-text strong { color: #fff; font-weight: 700; }

/* Destaque (amarelo): "Desde 2010 a criar!" */
.acg .acg-about-text .acg-about-lead {
  margin: 0 0 .7em;
  color: #F8D648;
  font-family: "Archivo", "Ubuntu", sans-serif;
  font-size: clamp(22px, 1.6vw + 10px, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

@media (min-width: 900px) {
  .acg .acg-about-inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: clamp(32px, 5vw, 80px);
    row-gap: 28px;
  }
  .acg .acg-about-title { grid-column: 1; grid-row: 1; }
  .acg .acg-about-text  { grid-column: 2; grid-row: 1; }
}
