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

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  width: 100%;
  height: auto;
}

/*========== VARIABLES ==========*/
/*========== VARIABLES ==========*/
:root {
  --header-height: 4.5rem;

  /* colors - Fire Tattoo */
  --base-color: #ff5e00;
  /* Fire Orange */
  --base-color-second: hsl(0, 0%, 15%);
  /* Darker Gray */
  --base-color-alt: #ff1100;
  /* Dark Fire Red */
  --title-color: hsl(0, 0%, 95%);
  /* White/Off-white */
  --text-color: hsl(0, 0%, 75%);
  /* Light Gray */
  --text-color-light: hsl(0, 0%, 98%);
  --body-color: hsl(0, 0%, 8%);
  /* Deep Black */

  /* font size */
  --title-font-size: 1.875rem;
  --subtitle-font-size: 1rem;
  --title-font: 'Poppins';
  --body-font: 'DM Sans';
}

/*============= BASE ============*/
html {
  scroll-behavior: smooth;
}

body {
  font: 400 1rem var(--body-font), sans-serif;
  color: var(--text-color);
  background-color: var(--body-color);
  -webkit-font-smoothing: antialiased;
}



.title {
  font: 700 var(--title-font-size) var(--title-font), sans-serif;
  color: var(--title-color);
  -webkit-font-smoothing: auto;
}

.button {
  background-color: var(--base-color);
  color: var(--text-color-light);
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 2rem;
  border-radius: 0.25rem;
  font: 500 1rem var(--body-font), sans-serif;
  transition: background 0.3s;
}

.button:hover {
  background: var(--base-color-alt);
}

.divider-1 {
  height: 2px;
  background: linear-gradient(270deg, var(--base-color), var(--base-color-alt), transparent);
  box-shadow: 0 0 12px var(--base-color);
}

.divider-2 {
  height: 2px;
  background: linear-gradient(90deg, var(--base-color), var(--base-color-alt), transparent);
  box-shadow: 0 0 12px var(--base-color);
}

/*============== FIRE EFFECTS ==============*/
.fire-text {
  color: #fff;
  text-shadow: 
    0px -1px 2px rgba(255, 255, 255, 0.4),
    0px -1px 4px rgba(255, 152, 0, 0.3),
    0px -2px 6px rgba(255, 51, 0, 0.2),
    0px -3px 10px rgba(255, 0, 0, 0.1);
  animation: fireFlicker 4s infinite alternate;
}

@keyframes fireFlicker {
  0%, 100% {
    text-shadow: 
      0px -1px 2px rgba(255, 255, 255, 0.4),
      0px -1px 4px rgba(255, 152, 0, 0.3),
      0px -2px 6px rgba(255, 51, 0, 0.2),
      0px -3px 10px rgba(255, 0, 0, 0.1);
  }
  50% {
    text-shadow: 
      0px -1px 2px rgba(255, 255, 255, 0.5),
      0px -1px 6px rgba(255, 186, 0, 0.4),
      0px -2px 8px rgba(255, 69, 0, 0.3),
      0px -4px 12px rgba(204, 0, 0, 0.2);
  }
}

/*============ LAYOUT ===========*/
.container {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.section {
  padding: calc(5rem + var(--header-height)) 0;
}

.section .title {
  margin-bottom: 1rem;
}

.section .subtitle {
  font-size: var(--subtitle-font-size);
}

.section header {
  margin-bottom: 4rem;
}

.section header strong {
  color: var(--base-color);
}

#header {
  border-bottom: solid 1px #333;
  margin-bottom: 2rem;
  display: flex;

  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: var(--body-color);
  width: 100%;
}

#header.scroll {
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.15);
}

/*============= LOGO ============*/
.logo {
  font: 700 1.31rem var(--title-font), sans-serif;
  color: var(--title-color);
}

.logo span {
  color: var(--base-color);
}

.logo-alt span {
  color: var(--body-color);
}

/*========== NAVIGATION =========*/
nav {
  height: var(--header-height);
  /* rem → root element */
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

nav ul li {
  text-align: center;
}

nav ul li a {
  transition: color 0.3s;
  position: relative;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--base-color);
}

