:root {
  --heading-font: "Outfit", sans-serif;
  --main-font: "Inter", sans-serif;

  --background-color: #f5f5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  background-color: var(--background-color);
  padding-bottom: 80px;
}

.page-container {
  padding: 0 10%;
}

/* Style reset */
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
  background: none;
  outline: none;
  border: none;
  padding: 0;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
  padding: 0;
  font-weight: normal;
  font-family: var(--heading-font);
}

dl,
dt,
dd {
  margin: 0;
  padding: 0;
}

figure {
  margin: 0; /* remove default browser margin */
  padding: 0; /* remove any padding */
  border: 0; /* remove any border */

  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

figcaption {
  margin: 0; /* remove default margin */
  padding: 0; /* remove default padding */
}

/* Helper styles */
.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header Styles */
header {
  position: relative;
}

header .header-text-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

header img {
  width: 100%;
  max-height: max(25vw, 250px);
}

/* Gradient overlay */
header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0) 55%
  );
}

.header-text-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 24px 56px;
  font-family: var(--heading-font);
}

.header-text-container ul {
  display: flex;
  flex-direction: row;
  column-gap: 80px;
}

.header-text-container h1 {
  cursor: default;
}

.header-text-container h1,
.header-text-container li {
  color: white;
  font-size: 24px;
}

.header-text-container a:hover,
.header-text-container a:focus {
  text-decoration: underline;
  outline: none;
}

/* estilo para link da página atual (cabecalho e rodapé) */
.header-text-container a.is-current,
.footer-nav a.is-current {
  pointer-events: none; /* impede interação */
  cursor: default;
  opacity: 0.99;
  text-decoration: underline; /* indica estado ativo */
}

/* garante comportamento de hover consistente (sem mudar visual) */
.header-text-container a.is-current:hover,
.footer-nav a.is-current:hover {
  text-decoration: underline;
}

/*   page - projects preview */
.projects-preview {
  margin-top: 48px;
}

.projects-preview {
  display: flex;
  flex-direction: column;
}

.projects-preview-photos {
  display: flex;
  flex-direction: row;
  column-gap: 16px;
  row-gap: 16px;
  margin-bottom: 16px;
  justify-content: center;
}

.projects-preview-photos img {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 50%;
}

.projects-link {
  font-family: var(--heading-font);
  font-size: 32px;
  color: #212121;
}

.projects-link:hover,
.projects-link:focus {
  text-decoration: underline;
}

.projects-link:last-of-type {
  margin-top: 32px;
}

/* Header carousel */
.carousel {
  width: 100vw;
  max-height: max(25vw, 250px);
  display: flex;
  gap: 4vw;

  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  anchor-name: --my-carousel;

  scroll-marker-group: after;
  scroll-behavior: smooth;
}

.carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.carousel::scroll-marker-group {
  position: absolute;
  position-anchor: --my-carousel;
  bottom: 36px;
  justify-self: anchor-center;

  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Bolinhas indicativas do carrossel */
li::scroll-marker {
  content: "";
  width: 9px;
  height: 9px;
  background-color: transparent;
  border: 2px solid white;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}

li::scroll-marker:target-current {
  background-color: white;
}

/* Botões de interação com carrossel */
.carousel::scroll-button(*) {
  border: 0;
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.35);

  color: white;
  opacity: 0.8;
  border-radius: 4px;
  backdrop-filter: blur(4px);

  cursor: pointer;

  position: absolute;
  position-anchor: --my-carousel;
  transition: all 0.1s;
}

.carousel::scroll-button(*):hover,
.carousel::scroll-button(*):focus {
  opacity: 1;
  background: rgba(0, 0, 0, 0.55); /* mais contraste ao passar o mouse */
}

.carousel::scroll-button(*):active {
  transform: scale(0.92);
}

.carousel::scroll-button(*):disabled {
  opacity: 0.2;
  cursor: unset;
}

.carousel li {
  flex: 0 0 100%;
  scroll-snap-align: center;
}

.carousel::scroll-button(left) {
  content: "◄";
  right: calc(anchor(left) - 70px);
  bottom: 36px;
}

.carousel::scroll-button(right) {
  content: "►";
  left: calc(anchor(right) - 70px);
  bottom: 36px;
}

/* Services */
.services {
  margin-top: 128px;
}

.services h2 {
  font-size: 48px;
  font-family: var(--heading-font);
}

.services h3 {
  color: #434343;
  font-size: 32px;
  font-family: var(--main-font);
  margin-top: 16px;
}

.services h2,
.services h3 {
  text-align: center;
}

.services-content {
  align-items: flex-start;
  margin-top: 48px;
  display: flex;
  flex-direction: row;
  column-gap: 40px;
  justify-content: center;
}

.services-content > * {
  flex: 1;
}

.services img {
  max-width: min(1000px, 100%);
  object-fit: contain;
  min-width: 300px;
}

