/* ==========================================================================
   ALMEIDA & FERREIRA
   style.css
   ========================================================================== */

/* ==========================================================================
   1. RESET GLOBAL & CONFIGURAÇÕES BASE
   ========================================================================== */

/* Reset de margens, paddings e padronização do cálculo de tamanho do box-sizing */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variáveis de Ambiente para o Tema Escuro (Dark Mode) */
.theme-dark {
  --bg-main: #0a0a0a;
  --bg-cards: #121212;
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --border-color: rgba(255, 255, 255, 0.15);
  --accent: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.03);
  --input-focus-bg: rgba(255, 255, 255, 0.06);
}

/* Variáveis de Ambiente para o Tema Claro (Light Mode) */
.theme-light {
  --bg-main: #fcfbf9;
  --bg-cards: #ffffff;
  --text-main: #111111;
  --text-muted: rgba(17, 17, 17, 0.65);
  --border-color: rgba(0, 0, 0, 0.1);
  --accent: #111111;
  --input-bg: rgba(0, 0, 0, 0.02);
  --input-focus-bg: rgba(0, 0, 0, 0.04);
}

/* Definição de Tipografia e Transição Fluida de Cor entre Temas */
:root {
  --font-serif: 'DM Sans', Helvetica, sans-serif;
  --font-sans: 'DM Sans', Helvetica, sans-serif;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Suavização de scroll nativo para âncoras de navegação */
html {
  scroll-behavior: smooth;
}

/* Configurações base do corpo da página e renderização otimizada de fontes */
body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Imagens responsivas que preservam a proporção */
img {
  display: block;
  max-width: 100%;
}

/* Reset de links para herdar estilos de texto do elemento pai */
a {
  color: inherit;
  text-decoration: none;
}

/* Utilitário de Acessibilidade (Oculta elementos visualmente mas mantém legíveis por Screen Readers / SEO) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}


/* ==========================================================================
   2. COMPONENTES GLOBAIS DE INTERFACE (UI)
   ========================================================================== */

/* Linha minimalista no topo que indica a percentagem de scroll da página */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--text-main);
  width: 0%;
  z-index: 10000;
  transition: width 0.1s ease-out;
}

/* Estrutura base de botões tipográficos premium */
.btn {
  display: inline-block;
  padding: 0.95rem 2.5rem;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}

/* Botão Sólido Principal (Preenchimento invertido) */
.btn-primary { 
  background: #ffffff; 
  color: #000000; 
  border-color: #ffffff;
}

.btn-primary:hover { 
  background: rgba(255, 255, 255, 0.85); 
  border-color: rgba(255, 255, 255, 0.85);
}

/* Botão Transparente (Estilo Outline / Ghost) */
.btn-ghost { 
  border-color: rgba(255, 255, 255, 0.5); 
  color: #ffffff; 
  background: transparent; 
}

.btn-ghost:hover { 
  border-color: #ffffff; 
  background: rgba(255, 255, 255, 0.1); 
}

/* Configuração de layout e limites máximos das secções principais */
.stats-section, .products-section, .about-section, .faq-section, .contacts-section {
  padding: 8rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Pequeno rótulo superior com linha horizontal estilizada para cabeçalhos */
.section-label { 
  font-size: 0.7rem; 
  letter-spacing: 0.26em; 
  text-transform: uppercase; 
  margin-bottom: 0.9rem; 
  display: flex; 
  align-items: center; 
  gap: 0.8rem; 
  color: var(--text-muted);
}

.section-label::before { 
  content: ''; 
  width: 28px; 
  height: 1px; 
  background: var(--text-muted); 
}

/* Título de secção fluido com tipografia clássica (Serif) */
.section-title { 
  font-family: var(--font-serif); 
  font-size: clamp(2.3rem, 4vw, 3.5rem); 
  font-weight: 300;
}

.section-title em { 
  font-style: italic; 
}


/* ==========================================================================
   3. BARRA DE NAVEGAÇÃO & MENU MOBILE
   ========================================================================== */

/* Contentor principal da Navbar fixada no topo */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 4rem;
  transition: all 0.4s ease;
  border-bottom: 1px solid transparent;
}

