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

:root {
  --primary-color: #472b25;
  --accent-color: #6c5551;
  --bg-color: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.section-title {
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-color);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent-color);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* NAVBAR */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-lg);
  background: rgb(71, 43, 37, 0.8);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 72px;
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.logo,
.logo a,
.logo img {
  display: flex;
  align-items: center;
}

.navbar.scrolled .logo-img {
  filter: brightness(0) invert(1);
}

.logo a {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  letter-spacing: -1px;
  margin-right: 8rem;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: #a8a8a8;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #a8a8a8 !important;
}

.nav-link.active::after {
  width: 0 !important;
}

.lang-toggle {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-toggle-wrapper {
  display: flex;
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle-mobile {
  display: none;
}

.lang-option {
  cursor: pointer;
  color: white;
  transition: color 0.3s ease;
  font-weight: 500;
}

.lang-option.active {
  color: #a8a8a8;
}

.lang-option:hover {
  color: #a8a8a8;
}

.lang-separator {
  color: var(--border-color);
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* HERO HOME */

.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.8;
}

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

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #fff;
  max-width: 800px;
  padding: 0 20px;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.cta-button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-button:hover {
  background: rgb(71, 43, 37);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SERVICES */

.services {
  padding: 6rem 0;
  background: var(--bg-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

/* NOVO */
.service-icon-img {
  width: 36px;
  height: 36px;
  display: block;
  /* se o SVG for escuro, isto “vira-o” para branco */
  filter: brightness(0) invert(1);
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.7;
}

/* PROJECTS GRID (HOME) */

.projects {
  padding: 6rem 0;
  background: #f9f9f9;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.project-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transform: translateZ(0);       /* força layer */
  backface-visibility: hidden;
  will-change: opacity;
}


.project-card:hover .project-image {
  transform: none;
}

.project-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(143, 80, 69, 0.9);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-image::after {
  content: '+';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 300;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.project-card:hover .project-image::before {
  opacity: 1;
}

.project-card:hover .project-image::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.project-overlay {
  display: none;
}

.project-info {
  padding: 1.4rem 1.5rem 1.7rem;
}

.project-info h3 {
  font-size: 1.3rem;
  margin: 0;
  color: var(--primary-color);
}

.project-info p {
  display: none;
}

/* MODAL PROJECTOS */

.project-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.project-modal.show {
  display: flex;
}

.project-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

#projectModalMedia img,
#projectModalMedia video {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  background: #000;
}

.project-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 32px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.project-modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  background: none !important;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 10px;
}

.project-modal-arrow.prev {
  left: -40px;
}

.project-modal-arrow.next {
  right: -40px;
}

.project-modal-arrow.hidden {
  display: none;
}

/* ABOUT */

.about {
  padding: 6rem 0;
  background: var(--bg-color);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  height: 500px;
  background:
    linear-gradient(135deg, rgba(143, 80, 69, 0.18), rgba(203, 110, 51, 0.15)),
    url('/content/empresa1.jpg') center/cover no-repeat;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.about-text {
  color: var(--text-color);
}

.about-intro {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

.about-text p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-light);
}

.values-list {
  list-style: none;
  margin-top: 2rem;
}

.values-list li {
  padding: 0.8rem 0 0.8rem 2rem;
  position: relative;
  color: var(--text-color);
  line-height: 1.6;
}

.values-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: 700;
  font-size: 1.2rem;
}

/* CONTACT */

.contact {
  padding: 6rem 0;
  background: #f9f9f9;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 colunas iguais */
  gap: 3rem;
  align-items: flex-start !important;  
}

.contact-form-wrapper h3,
.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.contact-form {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.error-message {
  display: block;
  color: #d32f2f;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

.submit-button {
  width: 100%;
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-button:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.success-message {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: #4caf50;
  color: #fff;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.success-message.show {
  display: block;
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.contact-info {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  text-decoration: none;
  cursor: pointer;
}

.info-text {
  color: var(--text-light);
  font-size: 1rem;
  transition: 0.3s ease;
}

.info-item:hover {
  color: var(--accent-color);
}

.info-item:hover .info-icon {
  background: var(--accent-color);
  color: #fff;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f1f1;
  color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  transition: 0.3s ease;
}

.info-text strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--primary-color);
}

.info-text p {
  color: var(--text-light);
  line-height: 1.6;
}

.social-media {
  margin-top: 1.5rem;
}

.social-media strong {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 0.6rem;
}

.social-link.social-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(143, 80, 69, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--primary-color);
  font-size: 1rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.social-link.social-circle:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
}

.map-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}



/* FOOTER DESKTOP */
.footer {
    background-color: white;
    padding: 10px 0;
    color: #4b2e28;
    font-family: "Inter", sans-serif;
}

.footer-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;      /* tudo numa só linha */
    gap: 24px;
}

/* blocos principais do footer */
.footer-left,
.footer-center,
.footer-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;    /* centra verticalmente tudo */
    justify-content: center;
    gap: 8px;
}

/* texto "© 2025 Climarsol" */
.footer-left p {
    margin: 0;
    line-height: 1;         /* mesma line-height para alinhar com a bolinha e o "by" */
    text-align: left;
    white-space: nowrap;
}

.footer-copy {
    font-size: 12px;
}

/* título "Cofinanciado por:" e afins */
.cof-title,
.by-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.cof-logos {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cof-logos img {
    height: 32px;
    display: block;
}

/* bloco da direita (se precisares mais tarde) */
.footer-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* "by: Stagelink" */
.footer-by {
    display: flex;
    align-items: center;
    gap: 2px;          /* encosta mais o logo ao "by" */
}

.footer-by span {
    font-size: 12px;
    margin: 0;
    white-space: nowrap;
    line-height: 1;    /* igual ao resto para alinhar */
}

.footer-by a {
    display: flex;
    align-items: center;
}

/* logo Stagelink centrado */
.stagelink-logo {
    height: 24px;
    display: block;
}

/* bolinha preta entre o texto e o "by" */
.footer-dot {
    font-size: 8px;
    line-height: 1;
    margin: 0 4px;
    opacity: 0.8;
    display: inline-flex;
    align-items: center;   /* centra a bolinha verticalmente */
    justify-content: center;
}



/* FOOTER MOBILE */
@media (max-width: 768px) {

  .footer-flex {
    display: flex;
    flex-wrap: wrap;          /* permite quebrar em 2 linhas */
    align-items: center;
    justify-content: center;  /* centra tudo horizontalmente */
    row-gap: 8px;
    text-align: center;
  }

  /* Linha "© 2025 Climarsol  ●  by: Stagelink" centrada */
  .footer-left {
    flex: 0 0 100%;           /* ocupa a largura toda */
    justify-content: center;  /* centra o conteúdo */
    padding: 0;
    font-size: 12px;
  }

  .footer-left .footer-copy {
    font-size: 12px;
  }

  /* Logos Centro 2030 centrados na linha abaixo */
  .footer-center {
    order: 2;                 /* vem logo a seguir à linha de cima */
    flex: 0 0 100%;
    justify-content: center;
    text-align: center;
    margin-top: 4px;
  }

  /* esconder "Cofinanciado por:" em mobile */
  .cof-title {
    display: none;
  }

  .cof-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .cof-logos img {
    height: 40px;
    margin: 0 4px;
  }

  /* caso uses footer-right noutra página, também centrado */
  .footer-right {
    flex: 0 0 100%;
    justify-content: center;
    padding: 0;
    text-align: center;
    font-size: 12px;
  }
}





/* PÁGINA PORTFÓLIO */

.projects-hero {
  position: relative;
  padding: 7rem 0 4rem;
  background:
    linear-gradient(135deg, rgba(143, 80, 69, 0.7), rgba(203, 110, 51, 0.7)),
    url('/content/heroportfolio.jpg') center/cover no-repeat;
  color: #fff;
}

.projects-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.projects-hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 720px;
}

.projects-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.projects-hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.projects-hero-subtitle {
  font-size: 1.1rem;
  max-width: 520px;
}

.projects-list-section {
  padding: 4rem 0 5rem;
  background: #f9f9f9;
}

.projects-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  border: 1px solid rgba(143, 80, 69, 0.3);
  background: #fff;
  color: var(--primary-color);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--accent-color);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

