/* Styles/CSS/design.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,500;1,500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400..700;1,400..700&family=Montserrat:ital,wght@0,900;1,900&display=swap');
@import url("https://use.typekit.net/TEU_KIT.css"); /* mantido */

/* === UNIVERSAL FIX === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Centragem base (mantida) */
body,
header,
.hero,
footer,
h1,
h2,
h3,
h4,
h5,
h6,
p,
li {
  text-align: center;
}

:root {
  --clr: #000000;
  --footer-h: 80px;   /* altura do footer fixo */
  --slider-h: 550px;  /* altura do slider em desktop */
}

/* ================= Loader ================= */
#loading {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  background: #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

#loading .loading-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#loading .loading-ring {
  width: 200px;
  height: 200px;
  border: 0px solid #000000;
  border-radius: 50%;
  position: absolute;
}

#loading .ring1 {
  border-bottom-width: 8px;
  border-color: rgb(158, 0, 158);
  animation: rotate1 2s linear infinite;
}

#loading .ring2 {
  border-bottom-width: 8px;
  border-color: rgb(0, 255, 255);
  animation: rotate2 2s linear infinite;
}

#loading .ring3 {
  border-bottom-width: 8px;
  border-color: rgb(255, 255, 255);
  animation: rotate3 2s linear infinite;
}

#loading .loading {
  top: calc(100% + 10px);
  color: #ffffff;
  font-family: "Arimo", sans-serif;
}

@keyframes rotate1 {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
  }
}

@keyframes rotate2 {
  0% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
  }
}

@keyframes rotate3 {
  0% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
  }
}

/* ================= Base ================= */
body {
  margin: 0;
  background: #EFE8D8;
  font-family: "pragmatica-condensed", sans-serif;
  font-weight: 900;
  font-style: normal;
}

/* ================= Navbar ================= */
nav {
  font-family: "pragmatica", sans-serif;
  width: 100%;
  padding: 1rem 5%;
  background: #F3EDE3;
  border-bottom: 1px solid #000000;
  box-shadow: 0 5px 15px #000000;
  backdrop-filter: blur(15px);
  margin-bottom: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Navbar e dropdowns acima do slider */
header,
nav {
  position: relative;
  z-index: 3000;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: -5px;
  margin-left: auto;
  align-items: center;
  background: #000000;
}

.nav-links li {
  display: inline-block;
  position: relative;
}

.nav-links li a {
  position: relative;
  font-size: 1.05rem;
  font-weight: 500;
  color: #3E2F22;
  transition: 0.3s;
  display: block;
  padding: 20px 50px;
  text-decoration: none;
  text-align: center;
}

.nav-links li ul.dropdown li {
  display: block;
  align-items: center;
}

.nav-links li ul.dropdown li a {
  align-items: center;
  text-align: center;
  color: #F4EFE3;
}

.nav-links li ul.dropdown {
  width: 100%;
  background: #000000;
  position: absolute;
  display: none;
}

/* Dropdown acima do slider */
nav .nav-links li > ul.dropdown {
  position: absolute;
  z-index: 4000;
}

/* HOVER DA NAVBAR */
.nav-links > li > a:hover {
  background: #E6DCC3;
  color: #2B1F16;
  text-shadow: 0 0 10px #2B1F16;
  border-radius: 6px;
}

/* HOVER DO DROPDOWN (SERVICES / INDUSTRIES) */
.nav-links li ul.dropdown a:hover {
  background: #3A2C20;   /* tom mais claro que o fundo #2E2218 */
  color: #F4EFE3;        /* texto claro */
  text-shadow: 0px 0px 20px #F4EFE3;     /* não fica bom com fundo escuro */
  border-radius: 6px;      /* dropdowns não usam bordas arredondadas */
}

.nav-links li.lang-switch ul.dropdown-lang li a .flag-icon {
  width: 20px;
  height: 20px;
}

/* HOVER DO DROPDOWN DAS BANDEIRAS */
.nav-links li.lang-switch ul.dropdown-lang li a:hover {
  background: #3A2C20;  /* igual ao hover do dropdown principal */
  color: #F4EFE3;       /* mantém claro, caso uses texto algum dia */
  text-shadow: 0px 0px 20px #F4EFE3;
  border-radius: 6px;
}

.nav-links li:hover > ul.dropdown {
  display: block;
}

/* ======== Correção de layout header ======== */
nav.main-nav > .logo-link {
  order: 1;
}

nav.main-nav > .nav {
  order: 2;
}

/* === FULL FIXES APPEND === */
header nav,
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 8px;
}

nav .logo {
  flex: 0 0 auto;
}

nav .nav-links {
  display: flex;
  gap: 12px;
  margin-left: auto;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  background: transparent !important;
}

nav .nav-links li {
  display: inline-flex;
}

nav .nav-links li a {
  padding: 8px 14px !important;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: left;
}

nav .nav-links li ul.dropdown {
  right: 0;
  left: auto;
}

.nav-links {
  gap: 12px !important;
}

.nav-links li a {
  padding: 8px 14px !important;
}

/* Dropdown centrado por baixo do item */
nav .nav-links li {
  position: relative;
}

