/* ================================================================
   FERSOL – Premium Industrial Website  |  Light/White Theme
   Cores: Azul #1D3A84 (CTAs/links) | Vermelho #D31E24 (urgente)
   ================================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --red:          #D31E24;
  --red-dark:     #A8181D;
  --blue:         #1D3A84;
  --blue-dark:    #122566;
  --blue-lt:      #2A4FA0;
  --blue-xlt:     #EEF2FA;

  /* UI Light Theme */
  --white:        #FFFFFF;
  --off-white:    #F7F8FC;
  --surface:      #F0F3F9;
  --surface2:     #E8EDF7;
  --border:       #DDE2EF;
  --border-lt:    #ECF0F8;

  /* Text */
  --text-dark:    #0D1526;
  --text-mid:     #3A4565;
  --text-muted:   #6E7A99;
  --text-light:   #9AA3BC;

  /* Hero overlay */
  --hero-overlay: rgba(8, 18, 42, 0.55);

  /* Shadows */
  --shadow-sm:    0 2px 12px rgba(29,58,132,0.08);
  --shadow-md:    0 6px 28px rgba(29,58,132,0.12);
  --shadow-lg:    0 16px 56px rgba(29,58,132,0.14);
  --shadow-blue:  0 4px 20px rgba(29,58,132,0.28);

  /* Fonts */
  --font-head:    'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-body:    'Inter', 'Segoe UI', Arial, sans-serif;

  --radius:       6px;
  --radius-lg:    12px;
  --radius-xl:    20px;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-dark);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--blue); color: #fff; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}
h1 { font-size: clamp(2.8rem, 5.5vw, 5rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.1rem; letter-spacing: 0.01em; }

.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.75rem;
}
.label::before { content: '▮ '; font-size: 0.5em; vertical-align: middle; }

/* ---------- LAYOUT ---------- */
.container { width: 100%; max-width: 1260px; margin: 0 auto; padding: 0 2rem; }
.section  { padding: 100px 0; }
.section-sm { padding: 60px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

/* ---------- DIVIDERS ---------- */
.divider { width: 48px; height: 3px; background: var(--blue); border-radius: 2px; margin: 1.25rem 0; }
.divider-center { margin: 1.25rem auto; }
.divider-red { background: var(--red); }

/* ================================================================
   NAVBAR
================================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
  padding: 0;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 20px rgba(29,58,132,0.10);
  backdrop-filter: blur(12px);
}
#navbar.scrolled .nav-links a { color: var(--text-mid); }
#navbar.scrolled .nav-links a:hover,
#navbar.scrolled .nav-links a.active { color: var(--blue); }
#navbar.scrolled .logo-text-fer { color: var(--red); }
#navbar.scrolled .logo-text-sol { color: var(--blue); }
#navbar.scrolled .logo-tagline { color: var(--text-muted); }
#navbar.scrolled .nav-toggle span { background: var(--text-dark); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  padding: 0 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo */
.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-svg-wrap { display: flex; align-items: center; gap: 0.4rem; }

/* Imagem PNG do logo */
.logo-img {
  height: 88px;
  width: auto;
  display: block;
  object-fit: contain;
  /* Sobre fundo transparente (hero escuro): logo visível normalmente */
  filter: brightness(0) invert(1);  /* branco puro no hero */
  transition: filter var(--transition);
}
/* Quando navbar fica branca: mostrar logo a cores originais */
#navbar.scrolled .logo-img {
  filter: none;
}

/* Footer logo */
.footer-logo-img {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);  /* branco no footer escuro */
  opacity: 0.9;
  margin-bottom: 1rem;
}