.services dl div {
  padding: 40px;
  display: flex;
  flex-direction: column;
  row-gap: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  margin-bottom: 32px;
}

.services dl dt {
  font-family: var(--heading-font);
  color: #870f0f;
  font-size: 24px;
  letter-spacing: 3px;
}

.services dl dd {
  font-family: var(--main-font);
  color: #212121;
  font-size: 20px;
  max-width: 600px;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin-top: 40px;
  row-gap: 24px;
}

.cta h2 {
  font-size: 36px;
  font-family: var(--main-font);
  text-align: center;
  color: #434343;
}

.cta-button {
  background: linear-gradient(90deg, #007aff, #007aff); /* gradiente "sólido" */

  color: white;
  padding: 32px;
  border-radius: 8px;
  font-family: var(--main-font);
  font-size: 24px;
  font-weight: 600;
  cursor: pointer;
  min-width: 50%;

  display: flex;
  flex-direction: row;
  justify-content: center;

  transition: all 0.5s;
}

.cta-button:hover {
  background: linear-gradient(
    90deg,
    #339aff,
    #66b3ff
  ); /* gradiente mais claro */

  transform: translateY(-2px); /* levanta um pouquinho */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* sombra */
}

.instagram {
  margin-top: 96px;
}

.instagram h2 {
  text-align: center;
  font-size: 40px;
  font-family: var(--main-font);
}

.footer-divider {
  margin-top: 120px;
  margin-bottom: 120px;
  width: 100%;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
}

footer {
  display: flex;
  flex-direction: row;
  column-gap: 24px;
  padding: 0 80px;
}

.footer-nav {
  flex: 1;
  font-family: var(--heading-font);
  color: #434343;
  font-size: 32px;
}

.footer-nav .nav-items-container {
  display: flex;
  flex-direction: column;
  row-gap: 24px;
}

.nav-items-container li:hover {
  text-decoration: underline;
}

.footer-logo {
  margin-bottom: 24px;
  max-width: 40vw;
}

.footer-content {
  flex: 3;
}

.footer-phone-number {
  font-family: var(--main-font);
  color: #870f0f;
  font-size: 24px;
  font-style: normal;
}

.footer-address {
  font-family: var(--main-font);
  color: #212121;
  font-size: 16px;
  margin-top: 16px;
  font-style: italic;
}

.footer-ig {
  margin-top: 24px;
  margin-bottom: 40px;
}

footer small {
  color: #434343;
  font-family: var(--main-font);
}

small {
  display: block;
  margin-bottom: 4px;
}

/* Seção Sobre */
.secao-sobre {
  margin-top: 54px;
  margin-bottom: 152px;
  display: flex;
  flex-direction: row;
  column-gap: 40px;
  justify-content: center;
}

.secao-sobre img {
  max-width: min(520px, 80vw);
}

.sobre-title {
  font-family: var(--heading-font);
  font-size: 48px;
  color: black;
  margin-bottom: 8px;
}

.sobre-subtitle {
  font-family: var(--main-font);
  font-size: 24px;
  font-style: italic;
  color: #434343;
  margin-bottom: 32px;
}

.secao-sobre p {
  font-family: var(--main-font);
  font-size: 24px;
  color: black;
  margin-bottom: 16px;
}

/* Projetos */
.projetos-title {
  font-size: 48px;
  font-family: var(--heading-font);
  margin-top: 72px;
  margin-bottom: 48px;
  text-align: center;
}

.projetos-galeria {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  column-gap: 32px;
  row-gap: 24px;
}

.projetos-galeria figure {
  height: 100%;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.5s ease; /* Smooth zoom transition */
}

.projetos-galeria figure img {
  transition: transform 0.5s ease;
}

.projetos-galeria figure::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0); /* Starts transparent */
  transition: background 0.5s ease; /* Smooth fade-in for the overlay */
  z-index: 1;
}

.projetos-galeria figure:hover img {
  transform: scale(1.1); /* Zooms the image in by 10% */
}

.projetos-galeria figure:hover::before {
  background: rgba(
    0,
    0,
    0,
    0.4
  ); /* Fades to a semi-transparent black overlay */
}

.projetos-galeria figcaption {
  position: absolute;
  width: 100%;
  z-index: 30;

  font-family: var(--heading-font);
  color: white;
  font-size: 24px;
  padding: 20px 32px;

  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);

  /* transição mais suave e menos intensa */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.18) 0%,
    rgba(0, 0, 0, 0.08) 35%,
    rgba(0, 0, 0, 0.02) 60%,
    transparent 100%
  );
  backdrop-filter: blur(1px); /* efeito de desfoque mais sutil */
}

.projetos-galeria figure {
  flex: 1 1 calc(50% - 32px); /* 2 columns, accounting for gap */
  box-sizing: border-box;
}

.projetos-galeria img {
  max-width: 100%;
  height: auto;
  display: block; /* removes inline-gap below image */
  object-fit: cover; /* keeps aspect ratio, can crop if container is fixed height */
}

