/*
Theme Name: GBAMA Theme
Theme URI: https://gbama.pt
Author: Agilstore
Author URI: https://agilstore.pt
Description: Tema WordPress sob medida para a GBAMA — Comércio de Madeiras e Contraplacados, Lda.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gbama
Tags: timber, custom-colors, custom-menu, post-formats, translation-ready

This theme is built specifically for GBAMA.
*/

:root {
  --bg: oklch(98% 0.004 110);
  --surface: oklch(100% 0 0);
  --fg: oklch(20% 0.02 110);
  --muted: oklch(42% 0.02 110);
  --border: oklch(90% 0.006 110);
  --accent: oklch(60% 0.20 128);
  --accent-soft: oklch(60% 0.20 128 / 0.10);
  --accent-strong: oklch(45% 0.22 128);

  --font-display: 'Nunito', 'Avenir Next', system-ui, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Componentização de Botões (Custom Properties) */
  --btn-font-family: var(--font-body);
  --btn-border-radius: 999px;
  --btn-font-weight: 600;
  --btn-letter-spacing: 0.02em;
  --btn-transition: all 0.2s ease-in-out;

  /* Tamanho Normal (Base) */
  --btn-padding-y: 14px;
  --btn-padding-x: 28px;
  --btn-font-size: 15px;
  --btn-gap: 8px;

  /* Tamanho Pequeno (sm) */
  --btn-sm-padding-y: 10px;
  --btn-sm-padding-x: 20px;
  --btn-sm-font-size: 14px;
  --btn-sm-gap: 6px;

  /* Tamanho Grande (lg) */
  --btn-lg-padding-y: 16px;
  --btn-lg-padding-x: 32px;

  /* Cores Primary */
  --btn-primary-bg: var(--accent);
  --btn-primary-color: oklch(15% 0.04 128);
  --btn-primary-hover-bg: var(--accent-strong);
  --btn-primary-hover-color: oklch(15% 0.04 128);

  /* Cores Outline */
  --btn-outline-bg: transparent;
  --btn-outline-color: #fff;
  --btn-outline-border: oklch(100% 0 0 / 0.3);
  --btn-outline-hover-border: #fff;
  --btn-outline-hover-bg: oklch(100% 0 0 / 0.1);
  --btn-outline-hover-color: #fff;

  /* Cores Outline Dark */
  --btn-outline-dark-bg: transparent;
  --btn-outline-dark-color: var(--fg);
  --btn-outline-dark-border: var(--border);
  --btn-outline-dark-hover-border: var(--accent);
  --btn-outline-dark-hover-color: var(--accent);
  --btn-outline-dark-hover-bg: transparent;

  /* Cores Success */
  --btn-success-bg: oklch(56% 0.16 145);
  --btn-success-color: #fff;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- HEADER --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: oklch(100% 0 0 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo span {
  color: var(--accent);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a,
.menu-item a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

nav a:focus-visible,
.menu-item a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

nav a:hover,
nav a.active,
.menu-item a:hover,
.menu-item.current-menu-item a,
.menu-item.active a {
  color: var(--fg);
  background: var(--accent-soft);
}

.nav-cta,
.menu-item.nav-cta-item a {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: 999px !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav-cta:hover,
.menu-item.nav-cta-item a:hover {
  background: var(--accent-strong) !important;
}

/* WP Menu Classes Integration */
.menu-header-container {
  display: flex;
  align-items: center;
}

.wp-nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--fg);
}

.menu-toggle svg {
  display: block;
}

/* --- HERO --- */
.hero {
  position: relative;
  margin-top: 72px;
  padding: 0;
  overflow: hidden;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, oklch(0% 0 0 / 0.72) 0%, oklch(0% 0 0 / 0.25) 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  width: 60%;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #fff;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 18px;
  color: oklch(80% 0.01 110);
  max-width: 55ch;
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--btn-gap);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-border-radius);
  font-family: var(--btn-font-family);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  text-decoration: none;
  transition: var(--btn-transition);
  letter-spacing: var(--btn-letter-spacing);
  border: none;
  cursor: pointer;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-outline-color);
}