/* Manter compatibilidade com texto fallback (não usado se imagem carrega) */
.logo-text-fer {
  color: var(--red);
  font-family: var(--font-head);
  font-size: 1.85rem; font-weight: 900;
  font-style: italic; letter-spacing: -0.03em;
  line-height: 1;
}
.logo-text-sol {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.85rem; font-weight: 900;
  font-style: italic; letter-spacing: -0.03em;
  line-height: 1;
}
#navbar.scrolled .logo-text-sol { color: var(--blue); }
.logo-tagline {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  line-height: 1.3;
  transition: color var(--transition);
  margin-top: 0.1rem;
}
#navbar.scrolled .logo-tagline { color: var(--text-muted); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: '';
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 2px;
  background: var(--red);
  border-radius: 2px;
}
#navbar.scrolled .nav-links a.active { color: var(--blue); }
#navbar.scrolled .nav-links a.active::after { background: var(--blue); }

/* Nav CTA */
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  display: block;
  transition: var(--transition);
}

/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.875rem 1.875rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

/* Blue – primary */
.btn-blue {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: var(--shadow-blue);
}
.btn-blue:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(29,58,132,0.38);
}

/* Blue outline */
.btn-blue-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-blue-outline:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

/* Red – urgência APENAS */
.btn-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  animation: pulse-red 2.2s infinite;
}
.btn-red:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
  animation: none;
  box-shadow: 0 8px 28px rgba(211,30,36,0.4);
}
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(211,30,36,0.45); }
  50% { box-shadow: 0 0 0 10px rgba(211,30,36,0); }
}

/* White (hero overlay) */
.btn-white {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
  font-weight: 800;
}
.btn-white:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

/* White outline (hero) */
.btn-white-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.55);
}
.btn-white-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.btn-lg  { font-size: 0.9rem;  padding: 1rem 2.25rem; }
.btn-xl  { font-size: 1rem;    padding: 1.15rem 2.75rem; border-radius: 50px; }
.btn-pill { border-radius: 50px; }

/* Navbar btn (ghost dark/light adaptive) */
.btn-nav-ghost {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.5);
  color: #fff;
  background: transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
/* Estado normal – sobre vídeo escuro: hover branco */
.btn-nav-ghost:hover { border-color: #fff; background: rgba(255,255,255,0.12); color: #fff; }

/* Estado scrolled – navbar branca: cor cinza */
#navbar.scrolled .btn-nav-ghost {
  border-color: var(--border);
  color: var(--text-mid);
}
/* Estado scrolled – hover: outline + texto vermelho */
#navbar.scrolled .btn-nav-ghost:hover {
  border-color: var(--red);
  color: var(--red);
  background: transparent;
}

/* ================================================================
   HERO SECTION  –  Video Background + Tipografia estilo referência
================================================================ */
#hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #08122A; /* fallback */
}

/* Vídeo background */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

/* Overlay escuro sobre o vídeo */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8,18,42,0.42) 0%, rgba(8,18,42,0.68) 100%);
  z-index: 1;
}

/* Vinheta nas bordas (como referência) */
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%, transparent 50%, rgba(4,10,28,0.55) 100%);
  z-index: 2;
}

/* Grid lines – desactivado */
.hero-grid-lines { display: none; }

/* Conteúdo hero */
.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Badge topo */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50px;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.07);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.8s infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.25;} }

/* Tipografia hero – mistura serif italic + condensed bold (como referência) */
.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 2.5rem;
  line-height: 1;
  color: #fff;
}
.hero-line {
  display: block;
  line-height: 1.05;
}
/* Linha sans-serif bold (estilo "Grand", "Annual race") */
.hl-bold {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(3.5rem, 7.5vw, 7.5rem);
  letter-spacing: -0.03em;
  color: #fff;
  text-transform: uppercase;
}
/* Linha serif italic elegante (estilo "regatta.", "elite yachts") */
.hl-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(2.8rem, 6vw, 6rem);
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.92);
}
/* Linha mixed – word inline */
.hl-mixed {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4em;
  flex-wrap: wrap;
}

/* CTAs do hero */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Meta info lateral (localização / data) – como referência */
.hero-meta {
  position: absolute;
  bottom: 2.5rem;
  left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 2.5rem;
  pointer-events: none;
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.65);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: all;
}
.hero-meta-item i { color: rgba(255,255,255,0.45); font-size: 0.75rem; }

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.45);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-arrow {
  width: 26px; height: 26px;
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: bounce 2s infinite;
}
.scroll-arrow::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid rgba(255,255,255,0.5);
  border-bottom: 1.5px solid rgba(255,255,255,0.5);
  transform: rotate(45deg);
  margin-top: -3px;
}
@keyframes bounce {
  0%,100%{transform:translateY(0);} 50%{transform:translateY(5px);}
}