nav ul li a::after {
  content: '';
  width: 0%;
  height: 2px;
  background: var(--base-color);

  position: absolute;
  left: 0;
  bottom: -1.5rem;

  transition: width 0.2s;
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

nav .menu {
  opacity: 0;
  visibility: hidden;
  top: -20rem;
  transition: 0.2s;
}

nav .menu ul {
  display: none;
}

/* Show menu */
nav.show .menu {
  opacity: 1;
  visibility: visible;

  background: var(--body-color);

  height: 100vh;
  width: 100vw;

  position: fixed;
  top: 0;
  left: 0;

  display: grid;
  place-content: center;
}

nav.show .menu ul {
  display: grid;
}

nav.show ul.grid {
  gap: 4rem;
}

/* Toggle menu */
.toggle {
  color: var(--base-color);
  font-size: 1.5rem;
  cursor: pointer;
}

nav .icon-close {
  visibility: hidden;
  opacity: 0;

  position: absolute;
  top: -1.5rem;
  right: 1.5rem;

  transition: 0.2s;
}

nav.show div.icon-close {
  visibility: visible;
  opacity: 1;
  top: 1.5rem;
}

/*============= HOME ============*/
#home {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

#home::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 0;
  width: 100%;
  height: 80%;
  background: radial-gradient(ellipse at bottom, rgba(255, 69, 0, 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.6; }
  100% { opacity: 1; transform: scale(1.05); }
}


#home .image {
  position: relative;
  margin-top: 3rem;
  order: 1;
}

#home .image::before {
  content: '';
  height: 100%;
  width: 100%;
  background: var(--base-color-second);
  position: absolute;
  top: 10%;
  left: 10%;
  z-index: 0;
}

#home .image img {
  position: relative;
  height: 350px;
  /* Reduzido verticalmente */
  object-fit: cover;
  /* Mantém proporção cortando excesso */
  box-shadow: 0 10px 25px rgba(255, 94, 0, 0.3), 0 5px 15px rgba(255, 17, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#home .image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 94, 0, 0.4), 0 8px 25px rgba(255, 17, 0, 0.5);
}

#home .image img,
#home .image::before {
  border-radius: 0.25rem;
}

#home .text {
  text-align: center;
  order: 0;
}

#home .text h1 {
  margin-bottom: 1rem;
}

#home .text p {
  margin-bottom: 2rem;
}

/*============= ABOUT ===========*/
#about {
  background: var(--base-color-second);
}

#about .image {
  position: relative;
  order: 1;
}

#about .image::before {
  content: '';
  height: 100%;
  width: 100%;
  background: var(--base-color-second);
  position: absolute;
  top: 10%;
  left: -10%;
  z-index: 0;
}

#about .image img {
  position: relative;
  height: 350px;
  /* Reduzido verticalmente */
  object-fit: cover;
  /* Mantém proporção cortando excesso */
  box-shadow: 0 10px 25px rgba(255, 94, 0, 0.3), 0 5px 15px rgba(255, 17, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#about .image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 94, 0, 0.4), 0 8px 25px rgba(255, 17, 0, 0.5);
}

#about .image img,
#about .image::before {
  border-radius: 0.25rem;
}

#about .text {
  margin-top: 2rem;
  /* Texto movido para baixo */
  order: 0;
}

/*========== SERVICES ===========*/
/*Colocada Por EU*/
#services {
  padding-top: 6rem;
  padding-bottom: 7rem;
  margin-left: 1.5rem;
  margin-right: 1.5rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#services::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 0;
  width: 100%;
  height: 80%;
  background: radial-gradient(ellipse at bottom, rgba(255, 69, 0, 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 3s infinite alternate;
}

#services header {
  margin-bottom: 0.2rem;
  /* Reduz o espaço */
}

.cards .grid {
  gap: 1.5rem;
}

.card {
  padding: 3.625rem 2rem;
  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.5);
  background-color: var(--base-color-second);
  border-bottom: 0.25rem solid var(--base-color);
  border-radius: 0.25rem 0.25rem 0 0;
  text-align: center;
}

.card i {
  display: block;
  margin-bottom: 1.5rem;
  font-size: 5rem;
  color: var(--base-color);
}