.btn-primary:hover {
  background: var(--btn-primary-hover-bg);
  color: var(--btn-primary-hover-color);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--btn-outline-bg);
  color: var(--btn-outline-color);
  border: 1.5px solid var(--btn-outline-border);
}

.btn-outline:hover {
  border-color: var(--btn-outline-hover-border);
  background: var(--btn-outline-hover-bg);
  color: var(--btn-outline-hover-color);
}

/* Custom Success State Class for Form Submission Success */
.btn-success {
  background: var(--btn-success-bg) !important;
  color: var(--btn-success-color) !important;
}

/* --- SECTIONS COMMON --- */
section {
  padding: 88px 0;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.section-desc {
  color: var(--muted);
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 48px;
}

/* --- SOBRE NÓS --- */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.sobre-grid .ph-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 18px;
  background: linear-gradient(135deg, oklch(56% 0.12 170 / 0.12), oklch(56% 0.12 170 / 0.03));
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.sobre-grid-img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.sobre-text p {
  margin-bottom: 16px;
  color: var(--muted);
}

.sobre-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.sobre-stats div {
  text-align: center;
  padding: 20px 12px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.sobre-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.sobre-stats span {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* --- PRODUTOS --- */
.bg-alt {
  background: var(--surface);
}

.produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.prod-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.prod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px oklch(0% 0 0 / 0.08);
}

.prod-img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.prod-card:hover .prod-img img {
  transform: scale(1.08);
}

.prod-body {
  padding: 20px 22px 24px;
}

.prod-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.prod-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.prod-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.btn-sm {
  padding: var(--btn-sm-padding-y) var(--btn-sm-padding-x);
  font-size: var(--btn-sm-font-size);
  gap: var(--btn-sm-gap);
}

.catalog-actions {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* --- ARQUIVO DE PRODUTOS --- */
.arquivo-hero {
  padding: 120px 0 56px;
  background: var(--bg);
}

.arquivo-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  max-width: 26ch;
}

.arquivo-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.filtro-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.filtro-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.filtro-btn--ativo {
  border-color: var(--accent);
  background: var(--accent);
  color: oklch(15% 0.04 128);
}

.filtro-btn--ativo:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: oklch(15% 0.04 128);
}

.arquivo-grid-section {
  padding-top: 56px;
}

.arquivo-paginacao {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 56px;
}

.arquivo-paginacao .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: all 0.2s ease;
}

.arquivo-paginacao .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.arquivo-paginacao .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: oklch(15% 0.04 128);
}

.arquivo-paginacao .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

.arquivo-vazio {
  text-align: center;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.arquivo-vazio p {
  font-size: 18px;
  color: var(--muted);
}



/* --- SERVIÇOS --- */
#servicos {
  padding-bottom: 20vh;
}

.servicos-stack {
  position: relative;
}

.servico-card {
  position: sticky;
  top: 100px;
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 8px 30px oklch(0% 0 0 / 0.06);
}

.servico-card+.servico-card {
  margin-top: -40px;
}

.servico-card:nth-child(1) {
  z-index: 7;
}

.servico-card:nth-child(2) {
  z-index: 8;
}

.servico-card:nth-child(3) {
  z-index: 9;
}

.servico-card:nth-child(4) {
  z-index: 10;
}

.servico-card .card-img {
  width: 38%;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 320px;
}

.servico-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.servico-card:hover .card-img img {
  transform: scale(1.05);
}

.servico-card .card-body {
  flex: 1;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.servico-card .icon {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
  color: var(--accent);
}

.servico-card .icon svg,
.servico-card .icon i {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.servico-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.servico-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 50ch;
}

/* --- SUSTENTABILIDADE --- */
.sust-bg {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
}

.sust-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sust-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sust-bg-img .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, oklch(0% 0 0 / 0.78) 0%, oklch(0% 0 0 / 0.35) 100%);
}