#gallery {
  column-count: 3; /* número de colunas */
  column-gap: 10px;
}

#gallery img {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px;
  display: block;
}

/* Smooth transitions for switching between projects overview and single project view */
.section-galeria-projetos,
.project-gallery {
  /* opacity transitions are handled in JS via class toggles; this provides the CSS side */
  transition: opacity 320ms ease, transform 320ms ease;
}

.fade-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.fade-out {
  opacity: 0 !important;
  transform: translateY(8px) !important;
}

.project-gallery .project-title {
  font-size: 32px;
  margin-top: 80px;
  margin-bottom: 24px;
}

.project-gallery .project-description {
  margin-bottom: 32px;
  line-height: 180%;
  font-size: 24px;
  color: #3f3f3f;
}

.project-gallery .projects-link {
  font-size: 30px;
  margin-bottom: 32px;
  display: block;
}

.lazy-img-wrapper {
  background: #eee; /* placeholder */
  overflow: hidden;
}

.lazy-img-wrapper img {
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-img-wrapper img.loaded {
  opacity: 1;
}

@media (max-width: 1024px) {
  .services-content {
    flex-direction: column;
    align-items: center;
    row-gap: 32px;
  }

  .secao-sobre {
    flex-direction: column;
    row-gap: 40px;
  }

  .secao-sobre img {
    align-self: center;
  }

  .sobre-title,
  .sobre-subtitle {
    text-align: center;
  }
}

/* Estilos exclusivos de device médio */
@media (min-width: 601px) and (max-width: 1024px) {
  footer {
    padding: 0 32px;
    justify-content: space-between;
    column-gap: 0;
  }

  .footer-content {
    flex: 1;
  }
}

/* Styles shared between Tablet and Mobile viewport */
@media (max-width: 800px) {
  .header-text-container {
    padding: 24px 32px;
  }

  .header-text-container ul {
    column-gap: 40px;
  }

  .header-text-container h1,
  .header-text-container li {
    font-size: 24px;
  }

  .projetos-title {
    font-size: 40px;
    margin-top: 40px;
  }

  .secao-sobre img {
    max-width: 60%;
  }

  .secao-sobre {
    margin-bottom: 80px;
  }
}

/* Mobile viewport styles */
@media (max-width: 600px) {
  .header-text-container h1,
  .header-text-container li {
    color: white;
    font-size: 20px;
  }

  .header-text-container {
    padding: 16px;
  }

  .header-text-container ul {
    column-gap: 0px;
    flex-direction: column;
    row-gap: 8px;
  }

  .projects-preview {
    margin-top: 24px;
  }

  .projects-preview-photos img {
    width: 100%;
    max-width: 100%;
  }

  .projects-preview-photos {
    flex-direction: column;
    align-items: center;
  }

  .projects-link {
    font-size: 20px;
  }

  .services {
    margin-top: 64px;
  }

  .services h2 {
    font-size: 24px;
  }

  .services h3 {
    font-size: 20px;
  }

  .services dl dt {
    font-size: 20px;
  }

  .services dl dd {
    font-size: 16px;
  }

  .cta h2 {
    font-size: 24px;
  }

  .cta-button {
    padding: 20px 40px;
    border-radius: 8px;
    font-size: 16px;
  }

  .secao-sobre img {
    max-width: 80%;
  }

  .footer-nav {
    font-size: 24px;
  }

  .footer-divider {
    margin-top: 60px;
    margin-bottom: 60px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  .footer-logo {
    margin: 48px 0;
    width: 100%;
    max-width: 100%;
  }

  .footer-nav {
    text-align: center;
    margin-bottom: 48px;
  }

  .secao-sobre {
    row-gap: 24px;
    margin-bottom: 80px;
  }

  .secao-sobre p:first-of-type {
    margin-top: 24px;
  }

  .secao-sobre p {
    font-size: 20px;
  }

  .sobre-title {
    font-size: 24px;
  }

  .sobre-subtitle {
    margin-top: 12px;
    font-size: 16px;
  }

  .sobre p {
    font-size: 16px;
  }

  .projetos-galeria figure {
    flex: 1 1 100%;
  }

  .projetos-galeria figcaption {
    font-size: 16px;
    padding: 16px;
  }

  .projetos-title {
    font-size: 32px;
    margin-top: 40px;
    margin-bottom: 32px;
  }

  .project-gallery .project-title {
    font-size: 24px;
    margin-top: 40px;
  }

  .project-gallery .project-description {
    font-size: 16px;
  }

  .project-gallery .projects-link {
    font-size: 20px;
  }

  #gallery {
    column-count: 2; /* número de colunas */
    column-gap: 8px;
  }
}

.ig-btn.gradient {
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f58529, #dd2a7b 40%, #8134af 80%);
  box-shadow: 0 6px 20px rgba(130, 60, 160, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}
.ig-btn.gradient:active {
  transform: translateY(1px) scale(0.995);
}
