/* =====================
   Variáveis & Reset
===================== */
:root {
  --primary: #000000;
  --secondary: #1a1a1a;
  --accent: #f0c793;
  --text: #ffffff;
  --muted: #aaa;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--primary);
  color: var(--text);
  line-height: 1.6;
}

/* Make images fluid by default to avoid overflow on small screens */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================
   Backgrounds
===================== */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  background: #25d366;
  border-radius: 50%;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-float img {
  width: 32px;
  height: 32px;
  display: block;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}
.home-bg {
  position: relative;
  /* use a properly quoted URL to avoid backslash escaping issues */
  background: url("footages/background oficial.png") center center/cover no-repeat;
  width: 100%;
  min-height: 100vh;
  z-index: 0;
}
.home-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #161616a2;
  z-index: 1;
  pointer-events: none;
}
.home-bg > * {
  position: relative;
  z-index: 2;
}

/* =====================
   Navbar
===================== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0rem 5vw;
  background-color: var(--secondary);
  position: relative;
  z-index: 10;
}
.nav-logo img {
  margin-top: -3rem;
  margin-bottom: -3rem;
  height: 12rem;
  width: auto;
  transform: scale(1.3);
  transition: transform 0.3s;
}
.nav-links {
  display: flex;
  gap: 1.7rem;
  font-size: 1.2rem;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--accent);
}
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.bar {
  height: 3px;
  width: 25px;
  background-color: var(--text);
  margin: 4px 0;
}
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9;
}

/* =====================
   Header / Hero
===================== */
header {
  padding: 5rem;
  text-align: right;
  margin-bottom: -3.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 1.1rem;
}
header img {
  margin-bottom: 2rem;
  max-width: 200px;
  height: auto;
  align-self: flex-end;
}
header h1 {
  font-size: 2.2rem;
  line-height: 1.3;
}
header .impact {
  /* scale smoothly between small and large screens */
  font-size: clamp(2.8rem, 6vw + 0.5rem, 6.1rem);
  font-weight: bolder;
  background: linear-gradient(90deg, #fd821a, #f0c793);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  margin-top: -1.5rem;
}
.cta-button {
  display: inline-block;
  background: #fd821a;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 16px #0002;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  margin-top: 1.5rem;
  cursor: pointer;
  letter-spacing: 0.01em;
}
.cta-button:hover {
  background: #ff4c29;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px #0003;
}

/* ---------- Carrossel de Serviços ---------- */
.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
}

.logo-carousel-section h2 {
  font-size: 1.5rem;
}

.services-carousel {
  display: flex;
  gap: 33px;
  transition: transform 0.4s ease;
}

.service-card {
  background: #181818;
  border-radius: 18px;
  padding: 2rem 2rem 1.5rem 2rem;
  flex: 0 0 270px;
  box-shadow: 0 2px 24px #0003;
  color: #fff;
  border: 2px solid #ff7a3a22;
  position: relative;
  transition: box-shadow 0.2s;
}

/* título e texto dentro do card */
.carousel-container {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  max-width: 1000px;
  display: flex;
  align-items: center;
}

.services-carousel {
  display: flex;
  gap: 33px;
  transition: transform 0.4s ease;
}
.service-card {
  flex: 0 0 calc((1000px - 66px) / 3);
  background: #181818;
  border-radius: 18px;
  padding: 2rem 2rem 1.5rem 2rem;
  box-shadow: 0 2px 24px #0003;
  color: #fff;
  border: 2px solid #ff7a3a22;
  position: relative;
  transition: filter 0.3s, transform 0.3s;
}