.sust-body {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 60px;
  align-items: flex-start;
  width: 100%;
}

.sust-text {
  flex: 0 0 40%;
  color: #fff;
}

.sust-text h2 {
  color: #fff;
}

.sust-text p {
  color: oklch(80% 0.01 110);
  font-size: 17px;
  line-height: 1.6;
}

.sust-certs {
  flex: 0 0 50%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sust-certs .cert-badge {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
}

.sust-certs .cert-badge svg {
  display: block;
  margin: 0 auto 14px;
}

.sust-certs .cert-badge strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.sust-certs .cert-badge span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* --- CONTACTOS & FORM --- */
.contacto-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
}

.contacto-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 0;
  width: fit-content;
}

.contacto-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  font-size: 15px;
}

.contacto-item+.contacto-item {
  border-top: 1px solid var(--border);
}

.contacto-item .icon {
  width: 40px;
  height: 40px;
  background: var(--accent-soft);
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contacto-item .icon svg {
  display: block;
}

.contacto-item strong {
  display: block;
  font-weight: 600;
}

.contacto-item span {
  color: var(--muted);
}

.contacto-item span a {
  color: inherit;
  text-decoration: none;
}

.contacto-item span a:hover {
  text-decoration: underline;
  color: var(--accent);
}

form {
  display: grid;
  gap: 18px;
}

form>div {
  display: grid;
  gap: 4px;
}

form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.02em;
}

form label:after {
  content: " *";
  color: var(--accent);
}

form label[for="assunto"]:after {
  content: "";
}

form input,
form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

form input:focus,
form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

form input::placeholder,
form textarea::placeholder {
  color: oklch(60% 0.015 110);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

form .btn {
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}

/* --- FOOTER --- */
footer {
  background: #0F2E1B;
  padding: 40px 0 0;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

footer .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

footer .footer-grid h5 {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 20px;
}

footer .footer-grid .brand-name {
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.9px;
  line-height: 1.5;
  color: #fff;
  margin-bottom: 16px;
}

.header-logo-img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

footer .footer-grid p {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  max-width: 40ch;
}

.footer-gov-logos {
  margin-top: 16px;
}

.footer-gov-logos img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

footer .footer-grid .link-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

footer .footer-grid .link-col a {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s;
}

footer .footer-grid .link-col a:hover {
  color: #fff;
}

footer .social-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

footer .social-row a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s;
}

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

.footer-email-link {
  font-size: 22px;
  line-height: 1;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
}

.footer-email-link:hover {
  color: #fff;
}

footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

footer .footer-bottom span {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

/* --- DOCUMENTOS / MODAL --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: oklch(0% 0 0 / 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal-content {
  background: var(--surface);
  border-radius: 20px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 48px;
  position: relative;
  box-shadow: 0 24px 80px oklch(0% 0 0 / 0.25);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--fg);
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--accent);
  color: #fff;
}

.modal-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.modal-content>.section-label {
  margin-top: 0;
}

.modal-content>p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.modal-docs-grid {
  display: grid;
  gap: 8px;
}

.modal-docs-grid a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.2s;
}

.modal-docs-grid a:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px var(--accent-soft);
}

.modal-docs-grid a .icon {
  width: 38px;
  height: 38px;
  background: var(--accent-soft);
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-docs-grid a .icon svg {
  display: block;
}

.modal-docs-grid a .info {
  flex: 1;
}

.modal-docs-grid a .info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.modal-docs-grid a .info span {
  font-size: 13px;
  color: var(--muted);
}

.modal-docs-grid a .badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.modal-docs-grid a .badge.ext {
  background: oklch(60% 0.20 128 / 0.08);
  color: var(--accent);
}

/* --- PAGE DOWNLOADS (downloads.html style) --- */
.page-downloads {
  margin-top: 72px;
  padding: 80px 0;
}

.page-downloads .section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 10px;
}

.page-downloads h1 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.page-downloads>.container>p {
  color: var(--muted);
  font-size: 17px;
  max-width: 600px;
  margin-bottom: 48px;
}

.downloads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--fg);
  transition: all 0.2s;
}