.card .title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.service-img {
  width: 100%;
  max-width: 300px;
  border-radius: 1rem;
  margin-top: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Força as imagens da secção de serviços a ficarem lado a lado */
.service-images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  /* permite ajustar em ecrãs pequenos */
  margin-top: 2rem;
}

.service-images img {
  width: 30%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.service-images img:hover {
  transform: scale(1.03);
}



/*======== TESTIMONIALS =========*/
#testimonials {
  background: var(--base-color-second);
}

#testimonials header {
  margin-bottom: 4.5rem;
}

#testimonials blockquote {
  padding: 3rem 2rem;
  background-color: #1a1a1a;
  box-shadow: 0 10px 25px rgba(255, 94, 0, 0.15), 0 5px 15px rgba(255, 17, 0, 0.2);
  background: linear-gradient(145deg, #262626, #1a1a1a);
  border-radius: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

#testimonials blockquote:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(255, 94, 0, 0.25), 0 8px 25px rgba(255, 17, 0, 0.3);
}

#testimonials blockquote p {
  position: relative;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  /* Move text down */
  color: var(--title-color);
  font-style: italic;
  z-index: 1;
}

#testimonials blockquote p span {
  font: 700 5rem serif;
  position: absolute;
  top: -3.5rem;
  /* Move quotes higher up */
  left: 0;
  right: 0;
  margin: auto;
  /* Center efficiently if width is auto */
  color: var(--base-color);
  opacity: 0.2;
  z-index: -1;
}

#testimonials cite {
  display: flex;
  justify-content: center;
  /* Center align */
  align-items: center;
  font-style: normal;
  color: var(--text-color);
  font-weight: bold;
  font-size: 1.1rem;
}

.stars {
  color: var(--base-color);
  margin-top: auto;
  /* Push to bottom if content varies */
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  text-align: center;
}

/* Swiper and Grid */
.testimonials.grid {
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .testimonials.grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial {
  display: flex;
  height: 100%;
}

.swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.swiper-slide {
  height: auto;
  padding: 4rem 1rem;
  display: flex;
}

.swiper-pagination-bullet-active {
  background: var(--base-color);
}

/*========== CONTACT ============*/
#contact {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

#contact::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 0;
  width: 100%;
  height: 80%;
  background: radial-gradient(ellipse at bottom, rgba(255, 69, 0, 0.15) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 3s infinite alternate;
}

#contact .grid {
  gap: 4rem;
}

#contact p {
  margin-bottom: 2rem;
}

#contact .button i,
#contact ul li i {
  font-size: 1.5rem;
  margin-right: 0.625rem;
}

#contact ul.grid {
  gap: 2rem;
}

#contact ul li {
  display: flex;
  align-items: center;
}

#contact ul li i {
  color: var(--base-color);
}

#contact ul li a {
  color: var(--text-color);
  transition: color 0.3s;
  display: flex; /* Ensure icon and text align */
  align-items: center;
}

#contact ul li a:hover {
  color: var(--base-color);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
  /* Indicates clicking will close */
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  object-fit: contain;
  /* Garante que a imagem não estica */
  cursor: default;
  /* Image logic separate if needed */
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--text-color-light);
  font-size: 2rem;
  cursor: pointer;
  z-index: 10001;
}

/*=========== FOOTER ============*/
footer {
  background: var(--base-color-second);
  border-top: 1px solid #333;
}

footer.section {
  padding: 4rem 0;
}

footer .logo {
  display: inline-block;
  margin-bottom: 1.5rem;
}

footer .brand p {
  color: var(--text-color-light);
  margin-bottom: 0.75rem;
}

footer i {
  font-size: 1.5rem;
  color: var(--text-color-light);
}

footer .social {
  grid-auto-flow: column;
  width: fit-content;
}

footer .social a {
  transition: 0.3s;
  display: inline-block;
}

footer .social a:hover {
  transform: translateY(-5px);
  font-size: 2rem;
}

/* Back to home button */
.back-to-home {
  background: var(--base-color);
  color: var(--text-color-light);
  position: fixed;
  right: 2rem;
  /* Movido para a esquerda */
  bottom: 1rem;
  font-size: 1.5rem;
  padding: 0.5rem;
  clip-path: circle();
  visibility: hidden;
  opacity: 0;
  transition: 0.3s;
  transform: translateY(150%);
}

