/* =========================================================
   SERMEC GROUP — reconstrução estática (HTML5 / CSS3 / JS ES6)
   Paleta e tipografia replicadas do site original (template Joomla
   wt_cw_free): preto/branco, verde de destaque #8bc300, tipografia
   Montserrat, secções amplas (145px), rodapé escuro.
   ========================================================= */

:root{
  --accent: #8bc300;
  --accent-hover: #74a800;
  --ink: #000000;
  --body-text: #7f7f7f;
  --light-bg: #eeeeee;
  --dark-1: #111111;
  --dark-2: #1c202a;
  --dark-3: #181b24;
  --dark-muted: #8d8f98;
  --header-h: 90px;
  --container-w: 1200px;
  --section-pad: 145px;
  --font: 'Montserrat', Arial, Helvetica, sans-serif;
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--body-text);
  background: #fff;
}

h1,h2,h3,h4,h5,h6{ margin: 0; font-family: var(--font); }

img{ max-width: 100%; display: block; }

a{ color: var(--accent); text-decoration: none; }

.container{
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 2000;
}
.skip-link:focus{ left: 10px; top: 10px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  height: var(--header-h);
  background: #000;
  transition: box-shadow .35s ease;
}
.site-header.is-scrolled{
  box-shadow: 0 3px 10px rgba(0,0,0,.35);
}