.download-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-soft);
}

.download-item .icon {
  width: 42px;
  height: 42px;
  background: var(--accent-soft);
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.download-item .icon svg {
  display: block;
}

.download-item .info {
  flex: 1;
}

.download-item .info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.download-item .info span {
  font-size: 13px;
  color: var(--muted);
}

.download-item .badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.download-item .badge.ext {
  background: oklch(60% 0.20 128 / 0.08);
  color: var(--accent);
}

/* --- PAGE PRODUTO DETAIL (produto.html style) --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.prod-detail {
  margin-top: 72px;
  padding: 60px 0 80px;
}

.prod-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.prod-images {
  position: sticky;
  top: 100px;
}

.prod-images .main-img {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.prod-images .main-img img {
  width: 100%;
  display: block;
}

.prod-info h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.prod-info .prod-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.prod-info .price-range {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.prod-info .desc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.prod-specs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

.prod-specs h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.prod-specs table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.prod-specs td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.prod-specs td:first-child {
  font-weight: 600;
  color: var(--fg);
  width: 45%;
}

.prod-specs td:last-child {
  color: var(--muted);
}

.prod-specs tr:last-child td {
  border-bottom: none;
}

.prod-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-lg {
  padding: var(--btn-lg-padding-y) var(--btn-lg-padding-x);
}

.btn-outline-dark {
  background: var(--btn-outline-dark-bg);
  color: var(--btn-outline-dark-color);
  border: 1.5px solid var(--btn-outline-dark-border);
}

.btn-outline-dark:hover {
  border-color: var(--btn-outline-dark-hover-border);
  color: var(--btn-outline-dark-hover-color);
  background: var(--btn-outline-dark-hover-bg);
}

.prod-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.prod-feature {
  text-align: center;
  padding: 20px 16px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.prod-feature svg {
  display: block;
  margin: 0 auto 10px;
}

.prod-feature strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.prod-feature span {
  font-size: 13px;
  color: var(--muted);
}

.loading-state {
  text-align: center;
  padding: 120px 0;
  color: var(--muted);
  font-size: 17px;
}

.loading-state-padded {
  padding: 80px 0;
}

/* --- RESPONSIVE CONTRACT BREAKPOINTS --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav {
    display: none;
  }

  nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }

  nav.open a,
  nav.open .menu-item a {
    width: 100%;
    display: block;
  }

  nav.open .menu-item.nav-cta-item a {
    text-align: center;
    margin-top: 8px;
  }

  .hero .container,
  .sobre-grid,
  .contacto-grid {
    grid-template-columns: 1fr;
  }

  .servicos-stack {
    padding-bottom: 40px;
  }

  .hero {
    padding: 80px 0 60px;
    text-align: left;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(20px, 5.5vw, 25px);
  }

  .hero p {
    font-size: 16px;
  }

  .hero p.hide-mobile {
    display: none;
  }

  .hero-actions {
    display: none;
  }

  .hero .section-label {
    display: block;
    margin-bottom: 8px;
  }

  .hero-bg .overlay {
    background: linear-gradient(180deg, oklch(0% 0 0 / 0.7) 0%, oklch(0% 0 0 / 0.4) 100%);
  }

  .servico-card {
    flex-direction: column;
    min-height: auto;
    top: 72px;
  }

  .servico-card .card-img {
    width: 100%;
    min-height: 200px;
    height: 200px;
  }

  .servico-card .card-body {
    padding: 24px;
  }

  .servico-card+.servico-card {
    margin-top: -20px;
  }

  .sobre-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .contacto-card {
    width: 100%;
  }

  .sust-body {
    flex-direction: column;
    gap: 32px;
  }

  .sust-text {
    flex: 1;
  }

  .sust-certs {
    flex: 1;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .sust-bg-img .overlay {
    background: linear-gradient(180deg, oklch(0% 0 0 / 0.75) 0%, oklch(0% 0 0 / 0.4) 100%);
  }

  footer .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Page Downloads & Product detail responsive overrides */
  .page-downloads {
    padding: 60px 0;
  }

  .page-downloads h1 {
    font-size: 28px;
  }

  .downloads-grid {
    grid-template-columns: 1fr;
  }

  .prod-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .prod-images {
    position: static;
  }

  .prod-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .sobre-stats {
    grid-template-columns: 1fr;
  }

  .sust-certs {
    grid-template-columns: 1fr;
  }

  footer .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-downloads h1 {
    font-size: 24px;
  }

  .prod-features {
    grid-template-columns: 1fr;
  }
}