/* ================================================================
   SECTION HEADERS
================================================================ */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header.left { text-align: left; }
.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 1rem auto 0;
  line-height: 1.75;
}
.section-header.left p { margin: 1rem 0 0; }

/* ================================================================
   WHO WE ARE
================================================================ */
#who-we-are {
  background: var(--off-white);
  border-top: 1px solid var(--border-lt);
  border-bottom: 1px solid var(--border-lt);
  padding: 90px 0;
}
.who-intro {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-mid);
  line-height: 1.85;
}
.who-intro strong { color: var(--text-dark); }
.who-intro .accent-blue { color: var(--blue); font-weight: 700; }

.cert-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.cert-badge {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.cert-badge .ci { color: var(--blue); }

.who-visual {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.who-visual::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-lt));
}
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.kpi-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--off-white);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.kpi-item:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.kpi-num {
  font-family: var(--font-head);
  font-size: 2.5rem; font-weight: 900;
  color: var(--text-dark); line-height: 1;
}
.kpi-num .accent { color: var(--blue); }
.kpi-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 0.35rem;
}

/* ================================================================
   SERVICES
================================================================ */
#services { background: var(--white); padding: 100px 0; }

.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }

.service-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--blue);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  border-color: rgba(29,58,132,0.25);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 56px; height: 56px;
  background: var(--blue-xlt);
  border: 1.5px solid rgba(29,58,132,0.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  transition: background var(--transition);
}
.service-card:hover .service-icon { background: rgba(29,58,132,0.15); }
.service-icon i { color: var(--blue); font-size: 1.4rem; }

.service-card h3 { font-size: 1.2rem; color: var(--text-dark); margin-bottom: 0.7rem; }
.service-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 1.5rem; }

.service-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-mid);
  padding: 0.3rem 0.65rem;
  border-radius: 3px;
}

/* ================================================================
   BRANDS STRIP
================================================================ */
#brands {
  background: var(--off-white);
  border-top: 1px solid var(--border-lt);
  border-bottom: 1px solid var(--border-lt);
  padding: 50px 0;
}
.brands-label {
  text-align: center;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 2rem;
}
.brands-grid {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center;
  gap: 0.75rem;
}
.brand-pill {
  display: flex; align-items: center; gap: 0.45rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.brand-pill:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-md);
}
.brand-pill i { color: var(--blue); font-size: 0.7rem; }

/* ================================================================
   WHY FERSOL
================================================================ */
#why-fersol {
  background: var(--white);
  border-top: 1px solid var(--border-lt);
  padding: 100px 0;
}
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.why-item {
  padding: 2rem 1.75rem;
  background: var(--off-white);
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--border);
  transition: all var(--transition);
}
.why-item:hover {
  border-left-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  background: var(--white);
}
.why-item-icon {
  width: 52px; height: 52px;
  background: var(--blue-xlt);
  border: 1.5px solid rgba(29,58,132,0.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.why-item-icon i { color: var(--blue); font-size: 1.3rem; }
.why-item h4 { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.5rem; }
.why-item p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.75; }

/* ================================================================
   PORTFOLIO PREVIEW
================================================================ */
#portfolio-preview { background: var(--off-white); padding: 100px 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(29,58,132,0.2);
}
.project-img {
  height: 220px; background-size: cover; background-position: center;
  position: relative; overflow: hidden;
}
.project-img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13,21,38,0.7) 100%);
}
.project-img-overlay {
  position: absolute; inset: 0;
  background: rgba(29,58,132,0.15);
  opacity: 0; transition: opacity var(--transition); z-index: 1;
}
.project-card:hover .project-img-overlay { opacity: 1; }
.project-content { padding: 1.5rem; }
.project-cat {
  font-size: 0.67rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 0.5rem;
}
.project-content h3 { font-size: 1.05rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.project-content p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

/* ================================================================
   CTA BANNER
================================================================ */
.cta-banner {
  background:
    linear-gradient(135deg, rgba(18,37,102,0.82) 0%, rgba(29,58,132,0.72) 100%),
    url('../images/bg-cta-ocean.jpg') center/cover no-repeat;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: transparent; /* grelha removida, imagem já tem textura */
}
.cta-banner .container { position: relative; z-index: 1; }
.cta-banner-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-banner h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); color: #fff; margin-bottom: 0.5rem; }
.cta-banner p { color: rgba(255,255,255,0.75); font-size: 1rem; }
.cta-banner-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ================================================================
   PAGE HERO (páginas internas)