/* Modificador via JS: Ativado quando o utilizador faz scroll na página */
nav.scrolled {
  background: var(--bg-main);
  padding: 1rem 4rem;
  border-bottom-color: var(--border-color);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

/* Redimensionamento responsivo do logótipo ao fazer scroll */
.logo-img {
  height: 40px;
  width: auto;
  transition: height 0.4s ease;
}

nav.scrolled .logo-img { 
  height: 32px; 
}

/* Grupo direito que alinha links, alternador de idioma e tema */
.nav-right-group {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  opacity: 1;
}

/* Grupo específico de botões de controlo (Tema e Idioma) */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Botões base baseados em ícones textuais */
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.icon-btn:hover {
  transform: scale(1.1);
}

/* Botão de Alternância de Idiomas (EN/PT) */
.lang-btn {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn:hover {
  background: var(--text-main);
  color: var(--bg-main);
}

/* Botão Hambúrguer Mobile (Oculto em Desktop por padrão) */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Linhas internas do menu hambúrguer */
.nav-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: all 0.3s ease;
}

/* Transformação das barras num ícone "X" (Fechar) quando o menu é aberto */
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu de ecrã inteiro (Full Screen Menu) para dispositivos móveis */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 99;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Ativação do menu mobile via JavaScript */
.mobile-menu.open { 
  opacity: 1; 
  pointer-events: all; 
}

.mobile-menu ul { 
  list-style: none; 
  text-align: center; 
  display: flex; 
  flex-direction: column; 
  gap: 2.5rem; 
}

.mobile-menu a { 
  font-family: var(--font-serif); 
  font-size: 2.5rem; 
  color: var(--text-main); 
}


/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */

/* Contentor principal de ecrã inteiro para a introdução */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Vídeo em background com preenchimento total e proporção preservada */
.hero-video {
  position: absolute;
  top: 50%; left: 50%;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 0;
}

/* Camada cinemática escura para garantir contraste e legibilidade dos textos */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.85) 100%);
}

/* Caixa de conteúdo textual sobreposta ao vídeo */
.hero-content {
  position: relative;
  text-align: center;
  z-index: 2;
  color: #ffffff; /* Texto claro fixo devido à obscuridade do gradiente */
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 300;
  line-height: 1.05;
}

.hero h1 span { 
  font-style: italic; 
}

.hero-eyebrow { 
  font-size: 0.72rem; 
  letter-spacing: 0.28em; 
  text-transform: uppercase; 
  margin-bottom: 1.5rem; 
}

.hero-sub { 
  margin-top: 1.5rem; 
  font-size: 1.1rem; 
  font-weight: 300; 
  opacity: 0.9; 
}

.hero-cta { 
  margin-top: 3rem; 
  display: flex; 
  gap: 1.2rem; 
  justify-content: center; 
}

/* Indicador visual de scroll localizado na parte inferior do Hero */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  opacity: 0.6;
}

.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* Linha com gradiente que simula um indicador de descida */
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, #ffffff, transparent);
}


/* ==========================================================================
   5. MARQUEE TEXTO INFINITO (LETREIRO DINÂMICO)
   ========================================================================== */

/* Contentor que limita e esconde o transbordo horizontal do letreiro */
.marquee-wrap {
  background: var(--text-main);
  padding: 1.1rem 0;
  overflow: hidden;
  white-space: nowrap;
}

/* Faixa interna animada via Keyframes para efeito contínuo */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeContinuous 60s linear infinite;
  color: var(--bg-main);
  font-size: 0.73rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}


/* ==========================================================================
   6. STATS SECTION (PANEL INDUSTRIAL / DATA GRID)
   ========================================================================== */