.projects-empty-state {
  text-align: center;
  color: var(--text-light);
  margin-top: 1.5rem;
}

.projects-grid .project-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.projects-actions {
  margin-top: 2rem;
  text-align: center;
}

.btn-secondary {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 6px 18px rgba(203, 110, 51, 0.35);
  transform: translateY(-2px);
}

/* PÁGINA EMPRESA */

.empresa-hero {
  position: relative;
  padding: 7rem 0 4rem;
  background:
    linear-gradient(135deg, rgba(143, 80, 69, 0.7), rgba(203, 110, 51, 0.7)),
    url('/content/fabrica.jpg') center/cover no-repeat;
  color: #fff;
}

.empresa-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.empresa-hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 720px;
}

.empresa-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.empresa-hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.empresa-hero-subtitle {
  font-size: 1.05rem;
  max-width: 540px;
}

.empresa-historia {
  padding: 4rem 0 5rem;
  background: var(--bg-color);
}

.empresa-historia-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.empresa-historia-text h2 {
  font-size: 2.1rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.empresa-historia-text p {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.empresa-historia-img{
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: transparent; /* garante que não há “box” visível */
}

.empresa-historia-img img{
  display: block;       /* remove espaços/brancas */
  width: 100%;
  height: auto;
}

.empresa-valores {
  padding: 4rem 0;
  background: #f9f9f9;
}

.empresa-valores:nth-of-type(2) {
  background: #ffffff;
}

.empresa-valores h2 {
  text-align: center;
  font-size: 2.1rem;
  color: var(--primary-color);
  margin-bottom: 2.5rem;
}

.empresa-valores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.valor-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(143, 80, 69, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.valor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-color);
}

.valor-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: var(--primary-color);
}