/* Blur padrão */
.service-card {
  transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
  filter: blur(3px);
  opacity: 0.55;
  transform: scale(0.97);
}
.service-card.active {
  filter: none;
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* setas (posicionadas absoluto para não atrapalhar o fluxo) */
.carousel-arrow {
  background: #ff783a00;
  color: #ff783a;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  font-size: 3rem;
  cursor: pointer;
  margin: 0 1rem;
  transition: background 0.2s;
  box-shadow: 0 2px 12px #0002;
  z-index: 2;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.carousel-arrow:hover {
  background: #ff783a22;
}
.carousel-arrow.left { left: -20px; }
.carousel-arrow.right { right: -20px; }

.carousel-arrow[disabled],
.carousel-arrow.disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* responsividade */
@media (max-width: 1000px) {
  .carousel-container { padding: 0 18px; }
  .service-card { flex: 0 0 240px; }
  /* se preferir esconder as setas no mobile: uncomment */
  /* .carousel-arrow { display: none; } */
}

@media (max-width: 600px) {
  .service-card { flex: 0 0 200px; padding: 1.4rem; }
}

/* =====================
   About
===================== */
#about {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1rem;
  text-align: center;
  background-color: #0800772a;
  border-radius: 20px;
  transition: transform 3s ease, box-shadow 5s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

#about:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.774);
}

#about h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

#about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
}

/* =====================
   Portfolio
===================== */
.services-title {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 10px;
}
.portfolio-link img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.portfolio-link:hover img {
  transform: scale(1.08);
}

.services-underline {
  margin: 0 auto 30px auto;
}
.portfolio-section {
  padding: 80px 20px;
  background: #1c1c1c;
  text-align: center;
}

.portfolio-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  color: #fff;
}

.portfolio-underline {
  width: 80px;
  height: 4px;
  background: #9b5cff;
  margin: 0 auto 40px auto;
  border-radius: 2px;
}

.portfolio-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.portfolio-card {
  flex: 1;
  min-width: 280px;
  max-width: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  background: #111;
}

.portfolio-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* =====================
   Logo Carousel
===================== */
.logo-carousel-section {
  padding: 2.5rem 0;
  text-align: center;
}

.logo-carousel-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.logo-carousel {
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0002;
  padding: 1.5rem 0;
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  animation: logo-scroll 20s linear infinite;
  width: max-content;
}

.logo-track img {
  height: 190px;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.2);
  opacity: 0.92;
  transition: filter 0.3s, opacity 0.3s;
  padding: 0 1rem;
}

.logo-track img:hover {
  filter: none;
  opacity: 1;
}

@keyframes logo-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 900px) {
  .logo-track img {
    height: 50px;
    max-width: 120px;
    padding: 0 0.5rem;
  }
  .logo-carousel {
    padding: 1rem 0;
  }
}

/* =====================
   Footer
===================== */
footer {
  background-color: #000;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

/* =====================
   MOBILE ADAPTAÇÃO
===================== */
@media (max-width: 800px) {
  /* Navbar mobile: logo menor e menu não sobrepõe */
  .navbar {
    padding: 0.5rem 2vw;
    height: 60px;
    min-height: 60px;
  }
  .nav-logo img {
    height: 200px;
    margin: 0;
    transform: none;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--secondary);
    position: absolute;
    top: 60px;
    left: 0;
    gap: 1.2rem;
    font-size: 1.1rem;
    padding: 1rem 0;
    z-index: 20;
  }
  .nav-links.active {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  .menu-overlay.active {
    display: block;
  }

  /* Header mobile */
  header {
    padding: 2rem 1rem;
    text-align: center;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 0;
  }
  header img {
    max-width: 120px;
    margin: 0 auto 1rem auto;
    align-self: center;
  }
  header h1 {
    font-size: 1.5rem;
    text-align: center;
  }
  header .impact {
    font-size: 2.8rem;
    margin-top: 0.5rem;
    text-align: center;
  }
  .cta-button {
    font-size: 1rem;
    padding: 12px 24px;
    margin-top: 1rem;
  }

  /* Carrossel mobile: cartões maiores */
  .logo-track img {
    height: 200px;
    max-width: 250vw;
  }

  .carousel-container {
    padding: 0 8px;
    max-width: 300px;
    overflow-x: auto;
  }
  .services-carousel {
    gap: 16px;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 8px 4px;
    touch-action: pan-x;
  }
  .services-carousel::-webkit-scrollbar { height: 8px; }
  .services-carousel::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }

  .carousel-container .services-carousel .service-card {
    flex: 0 0 100vw;
    max-width: 100vw;
    margin: 0;
    filter: none;
    opacity: 1;
    transform: scale(1);
    display: block;
    scroll-snap-align: center;
    padding: 2.5rem;
  }
  /* hide arrows on mobile when using native scroll */
  .carousel-arrow { display: none; }
}