/* Grelha de quatro colunas simétricas para exibição de métricas corporativas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-color);
}

.stat-item {
  padding: 3.5rem 2rem;
  border-right: 1px solid var(--border-color);
  text-align: center;
}

/* Remove a borda lateral direita do último bloco da linha */
.stat-item:last-child { 
  border-right: none; 
}

.stat-num { 
  font-family: var(--font-serif); 
  font-size: clamp(2.5rem, 4vw, 3.8rem); 
  font-weight: 300;
  color: var(--text-main); 
}

.stat-label { 
  font-size: 0.75rem; 
  text-transform: uppercase; 
  margin-top: 0.6rem; 
  letter-spacing: 0.08em;
  color: var(--text-muted);
}


/* ==========================================================================
   7. SECÇÃO PRODUTOS & FILTROS DINÂMICOS
   ========================================================================== */

/* Cabeçalho alinhado horizontalmente com título e texto introdutório */
.products-header { 
  display: flex; 
  justify-content: space-between; 
  align-items: flex-end; 
  margin-bottom: 4rem; 
  gap: 2rem;
}

.products-intro { 
  max-width: 360px; 
  font-size: 0.9rem; 
  line-height: 1.85; 
  color: var(--text-muted);
}

/* Enquadramento dos botões de filtro de categoria */
.filter-container {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

/* Estilo individual de cada botão de filtragem */
.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1.6rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.filter-btn.active, .filter-btn:hover {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

/* Grelha do Catálogo de Produtos (3 colunas estáveis) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Cartão do produto individual */
.product-card {
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: opacity, transform; /* Alerta o navegador para otimizar a performance */
  display: block; /* Ou flex/grid, dependendo do teu layout original */
}

/* Ocultado dinamicamente pelo algoritmo JS de filtragem */
.product-card.hidden {
  display: none !important;
}

/* Máscara de corte para efeito de zoom suave na imagem do produto */
.product-img-wrap { 
  height: 320px; 
  overflow: hidden; 
  position: relative;
}

.product-img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Gatilho de Zoom da Imagem ao passar o rato (Hover) */
.product-card:hover .product-img { 
  transform: scale(1.04); 
}

/* Área informativa inferior do produto */
.product-info { 
  padding: 2rem 1.8rem; 
}

.product-num {
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.4;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.product-name { 
  font-family: var(--font-serif); 
  font-size: 1.6rem; 
  margin-bottom: 0.8rem; 
  font-weight: 400;
}

.product-desc { 
  font-size: 0.86rem; 
  color: var(--text-muted);
  line-height: 1.7; 
}

/* Seta indicativa interativa que surge em transição lateral no hover */
.product-arrow {
  position: absolute;
  bottom: 2rem;
  right: 1.8rem;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.product-card:hover .product-arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ==========================================================================
   8. ABOUT COMPANY SECTION (SOBRE A EMPRESA)
   ========================================================================== */

/* Distribuição equilibrada em duas colunas (Texto corporativo vs Imagem/Timeline) */
.about-inner { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 6rem; 
  align-items: center; 
}

.about-text { 
  font-size: 0.92rem; 
  line-height: 1.95; 
  color: var(--text-muted);
  margin-top: 1.5rem; 
}

/* Contentor e linha estrutural esquerda da Linha Cronológica */
.timeline { 
  margin-top: 3rem; 
  border-left: 1px solid var(--border-color); 
  padding-left: 2.5rem; 
}

.timeline-item { 
  margin-bottom: 1.6rem; 
  position: relative; 
}

/* Ponto circular (marcador) posicionado sobre a linha da timeline */
.timeline-item::before { 
  content: ''; 
  position: absolute; 
  left: -2.9rem; 
  top: 0.35rem; 
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
  background: var(--text-main); 
}

.tl-year { 
  font-size: 0.75rem; 
  font-weight: 700; 
  margin-bottom: 0.2rem; 
  letter-spacing: 0.05em;
}

.tl-text { 
  font-size: 0.86rem; 
  color: var(--text-muted);
}

.about-img-wrap { 
  position: relative; 
}

.about-img { 
  width: 100%; 
  height: 520px; 
  object-fit: cover; 
}

/* Legenda minimalista flutuante no canto inferior direito da imagem */
.about-img-caption { 
  position: absolute; 
  bottom: 0; 
  right: 0; 
  background: var(--text-main); 
  color: var(--bg-main); 
  padding: 0.9rem 1.6rem; 
  font-size: 0.72rem; 
  text-transform: uppercase; 
  letter-spacing: 0.1em;
}


/* ==========================================================================
   9. ACORDEÃO FAQ (SISTEMA INTERATIVO)
   ========================================================================== */

.faq-container { 
  margin-top: 3.5rem; 
  max-width: 850px; 
}

.faq-item { 
  border-bottom: 1px solid var(--border-color); 
  padding: 1.6rem 0; 
}

/* Botão completo que serve de gatilho de abertura do item */
.faq-trigger { 
  width: 100%; 
  background: transparent; 
  border: none; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  text-align: left; 
  color: var(--text-main); 
  font-family: var(--font-serif); 
  font-size: 1.35rem; 
  cursor: pointer; 
  padding: 0.4rem 0;
  outline: none;
}

/* Ícone "+" de controlo do estado do acordeão */
.faq-icon { 
  font-size: 1.5rem; 
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  color: var(--text-muted);
}

/* Contentor de transição oculta que calcula altura máxima dinamicamente */
.faq-content { 
  max-height: 0; 
  overflow: hidden; 
  transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease; 
  opacity: 0;
}

.faq-content p { 
  padding: 1.2rem 0 0.5rem 0; 
  font-size: 0.95rem; 
  line-height: 1.7; 
  color: var(--text-muted);
}

/* Modificadores Ativos (Injetados via Javascript) */
.faq-item.active .faq-content { 
  max-height: 250px; /* Expansão controlada da janela */
  opacity: 1;
}

/* Rotação do caractere "+" para transformá-lo num "X" */
.faq-item.active .faq-icon { 
  transform: rotate(45deg); 
  color: var(--text-main);
}


/* ==========================================================================
   10. SECÇÃO CONTACTOS & FORMULÁRIO RESPONSIVO
   ========================================================================== */

/* Divisão assimétrica: Informação direta à esquerda, Formulário à direita */
.contacts-inner { 
  display: grid; 
  grid-template-columns: 1fr 1.2fr; 
  gap: 6rem; 
  align-items: flex-start;
}

.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw, 3.8rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 2.5rem;
}

.contact-title em {
  font-style: italic;
}

.contact-list { 
  display: flex; 
  flex-direction: column; 
  gap: 2rem; 
}

.contact-item { 
  display: flex; 
  gap: 1.5rem; 
  align-items: flex-start;
}

/* Caixa geométrica para enquadrar os ícones de contacto */
.contact-icon { 
  width: 46px; 
  height: 46px; 
  border: 1px solid var(--border-color); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s;
}

.contact-item:hover .contact-icon {
  border-color: var(--text-main);
  background: var(--input-focus-bg);
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-label { 
  font-size: 0.7rem; 
  text-transform: uppercase; 
  letter-spacing: 0.15em; 
  color: var(--text-muted);
  opacity: 0.6;
}

.contact-value { 
  font-size: 0.95rem; 
  line-height: 1.6;
}

.contact-value a {
  transition: opacity 0.2s;
}

.contact-value a:hover {
  opacity: 0.7;
}

/* Formulário Avançado */
.contact-form { 
  display: flex; 
  flex-direction: column; 
  gap: 1.8rem; 
}

/* Divisão horizontal em duas colunas para Nome e E-mail */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

.form-field { 
  position: relative; 
  width: 100%; 
}

/* Estilização minimalista focada na linha inferior (Border-Bottom) */
.form-field input, .form-field textarea { 
  width: 100%; 
  background: var(--input-bg); 
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 1.1rem 0.5rem; 
  color: var(--text-main); 
  font-family: var(--font-sans); 
  font-size: 0.9rem;
  outline: none;
  letter-spacing: 0.02em;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
  max-height: 420px;
}

/* Efeito Line Focus (Destaca o fundo e a linha inferior ao clicar/digitar) */
.form-field input:focus, .form-field textarea:focus { 
  border-bottom-color: var(--text-main);
  background: var(--input-focus-bg);
}

/* Estados de Validação de Erro (Injetado via JS caso o campo falhe) */
.form-field.invalid input, .form-field.invalid textarea { 
  border-bottom-color: #ff4a5a; 
}

/* Alerta de texto de erro absoluto posicionado logo abaixo do campo */
.error-msg { 
  position: absolute; 
  bottom: -1.3rem; 
  left: 0.5rem; 
  font-size: 0.72rem; 
  color: #ff4a5a; 
  display: none; 
  letter-spacing: 0.02em;
}

.form-field.invalid .error-msg { 
  display: block; 
}

/* Rodapé do Formulário */
.form-footer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Botão de Envio com comportamento interativo na seta interna */
.form-submit { 
  padding: 1.1rem 3rem; 
  background: var(--text-main); 
  color: var(--bg-main); 
  border: 1px solid var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer; 
  align-self: flex-start; 
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background 0.3s, color 0.3s;
}

.form-submit:hover {
  background: transparent;
  color: var(--text-main);
}

.form-submit .btn-arrow {
  transition: transform 0.3s ease;
}

/* Deslocação subtil da seta para a direita ao passar o rato no botão */
.form-submit:hover .btn-arrow {
  transform: translateX(5px);
}

/* Bloqueio visual do botão durante o estado de carregamento/envio */
.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mensagem de sucesso oculta que surge em FadeIn após confirmação do JS */
.form-success { 
  display: none; 
  font-size: 0.88rem; 
  color: #2ec4b6; 
  line-height: 1.5;
  border-left: 2px solid #2ec4b6;
  padding-left: 1rem;
  animation: fadeIn 0.4s ease forwards;
}


/* ==========================================================================
   11. COOKIES BANNER & RODAPÉ (FOOTER)
   ========================================================================== */

footer { 
  border-top: 1px solid var(--border-color); 
  padding: 4rem; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
  flex-wrap: wrap; 
  gap: 2rem; 
  max-width: 1400px;
  margin: 0 auto;
}

.footer-logo { 
  font-family: var(--font-serif); 
  font-size: 1.3rem; 
  font-weight: 400;
}

.footer-copy { 
  font-size: 0.76rem; 
  color: var(--text-muted);
}

.footer-links { 
  display: flex; 
  gap: 2rem; 
  font-size: 0.74rem; 
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-links a {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

/* Banner de Consentimento de Cookies fixado na base do monitor */
.cookie-banner { 
  position: fixed; 
  bottom: 0; left: 0; right: 0; 
  background: var(--bg-cards); 
  border-top: 1px solid var(--border-color); 
  padding: 1.5rem 4rem; 
  z-index: 10000; 
  transform: translateY(100%); /* Mantém-se escondido abaixo da linha de visão */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Modificador via JS: Desliza o banner para cima de forma fluida */
.cookie-banner.show { 
  transform: translateY(0); 
}

.cookie-content { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  max-width: 1400px; 
  margin: 0 auto; 
  gap: 2rem; 
}

.cookie-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cookie-buttons {
  display: flex;
  gap: 0.5rem;
}

.cookie-btn { 
  padding: 0.6rem 1.8rem; 
  border: none; 
  cursor: pointer; 
  font-size: 0.74rem; 
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--text-main); 
  color: var(--bg-main); 
}

/* Botão específico de rejeição de cookies */
.cookie-btn-decline { 
  background: transparent; 
  color: var(--text-main); 
  border: 1px solid var(--border-color); 
}


/* ==========================================================================
   12. ANIMAÇÕES & EFEITOS DE REVELAÇÃO (KEYFRAMES & SCROLL REVEAL)
   ========================================================================== */

/* Animação ciclista 3D para translação infinita horizontal do letreiro */
@keyframes marqueeContinuous {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Pequeno efeito de opacidade ascendente */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Configuração base do Scroll Reveal (Inicia invisível e deslocado) */
.reveal { 
  opacity: 0; 
  transform: translateY(30px); 
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Classe ativada via Intersection Observer quando o elemento entra na Viewport */
.reveal.visible { 
  opacity: 1; 
  transform: translateY(0); 
}

/* Escalonamento de atrasos (Delays) para criar efeitos de revelação em cascata */
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ==========================================================================
   13. PERSONALIZAÇÃO DA BARRA DE ROLAGEM LATERAL (SCROLLBAR)
   ========================================================================== */

/* 1. Motores WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px; /* Largura fina para manter o aspeto premium */
}

/* Força a calha de fundo a ser totalmente transparente */
::-webkit-scrollbar-track {
  background: transparent !important;
}

/* O indicador que se move (Branco) */
::-webkit-scrollbar-thumb {
  background-color: #ffffff;
  border-radius: 10px;
}

/* Efeito ao passar o rato (opcional, dá um feedback visual elegante) */
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.8);
}


/* 2. Suporte para Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #ffffff transparent; /* <manipulador-branco> <fundo-transparente> */
}

/* ==========================================================================
   14. ADAPTAÇÃO TOTAL PARA DISPOSITIVOS (MEDIA QUERIES)
   ========================================================================== */

/* --- TABLETS GRANDES / LAPTOPS PEQUENOS (Ajuste de Margens Seguras) --- */
@media (max-width: 1200px) {
  nav, footer, .cookie-banner, .stats-section, .products-section, .about-section, .faq-section, .contacts-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  .about-inner, .contacts-inner { gap: 4rem; }
}

/* --- TABLETS E SMARTPHONES HORIZONTAIS (Quebra estrutural para Mobile Layout) --- */
@media (max-width: 992px) {
  nav { padding: 1.2rem 2rem; }
  nav.scrolled { padding: 0.9rem 2rem; }
  
  /* Esconde os links clássicos e ativa o ecossistema do menu hambúrguer móvel */
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .mobile-menu { display: flex; }
  
  /* Conversão do painel de 4 colunas de estatísticas para uma matriz de 2x2 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
  .stat-item:nth-child(2), .stat-item:nth-child(4) { border-right: none; }
  .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }
  
  /* Catálogo assume coluna única simplificada de leitura vertical */
  .products-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .products-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .product-img-wrap { height: 280px; }
  
  /* Alinhamento empilhado (1 coluna total) para secções sobre e contactos */
  .about-inner, .contacts-inner { grid-template-columns: 1fr; gap: 4rem; }
  .about-img { height: 400px; }
  
  /* Centralização global dos elementos de encerramento */
  footer { flex-direction: column; text-align: center; gap: 1.5rem; }
  .footer-links { justify-content: center; }
  
  .cookie-content { flex-direction: column; text-align: center; gap: 1.2rem; }
  .cookie-buttons { width: 100%; justify-content: center; }
}

/* --- TELEMÓVEIS / SMARTPHONES VERTICAIS (Otimização Extrema de Inputs e CTAs) --- */
@media (max-width: 576px) {
  /* Painel de dados passa a ser uma lista vertical de leitura rápida */
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none !important; border-bottom: 1px solid var(--border-color) !important; }
  .stat-item:last-child { border-bottom: none !important; }
  
  /* Grelha de formulário perde as duas colunas; Nome e E-mail ocupam linhas individuais */
  .form-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .form-submit { width: 100%; justify-content: center; }
  
  /* Botões e CTAs expandem-se para ocupação total da largura do ecrã */
  .hero-cta { flex-direction: column; gap: 1rem; width: 100%; padding: 0 2rem; }
  .btn { width: 100%; }
}