================================================================ */
.page-hero {
  padding: 160px 0 80px;
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 100%);
  position: relative;
  overflow: hidden;
}
/* Grelha removida – ::before vazio */
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: transparent;
}

/* Hero exclusivo da página Sobre Nós – foto de bússola naval */
.page-hero--sobre {
  background:
    linear-gradient(160deg, rgba(8,18,50,0.78) 0%, rgba(18,37,102,0.65) 100%),
    url('../images/bg-sobre-compass.jpg') center/cover no-repeat;
}

/* Hero exclusivo da página Portefólio – foto do cais */
.page-hero--portfolio {
  background:
    linear-gradient(160deg, rgba(6,14,38,0.75) 0%, rgba(18,37,102,0.60) 100%),
    url('../images/bg-portfolio-pier.jpg') center/cover no-repeat;
}

/* Hero exclusivo da página Contactos – vista aérea de barcos no mar */
.page-hero--contactos {
  background:
    linear-gradient(160deg, rgba(6,14,38,0.72) 0%, rgba(18,37,102,0.58) 100%),
    url('../images/bg-contactos-aerial.jpg') center/cover no-repeat;
}

.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin-bottom: 1rem; }
.page-hero p { font-size: 1.1rem; color: rgba(255,255,255,0.78); max-width: 620px; }
.page-hero .label { color: rgba(255,255,255,0.6); }
.page-hero .label::before { color: rgba(255,255,255,0.4); }
.page-hero .divider { background: rgba(255,255,255,0.4); }

/* ================================================================
   ABOUT PAGE SPECIFICS
================================================================ */
.value-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex; gap: 1.25rem; align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.value-card:hover { border-color: rgba(29,58,132,0.25); box-shadow: var(--shadow-md); transform: translateX(4px); }
.value-icon-wrap {
  width: 46px; height: 46px; min-width: 46px;
  background: var(--blue-xlt);
  border: 1.5px solid rgba(29,58,132,0.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}
.value-icon-wrap i { color: var(--blue); font-size: 1.1rem; }
.value-card h4 { font-size: 0.97rem; color: var(--text-dark); margin-bottom: 0.35rem; }
.value-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

.spec-list { display: flex; flex-direction: column; gap: 0.65rem; }
.spec-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  font-size: 0.875rem; color: var(--text-mid);
  transition: border-color var(--transition);
}
.spec-item:hover { border-color: rgba(29,58,132,0.3); }
.spec-item i { color: var(--blue); width: 16px; text-align: center; flex-shrink: 0; margin-top: 0.15rem; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.team-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.team-card:hover { border-color: rgba(29,58,132,0.25); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.team-icon {
  width: 64px; height: 64px;
  background: var(--blue-xlt);
  border: 1.5px solid rgba(29,58,132,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  margin: 0 auto 1.25rem;
}
.team-icon i { color: var(--blue); font-size: 1.4rem; }
.team-card h4 { font-size: 0.97rem; color: var(--text-dark); margin-bottom: 0.35rem; }
.team-card p { font-size: 0.845rem; color: var(--text-muted); line-height: 1.65; }

.infra-block {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.infra-block::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-lt));
}

.norm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.norm-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.norm-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.norm-code { font-family: var(--font-head); font-size: 2rem; font-weight: 900; color: var(--blue); line-height: 1; margin-bottom: 0.5rem; }
.norm-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.55; }