.valor-card p {
  color: var(--text-light);
  line-height: 1.7;
}

.empresa-metrics {
  background: #f3f0ee;
}

.empresa-metrics-grid {
  gap: 2rem;
}

.empresa-metric-card {
  text-align: center;
  border-radius: 16px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(143, 80, 69, 0.08);
  background: #ffffff;
}

.empresa-metric-card .service-icon {
  width: auto;
  min-width: 96px;
  height: 40px;
  border-radius: 999px;
  margin: 0 auto 1.2rem;
  background: #ffffff;
  border: 2px solid rgba(203, 110, 51, 0.4);
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.empresa-metric-card h3 {
  margin-bottom: 0.6rem;
}

.empresa-metric-card p {
  font-size: 0.95rem;
}

.empresa-diferenciacao {
  padding: 4rem 0 5rem;
  background: var(--primary-color);
  color: #ffffff;
}

.empresa-diferenciacao h2 {
  font-size: 2.1rem;
  margin-bottom: 1.8rem;
  text-align: left;
}

.empresa-diferenciacao .empresa-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.4rem;
}

.empresa-diferenciacao .empresa-lista li {
  position: relative;
  padding-left: 1.8rem;
  line-height: 1.8;
}

.empresa-diferenciacao .empresa-lista li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-color);
}

/* THEMES */

.theme-primary.empresa-metrics {
  background: var(--primary-color);
  color: #ffffff;
}

.theme-primary.empresa-metrics .section-title {
  color: #ffffff;
}

.theme-primary.empresa-metrics .section-title::after {
  background: var(--accent-color);
}

.theme-light.empresa-diferenciacao {
    background: #f9f9f9;   /* cinzento igual ao Contactos */
    color: var(--text-color);
}

.theme-light.empresa-diferenciacao h2 {
  color: var(--primary-color);
}

.theme-light.empresa-diferenciacao .empresa-lista li {
  color: var(--text-light);
}

/* VIDEO OVERLAY */

.video-wrapper {
  position: relative;
}

.video-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-play-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

/* HEROES INTERNOS DIMENSÃO CONSISTENTE */

.projects-hero,
.empresa-hero {
  padding: 0;
  height: 380px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}

.projects-hero-content,
.empresa-hero-content {
  width: 100%;
  padding: 7rem 0 4rem;
}

.justificado {
    text-align: justify;
}

/* RESPONSIVO GLOBAL */