.header-inner{
  max-width: var(--container-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo{ flex: 0 0 auto; display: inline-flex; align-items: center; height: 100%; }
.logo img{ max-height: 42px; width: auto; height: auto; }

.main-nav{ flex: 1 1 auto; }
.nav-list{
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.nav-link{
  display: inline-block;
  padding: 0 13px;
  line-height: var(--header-h);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #fff;
  transition: color .2s ease;
  white-space: nowrap;
}
.nav-link:hover{ color: var(--accent); }

.lang-switch{
  flex: 0 0 auto;
  display: flex;
  gap: 6px;
}
.lang-switch a{
  font-size: 12px;
  font-weight: 800;
  text-transform: lowercase;
  color: #fff;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.lang-switch a.lang-active{ background: var(--accent); color: #fff; }
.lang-switch a.lang-inactive{ opacity: .6; }
.lang-switch a.lang-inactive:hover{ opacity: 1; }

.hamburger{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px; height: 30px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.hamburger span{
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* Offcanvas mobile menu */
.offcanvas-overlay{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease;
}
.offcanvas-overlay.is-open{ opacity: 1; visibility: visible; }

.offcanvas-menu{
  position: fixed;
  top: 0; right: 0;
  width: 300px; max-width: 85vw;
  height: 100%;
  background: var(--dark-2);
  z-index: 950;
  transform: translateX(100%);
  transition: transform .35s ease;
  padding: 70px 30px 30px;
  overflow-y: auto;
}
.offcanvas-menu.is-open{ transform: translateX(0); }
.offcanvas-menu ul{ list-style: none; margin: 0; padding: 0; }
.offcanvas-menu li{ border-bottom: 1px solid rgba(255,255,255,.08); }
.offcanvas-menu .nav-link{
  display: block;
  line-height: 1;
  padding: 16px 0;
  color: #fff;
}
.offcanvas-menu .nav-link:hover{ color: var(--accent); }
.close-offcanvas{
  position: absolute;
  top: 20px; right: 20px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero{
  position: relative;
  height: 100vh;
  min-height: 620px;
  max-height: 1050px;
  overflow: hidden;
  background: #000;
}
.hero-slider{ position: relative; width: 100%; height: 100%; }

.hero-slide{
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease;
  display: flex;
  align-items: center;
}
.hero-slide.is-active{ opacity: 1; visibility: visible; }

.hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-overlay{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1;
}

.hero-content{
  position: relative;
  z-index: 2;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 30px;
  width: 100%;
  color: #fff;
  text-align: left;
}
.hero-content h1{
  font-size: clamp(34px, 6vw, 70px);
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 6px;
  letter-spacing: .01em;
}
.hero-content p{
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 400;
  margin: 0 0 20px;
  color: #f2f2f2;
}

.btn-pill{
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3rem;
  color: #fff;
  border: .2rem solid #fff;
  border-radius: 100px;
  padding: 11px 34px;
  background: transparent;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
.btn-pill:hover{
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-pill-solid{
  background-color: var(--accent);
  border-color: var(--accent);
}
.btn-pill-solid:hover{
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.hero-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0,0,0,.25);
  color: #fff;
  border: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: background-color .2s ease;
}
.hero-arrow:hover{ background: rgba(0,0,0,.55); }
.hero-arrow-prev{ left: 20px; }
.hero-arrow-next{ right: 20px; }

.hero-dots{
  position: absolute;
  bottom: 26px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 3;
}
.hero-dots button{
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.hero-dots button.is-active{ background: var(--accent); border-color: var(--accent); }

/* =========================================================
   SECTIONS — GENERIC
   ========================================================= */
.section{ padding: var(--section-pad) 0; }
.section-title{
  font-size: 35px;
  font-weight: 800;
  color: var(--ink);
  text-align: left;
  line-height: 1;
  margin: 0 0 45px;
}
.section-text p{ margin: 0 0 22px; font-size: 15px; }
.section-text strong{ color: #333; }

/* Experience */
.section-experience{ background: #fff; }
.section-experience .section-text{ max-width: 900px; }

/* Areas / gallery */
.section-gallery{ background: var(--light-bg); }
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.gallery-item{
  position: relative;
  display: block;
  overflow: hidden;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  background: #000;
  aspect-ratio: 4 / 3;
}
.gallery-item img{
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-item:hover img{ transform: scale(1.06); }
.gallery-item::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%);
  opacity: 0;
  transition: opacity .35s ease;
}
.gallery-item:hover::after{ opacity: 1; }
.gallery-item-title{
  position: absolute;
  left: 20px; right: 20px; bottom: 18px;
  color: #fff;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
  z-index: 2;
}
.gallery-item:hover .gallery-item-title{ opacity: 1; transform: translateY(0); }

/* Clients */
.section-clients{ background: #fff; }
.clients-grid{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 26px 34px;
}
.clients-grid img{
  max-height: 46px;
  width: auto;
  opacity: .85;
  transition: opacity .25s ease;
}
.clients-grid img:hover{ opacity: 1; }

/* Companies */
.section-companies{
  position: relative;
  padding: var(--section-pad) 50px;
  background-image: linear-gradient(rgba(10,10,10,.72), rgba(10,10,10,.72)), url('../assets/images/clouds.jpg');
  background-size: cover;
  background-position: 50% 50%;
  background-attachment: fixed;
  color: #fff;
}
.section-companies .section-title{
  color: #fff;
  text-align: center;
  font-size: 25px;
  font-weight: 600;
}
.companies-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.company-item img{ margin: 0 auto 18px; max-height: 90px; width: auto; padding: 10px; }
.btn-pill-outline{ border-color: #fff; }

/* Contacts */
.section-contacts{ background: #fff; }
.contacts-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.contacts-info p{ margin: 0 0 20px; font-size: 14px; }
.contacts-info strong{ color: #111; font-weight: 700; }
.email-link{ color: var(--accent); }

.contacts-form-wrap p{ font-size: 14px; margin: 0 0 20px; }

.contact-form{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}
.form-field{ margin-bottom: 16px; position: relative; }
.form-field-full{ grid-column: 1 / -1; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea{
  display: block;
  width: 100%;
  background: #fff;
  border: none;
  border-bottom: 2px solid #ddd;
  color: #7f7f7f;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 4px;
  outline: none;
  transition: border-color .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus{ border-color: var(--accent); }
.contact-form textarea{ min-height: 130px; resize: vertical; }

.form-field-checkbox label{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.form-field-checkbox input{ margin-top: 4px; }
.form-field-checkbox a{ color: var(--accent); }

.form-error{
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: #d9534f;
  margin-top: 4px;
}
.form-field.has-error .form-error{ display: block; }
.form-field.has-error input,
.form-field.has-error textarea{ border-color: #d9534f; }

.form-required-note{ grid-column: 1 / -1; font-size: 12px; margin: 0 0 10px; }
.form-submit-wrap{ text-align: left; }
.form-status{ margin-top: 14px; font-size: 13px; font-weight: 600; min-height: 18px; }
.form-status.is-success{ color: var(--accent); }
.form-status.is-error{ color: #d9534f; }

/* Map */
.section-map{ line-height: 0; background: var(--light-bg); }
.section-map iframe{ width: 100%; display: block; }

/* =========================================================
   BOTTOM + FOOTER
   ========================================================= */
.site-bottom{
  background: var(--dark-2);
  color: var(--dark-muted);
  padding: 70px 0;
}
.bottom-grid{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.bottom-col img{ max-width: 150px; }
.bottom-links{ list-style: none; margin: 0; padding: 0; }
.bottom-links li{ margin-bottom: 8px; }
.bottom-links a{ color: var(--dark-muted); font-size: 13px; }
.bottom-links a:hover{ color: #fff; }
.bottom-col-social{ text-align: right; }
.bottom-col-social a{ color: var(--dark-muted); }
.bottom-col-social a:hover{ color: #fff; }

.site-footer{
  background: var(--dark-3);
  color: var(--dark-muted);
  text-align: center;
  font-size: 12px;
  padding: 18px 0;
  margin: 0;
}
.site-footer p{ margin: 0; }

/* Scroll to top */
.scroll-top{
  position: fixed;
  right: 30px; bottom: 30px;
  width: 45px; height: 45px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: 0;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
  z-index: 400;
}
.scroll-top.is-visible{ opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover{ background: var(--accent-hover); }

/* Lightbox */
.lightbox{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox[hidden]{ display: none; }
.lightbox figure{ margin: 0; max-width: 900px; text-align: center; }
.lightbox img{ max-height: 80vh; margin: 0 auto; border-radius: 4px; }
.lightbox figcaption{ color: #fff; margin-top: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-size: 13px; }
.lightbox-close{
  position: absolute;
  top: 24px; right: 30px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px){
  :root{ --section-pad: 90px; }
  .main-nav, .lang-switch{ display: none; }
  .hamburger{ display: flex; }
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .companies-grid{ grid-template-columns: repeat(2, 1fr); }
  .contacts-grid{ grid-template-columns: 1fr; gap: 40px; }
  .bottom-grid{ grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .bottom-col-social{ text-align: center; }
}

@media (max-width: 640px){
  :root{ --section-pad: 60px; }
  .header-inner{ padding: 0 16px; }
  .gallery-grid{ grid-template-columns: 1fr 1fr; }
  .companies-grid{ grid-template-columns: 1fr 1fr; }
  .contact-form{ grid-template-columns: 1fr; }
  .section-title{ font-size: 26px; }
  .hero-arrow{ width: 38px; height: 38px; }
}

@media (max-width: 420px){
  .gallery-grid{ grid-template-columns: 1fr; }
  .companies-grid{ grid-template-columns: 1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .hero-slide, .gallery-item img, .gallery-item-title, .scroll-top{ transition: none; }
}

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