nav .nav-links li > ul.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  min-width: 220px;
  max-width: 80vw;
  padding: 8px 0;
  background: #2E2218;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  text-align: center;
  z-index: 1000;
}

nav .nav-links li:hover > ul.dropdown {
  display: block;
}

nav .nav-links li ul.dropdown li {
  display: block;
}

nav .nav-links li ul.dropdown a {
  display: block;
  padding: 10px 16px;
  white-space: nowrap;
  line-height: 1.2;
  text-align: center;
}

/* neutralizar heranças antigas */
.nav-links li ul.dropdown {
  left: 50% !important;
  right: auto !important;
  width: auto !important;
}

.nav-links li ul.dropdown li a {
  text-align: center !important;
}

/* ================= Títulos / texto ================= */
h1 {
  text-align: center;
  font-size: 2.7rem;
}

p {
  font-family: "pragmatica-condensed", sans-serif;
  font-weight: 900;
  font-style: normal;
}

/* ================= Slider ================= */
.slider {
  width: 1920px;
  max-width: 100vw;
  height: var(--slider-h);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  z-index: 1; /* slider abaixo da navbar/dropdowns */
}

.slider-list {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  width: max-content;
  transition: left 1s ease-in-out;
  overflow: hidden;
}

.slider-list .slider-item {
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
}

.slider-list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-buttons {
  position: absolute;
  top: 45%;
  left: 5%;
  width: 90%;
  display: flex;
  justify-content: space-between;
  z-index: 6;
}

.slider-buttons button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #ffffff55;
  color: #ffffff;
  border: none;
  font-family: monospace;
  font-weight: bold;
  transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.slider-buttons button:hover {
  transform: scale(1.5);
  color: #ffffff;
  background-color: #000000;
  opacity: 0.5;
}

.dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  z-index: 5;
}

.dots li {
  list-style: none;
  width: 12px;
  height: 12px;
  background-color: #ffffff;
  margin: 15px;
  border-radius: 20px;
  transition: 0.3s ease;
  cursor: pointer;
}

.dots li.active {
  width: 30px;
}

/* ================= Secção após o slider ================= */
/* Sem “altura de ecrã”: a secção tem só a altura do conteúdo (elimina o vazio) */
.hero.after-slider {
  position: relative;
  display: block;
  padding: 24px 5vw 40px;
  min-height: 150px; /* remove o esticar até ao fim do viewport */
}

/* Título no canto superior esquerdo (logo abaixo do slider) */
.hero.after-slider h1 {
  font-size: 60px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  text-align: left !important;
}

/* Parágrafo no fluxo normal (sem absolute), justificado */
.hero.after-slider p {
  position: absolute;
  top: 70%;
  left: 53%;
  transform: translateY(-50%);    /* centra apenas verticalmente */
  margin: 0;
  width: min(45vw, 70ch);         /* largura responsiva e legível */
  text-align: justify !important;   /* conteúdo alinhado à direita */
  line-height: 1.35;
  font-size: clamp(16px, 1.2vw + 0.5rem, 28px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ================= Responsivo ================= */
@media screen and (max-width: 768px) {
  .slider {
    height: 400px;
  }
  .hero.after-slider {
    padding: 20px 5vw 36px;
  }
  .hero.after-slider p {
    width: min(88vw, 70ch);
    margin: clamp(12px, 5vh, 40px) auto 0;
  }
}

/* ================= Footer ================= */
footer {
  margin-top: 40px;
  background: #111111;
  color: white;
  padding: 25px;
  text-align: center;
  font-family: "Arimo", sans-serif;
  font-weight: 400;
}

/* Footer fixo */
body {
  padding-bottom: var(--footer-h);
}

footer#contacts,
footer,
#footer,
.footer,
[role="contentinfo"],
[class*="footer"] {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  z-index: 9999;
  border-top: 1px solid #e9e9ee;
  background: #1D1610;
  color: #ffffff;
  font-size: 14px;
}

footer#contacts :is(p, ul, ol),
footer :is(p, ul, ol),
#footer :is(p, ul, ol),
.footer :is(p, ul, ol) {
  margin: 0;
}

/* === Language flags dropdown (separate in navbar) === */
.nav-links {
  display: flex;
  align-items: center;
}

.nav-links > li.lang-switch {
  position: relative;
  margin-right: auto; /* empurra os outros itens para a direita, bandeiras ficam mais à esquerda */
}

.nav-links > li.lang-switch > a.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
}

.flag-icon {
  width: 22px;
  height: 22px;
  border-radius: 2px;
  display: block;
  object-fit: cover;
}

/* dropdown de bandeiras */
.nav-links li.lang-switch > ul.dropdown-lang {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 6px 8px;
  list-style: none;
  background: #2E2218;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: none;
  z-index: 2000;
}

.nav-links li.lang-switch:hover > ul.dropdown-lang {
  display: block;
}

.nav-links li.lang-switch ul.dropdown-lang li a {
  display: block;
  padding: 4px;
}

.nav-links li.lang-switch ul.dropdown-lang li a .flag-icon {
  width: 20px;
  height: 20px;
}