@media (max-width: 968px) {
  .hamburger {
    display: flex;
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1011;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .lang-toggle-wrapper {
    display: none;
  }

  .lang-toggle-mobile {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
  }

  .lang-toggle-mobile .lang-option {
    color: var(--text-light);
  }

  .lang-toggle-mobile .lang-option.active {
    color: var(--accent-color);
  }

  .lang-toggle-mobile .lang-separator {
    color: var(--border-color);
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    gap: 1.5rem;
    z-index: 1000;
  }

  .nav-link {
    color: var(--text-color);
  }

  .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: auto;
    z-index: 1010;
    text-align: center;
    pointer-events: auto;
  }

  .logo a {
    margin: 0;
    display: inline-block;
  }

  .nav-container {
    position: relative;
    height: 70px;
    justify-content: flex-start;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-image {
    height: 300px;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .cta-button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .empresa-hero {
    padding: 6rem 0 3.2rem;
  }

  .empresa-hero-title {
    font-size: 2.3rem;
  }

  .empresa-hero-subtitle {
    font-size: 1rem;
  }

  .empresa-historia-content {
    grid-template-columns: 1fr;
  }

  .empresa-historia-img {
    order: -1;
    min-height: 260px;
  }

  .empresa-diferenciacao h2 {
    text-align: left;
  }

  /* Heroes internos em mobile + mais espaço lateral */
  .projects-hero,
  .empresa-hero {
    height: 350px;
  }

  .projects-hero-content,
  .empresa-hero-content {
    padding: 7rem 0 3rem;
    padding-left: 24px;
    padding-right: 24px;
  }

  .projects-hero-title,
  .empresa-hero-title {
    font-size: 2.1rem;
  }

  .projects-hero-subtitle,
  .empresa-hero-subtitle {
    font-size: 0.95rem;
  }
}

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

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .nav-container {
    padding: 0.8rem 15px;
  }

  .logo a {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .services,
  .projects,
  .about,
  .contact {
    padding: 4rem 0;
  }

  .empresa-hero-title {
    font-size: 2rem;
  }

  .empresa-hero-subtitle {
    font-size: 0.95rem;
  }

  .empresa-historia {
    padding: 3rem 0 4rem;
  }

  .empresa-valores {
    padding: 3rem 0;
  }

  .empresa-diferenciacao {
    padding: 3rem 0 4rem;
  }
}





#intro-logo {
    position: absolute;          /* cola ao HERO, não ao ecrã */
    bottom: 40px;                /* 40px acima do fundo do vídeo */
    left: 50%;
    transform: translateX(-50%); /* só centra na horizontal */
    opacity: 0;
    animation: fadeInOut 7s ease forwards;
    z-index: 3;                  /* acima do vídeo e overlay, mas abaixo do menu se for preciso */
}

#intro-logo img {
    width: 420px;
    height: auto;
    cursor: pointer;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}





/* LOGOS CLIENTES */

.logo-carousel {
  position: relative;
  overflow: hidden;
  margin-top: 2rem;
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 4rem; /* mesma distância entre as caixas de logo */
  width: max-content; /* importante para o JS calcular a largura */
  animation: logos-marquee var(--marquee-duration, 25s) linear infinite;
}

/* Caixa igual para todos os logos */
.logo-item {
  width: 150px;   /* podes subir para 170/180 se quiseres maior */
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* “Bigger” = caixa um pouco maior, SEM transform */
.logo-item.bigger {
  transform: scale(2);
}

/* Imagem do logo */
.logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;

  /* tudo a preto */
  filter: brightness(0) saturate(100%);
  opacity: 0.9;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Hover igual para todos (incluindo bigger) */
.logo-item:hover .logo-img {
  opacity: 1;
  transform: scale(1.05);
}

/* fades laterais tipo Stagelink */
.logo-carousel::before,
.logo-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}

.logo-carousel::before {
  left: 0;
  background: linear-gradient(to right, #ffffff, transparent);
}

.logo-carousel::after {
  right: 0;
  background: linear-gradient(to left, #ffffff, transparent);
}

@keyframes logos-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-1 * var(--loop-px, 1000px))); }
}

@media (max-width: 768px) {
  .logo-track {
    gap: 2rem;
  }

  .logo-item {
    width: 120px;
    height: 60px;
  }

  .logo-img {
    height: 32px;
  }

  #intro-logo{
    bottom: calc(130px + env(safe-area-inset-bottom)); /* sobe mais e respeita iPhone notch */
  }

  #intro-logo img{
    width: 240px;
    max-width: 80vw;
    height: auto;
  }
}

/* Espaço extra na secção */
section.clients {
  padding-top: 80px;
  padding-bottom: 80px;
}





/* SECÇÃO OS NOSSOS RECURSOS */
.resources {
  padding: 100px 0;
  background: #f9f9f9;
}

.resources .section-title {
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 50px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Card */
.resource-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-4px);
}

/* Imagem */
.resource-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #f2f2f2;
}

.resource-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.resource-card:hover img {
  transform: scale(1.06);
}

/* Título */
.resource-title {
  margin-top: 15px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
}


@media (max-width: 968px) {
  .empresa-historia-img{
    min-height: 0 !important;   /* mata a altura forçada que cria “box” */
    height: auto;
  }

  .empresa-historia-img img{
    width: 100%;
    height: auto;
    display: block;
  }
}

@media (max-width: 968px) {
  .empresa-historia-text {
    order: 1;
  }

  .empresa-historia-img {
    order: 2; /* imagem depois do texto */
  }
}


.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 99999;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

.toast.success { background: rgba(35, 120, 70, 0.95); }
.toast.error { background: rgba(160, 40, 40, 0.95); }