.back-to-home.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/*======== MEDIA QUERYS =========*/
/*
  Para dispositivos com resolução > 1200px
*/
@media (min-width: 1200px) {
  .container {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
  }

  .section {
    padding: 10rem 0;
  }

  .section header,
  #testimonials header {
    max-width: 32rem;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .button {
    height: 3.125rem;
  }

  nav .menu {
    opacity: 1;
    visibility: visible;
    top: 0;
  }

  nav .menu ul {
    display: flex;
    gap: 2rem;
  }

  nav .menu ul li a.title {
    font: 400 1rem var(--body-font), sans-serif;
    -webkit-font-smoothing: antialised;
  }

  nav .menu ul li a.title.active {
    font-weight: bold;
    -webkit-font-smoothing: auto;
  }

  nav .icon-menu {
    display: none;
  }

  /* layout */
  main {
    margin-top: var(--header-height);
  }

  /* home */
  #home .container {
    grid-auto-flow: column;
    justify-content: space-between;
    max-width: 100%;
    margin: 0;
    padding-left: calc(50vw - 560px);
    padding-right: 0; /* Move encostado à direita */
  }

  #home .image {
    order: 1;
    transform: translateX(2rem); /* Empurra a imagem ainda mais para a direita */
  }

  #home .text {
    order: 0;
    max-width: 24rem;
    text-align: left;
  }

  /* about */
  #about .container {
    grid-auto-flow: column;
    margin: 0 auto;
  }

  #about .image {
    order: 0;
  }

  #about .text {
    order: 1;
  }

  /* services */
  .cards {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .card {
    padding-left: 3rem;
    padding-right: 3rem;
  }

  /* testimonials */
  #testimonials .container {
    margin-left: auto;
    margin-right: auto;
  }

  /* contact */
  #contact .container {
    grid-auto-flow: column;
    align-items: center;
  }

  #contact .text {
    max-width: 25rem;
  }

  /* footer */
  footer.section {
    padding: 3.75rem 0;
  }

  footer .container {
    grid-auto-flow: column;
    align-items: center;
    justify-content: space-between;
  }

  footer .logo {
    font-size: 2.25rem;
  }
}

.swiper-slide img {
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


/*
  Para dispositivos com resolução > 992px
*/
@media (min-width: 992px) {
  :root {
    --title-font-size: 2.25rem;
    --subtitle-font-size: 1.125rem;
  }

  #home .image {
    transform: translateX(-1.5rem);
    margin-top: 0;
  }

  #home .image::before {
    top: -16.8%;
    left: 16.8%;
  }

  #home .image img {
    right: 0;
    top: -2.5rem;
    height: 550px;
  }

  #about .image::before {
    top: -8.3%;
    left: -33%;
  }

  #about .image img {
    height: 550px;
  }

  /* layout */
  main {
    margin-top: var(--header-height);
  }

  /* home */
  #home .container {
    grid-auto-flow: column;
    justify-content: space-between;
    margin: 0 auto;
  }

  #home .image {
    order: 1;
  }

  #home .text {
    order: 0;
    max-width: 24rem;
    text-align: left;
  }

  /* about */
  #about .container {
    grid-auto-flow: column;
    margin: 0 auto;
  }

  #about .image {
    order: 0;
  }

  #about .text {
    order: 1;
  }

  /* services */
  .cards {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* testimonials */
  #testimonials .container {
    margin-left: auto;
    margin-right: auto;
  }

  /* contact */
  #contact .container {
    grid-auto-flow: column;
    align-items: center;
  }

  #contact .text {
    max-width: 25rem;
  }

  /* footer */
  footer.section {
    padding: 3.75rem 0;
  }

  footer .container {
    grid-auto-flow: column;
    align-items: center;
    justify-content: space-between;
  }

  footer .logo {
    font-size: 2.25rem;
  }
}

/*
  Para dispositivos com resolução < 992px
*/
@media (max-width: 991px) {

  /* services */
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}

/*
  Para dispositivos com resolução < 762px
*/
@media (max-width: 762px) {
  #home .text p {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* services */
  .cards {
    grid-template-columns: 1fr;
  }
}