/* --- FALLBACK & BASE TEMPLATE STYLES --- */
.fallback-section {
  padding: 120px 0 80px;
}

.fallback-post {
  margin-bottom: 40px;
}

.fallback-title {
  margin-bottom: 20px;
  font-family: var(--font-display);
}

.fallback-content {
  line-height: 1.8;
  color: var(--muted);
}

/* --- RESOLUÇÃO DE LITÍGIOS --- */
.litigios-intro {
  margin-bottom: 40px;
}

.litigios-intro p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.litigios-intro strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  margin-top: 28px;
  margin-bottom: 16px;
  color: var(--fg);
}

.litigios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
  margin-bottom: 48px;
}

.litigio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.litigio-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px oklch(0% 0 0 / 0.05);
}

.litigio-logo {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.litigio-logo img {
  max-height: 100%;
  max-width: 180px;
  object-fit: contain;
}

.litigio-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.litigio-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.litigio-card a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.litigio-card a:hover {
  color: var(--accent-strong);
}

.litigios-footer {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.litigios-footer strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  margin-bottom: 8px;
}

.litigios-footer a {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s;
}

.litigios-footer a:hover {
  color: var(--accent-strong);
}

@media (max-width: 768px) {
  .litigios-grid {
    grid-template-columns: 1fr;
  }
}

/* Responsividade do Menu (Desktop vs Mobile) */
.desktop-nav {
  display: flex;
  align-items: center;
}

@media (max-width: 991px) {
  .desktop-nav {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .sm-toggle {
    display: none !important;
  }
  .staggered-menu-panel,
  .sm-overlay,
  .sm-prelayers {
    display: none !important;
  }
}

/* Seletor de Idiomas (i18n Dropdown) */
.lang-selector {
  position: relative;
  display: inline-block;
  margin-left: 16px;
}

/* No menu lateral (mobile), o seletor deve ter margem diferente */
.staggered-menu-panel .lang-selector {
  margin-left: 0;
  margin-top: 1.5rem;
  width: 100%;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.lang-current:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.lang-chevron {
  transition: transform 0.2s;
  stroke: currentColor;
}

.lang-selector.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  list-style: none;
  padding: 6px;
  min-width: 110px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

/* No mobile, o dropdown pode abrir para cima ou ficar relativo */
.staggered-menu-panel .lang-dropdown {
  position: absolute;
  top: auto;
  bottom: 100%;
  right: 0;
  left: 0;
  margin-top: 0;
  margin-bottom: 8px;
}

.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-dropdown li {
  margin: 0;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
  background: var(--accent-soft);
  color: var(--fg);
}

.lang-flag {
  width: 18px;
  height: 12px;
  display: inline-block;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

/* Bandeiras em CSS Gradiente Puro */
.flag-pt {
  background: linear-gradient(to right, #006600 40%, #ff0000 40%);
}

.flag-en {
  background: 
    linear-gradient(to bottom, transparent 42%, #cc0000 42%, #cc0000 58%, transparent 58%),
    linear-gradient(to right, #ffffff 44%, #cc0000 44%, #cc0000 56%, #ffffff 56%);
  background-color: #00247d;
}

.flag-es {
  background: linear-gradient(to bottom, #cc0000 25%, #ffc400 25%, #ffc400 75%, #cc0000 75%);
}