/* ================================================================
   PORTFOLIO PAGE
================================================================ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: center; margin-bottom: 3rem; }
.filter-btn {
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 0.6rem 1.35rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }

.portfolio-full-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.portfolio-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.portfolio-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(29,58,132,0.2); }
.portfolio-img { height: 200px; background-size: cover; background-position: center; position: relative; }
.portfolio-img-label {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 3px; color: #fff;
}
.label-engine  { background: var(--blue); }
.label-vessel  { background: #1A5C8A; }
.label-frc     { background: #C46B0A; }
.label-electrical { background: #1E7A48; }

.portfolio-info { padding: 1.5rem; }
.portfolio-info h3 { font-size: 1.05rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.portfolio-info p { font-size: 0.845rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1rem; }
.portfolio-meta { display: flex; gap: 1rem; flex-wrap: wrap; }
.meta-item {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-light);
}
.meta-item .icon { color: var(--blue); }

/* ================================================================
   CONTACT PAGE
================================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: start; }
.contact-info-block { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.contact-card:hover { border-color: rgba(29,58,132,0.25); box-shadow: var(--shadow-md); }
.contact-card-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.contact-card h4 { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.5rem; }
.contact-card a, .contact-card p { font-size: 1rem; font-weight: 600; color: var(--text-dark); display: block; line-height: 1.6; transition: color var(--transition); }
.contact-card a:hover { color: var(--blue); }
.contact-card .sub { font-size: 0.78rem; font-weight: 400; color: var(--text-muted); margin-top: 0.25rem; }

.whatsapp-section {
  background: #F0FBF4;
  border: 1.5px solid #B8EBCb;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.whatsapp-section .wa-icon { font-size: 2.75rem; color: #25D366; margin-bottom: 1rem; }
.whatsapp-section h4 { font-size: 1rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.whatsapp-section p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.btn-wa {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: #25D366; color: #fff;
  padding: 0.85rem 1.75rem; border-radius: var(--radius);
  font-weight: 700; font-size: 0.875rem; letter-spacing: 0.06em; text-transform: uppercase;
  transition: all var(--transition);
}
.btn-wa:hover { background: #1ebe5a; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,0.3); }

.contact-form-wrap {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
}
.contact-form-wrap h3 { font-size: 1.6rem; color: var(--text-dark); margin-bottom: 0.4rem; }
.contact-form-wrap > p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-mid); margin-bottom: 0.5rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dark);
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,58,132,0.1);
  background: var(--white);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select option { background: #fff; color: var(--text-dark); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.urgency-strip {
  background: #FFF5F5;
  border: 1.5px solid rgba(211,30,36,0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 3rem;
}
.urgency-strip-text h3 { font-size: 1.05rem; color: var(--text-dark); margin-bottom: 0.25rem; }
.urgency-strip-text p { font-size: 0.85rem; color: var(--text-muted); }
.urgency-strip-btns { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.map-wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
}
.map-wrap iframe { width: 100%; height: 400px; display: block; }

.faq-item { border-bottom: 1px solid var(--border-lt); padding: 1.25rem 0; }
.faq-question {
  font-size: 0.95rem; font-weight: 600; color: var(--text-dark);
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-question:hover { color: var(--blue); }
.faq-icon { color: var(--blue); flex-shrink: 0; transition: transform var(--transition); }
.faq-answer {
  font-size: 0.875rem; color: var(--text-muted); line-height: 1.75;
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding-top 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; padding-top: 0.75rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

.contact-success {
  display: none;
  background: #F0FBF4;
  border: 1px solid #B8EBCb;
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: #1E7A48;
  font-size: 0.925rem;
  margin-top: 1.5rem;
}
.contact-success.show { display: block; }
.contact-success a { color: var(--blue); font-weight: 700; }

/* ================================================================
   FOOTER
================================================================ */
#footer {
  background: var(--text-dark);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 70px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.footer-brand p {
  font-size: 0.875rem; color: rgba(255,255,255,0.45);
  line-height: 1.8; margin: 1.25rem 0; max-width: 280px;
}
.footer-logo-fer { color: var(--red); font-family: var(--font-head); font-size: 1.85rem; font-weight: 900; font-style: italic; letter-spacing: -0.03em; }
.footer-logo-sol { color: rgba(255,255,255,0.85); font-family: var(--font-head); font-size: 1.85rem; font-weight: 900; font-style: italic; letter-spacing: -0.03em; }
.footer-col h5 {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); margin-bottom: 1.25rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { font-size: 0.875rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-col ul a:hover { color: #fff; }
.footer-contact-item {
  display: flex; gap: 0.65rem; align-items: flex-start;
  margin-bottom: 0.75rem; font-size: 0.85rem; color: rgba(255,255,255,0.55);
}
.footer-contact-item .icon { color: var(--blue); filter: brightness(1.6); flex-shrink: 0; margin-top: 0.1rem; }
.footer-contact-item a { color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-contact-item a:hover { color: #fff; }
.footer-bottom {
  padding: 1.5rem 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { font-size: 0.78rem; color: rgba(255,255,255,0.3); }
.footer-bottom a { color: rgba(255,255,255,0.3); transition: color var(--transition); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }
.footer-flags { font-size: 0.75rem; color: rgba(255,255,255,0.3); }

/* ================================================================
   FLOATING CTA
================================================================ */
.emergency-float {
  position: fixed; bottom: 2rem; right: 2rem;
  z-index: 999;
  display: flex; flex-direction: column; gap: 0.65rem; align-items: flex-end;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.emergency-float a {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 1.2rem;
  border-radius: 50px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  transition: all var(--transition);
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.float-whatsapp { background: #25D366; color: #fff; }
.float-whatsapp:hover { background: #1ebe5a; transform: scale(1.04); }
.float-phone { background: var(--red); color: #fff; animation: pulse-red 2.5s infinite; }
.float-phone:hover { background: var(--red-dark); animation: none; transform: scale(1.04); }
.float-icon { font-size: 1.05rem; }

/* ================================================================
   SCROLL ANIMATIONS
================================================================ */
.fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-in { opacity: 0; transition: opacity 0.7s ease; }
.fade-in.visible { opacity: 1; }

.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }

/* ================================================================
   UTILITIES
================================================================ */
.text-blue    { color: var(--blue); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-muted); }
.text-white   { color: #fff; }
.text-center  { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1100px) {
  .grid-4          { grid-template-columns: repeat(2, 1fr); }
  .footer-grid     { grid-template-columns: 1fr 1fr; }
  .norm-grid       { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid-2           { grid-template-columns: 1fr; }
  .grid-3           { grid-template-columns: 1fr 1fr; }
  .services-grid    { grid-template-columns: 1fr; }
  .why-grid         { grid-template-columns: 1fr 1fr; }
  .portfolio-grid   { grid-template-columns: 1fr 1fr; }
  .portfolio-full-grid { grid-template-columns: 1fr 1fr; }
  .team-grid        { grid-template-columns: 1fr 1fr; }
  .contact-grid     { grid-template-columns: 1fr; }
  .cta-banner-inner { flex-direction: column; text-align: center; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 80px; left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    padding: 1.5rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open a { color: var(--text-mid) !important; }
  .nav-links.open a:hover { color: var(--blue) !important; }
  .nav-cta.open {
    display: flex; flex-direction: column;
    position: absolute; top: 0; left: 0; right: 0;
    padding: 0 1.5rem 1.5rem;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
  }

  /* Hero mobile */
  .hl-bold  { font-size: clamp(2.8rem, 9vw, 5rem); }
  .hl-serif { font-size: clamp(2.2rem, 7vw, 4rem); }
  .hero-meta { display: none; }
}
@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .grid-3  { grid-template-columns: 1fr; }
  .grid-4  { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-full-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .why-grid  { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .emergency-float { bottom: 1rem; right: 1rem; }
  .emergency-float a span.label-text { display: none; }
  .emergency-float a { padding: 0.75rem; }
  .hero-scroll { display: none; }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }
