/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Lato:wght@300;400;700&display=swap');

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

  /*========== Colors ==========*/
  --primary-color: #5B6236;
  --secondary-color: #E6E7E1;
  --white-color: #FFFFFF;
  --text-color: #2C2C2C;
  --text-color-light: #4A4A4A;
  --body-color: #FFFFFF;
  --container-color: #FFFFFF;

  /*========== Font and typography ==========*/
  --body-font: 'Lato', sans-serif;
  --title-font: 'Montserrat', sans-serif;
  --biggest-font-size: 3rem;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.813rem;

  /*========== Font weight ==========*/
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;

  /*========== Margins ==========*/
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;
}

/* Responsive typography */
@media screen and (max-width: 992px) {
  :root {
    --biggest-font-size: 2rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body,
button,
input,
textarea {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3 {
  color: var(--text-color);
  font-weight: var(--font-semi-bold);
  font-family: var(--title-font);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

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

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.grid {
  display: grid;
}

.section {
  padding: 6rem 0 2rem;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--text-color);
  text-align: center;
  margin-bottom: var(--mb-3);
  font-family: var(--title-font);
  font-weight: var(--font-bold);
}

.section__title span {
  color: var(--primary-color);
}

/*=============== BUTTON ===============*/
.button {
  display: inline-flex;
  align-items: center;
  column-gap: 0.5rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: var(--small-font-size);
}

.button:hover {
  background-color: #4A5230;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 98, 54, 0.3);
}

.button__icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.button:hover .button__icon {
  transform: translateX(0.25rem);
}

/*=============== HERO IMAGE ===============*/
.hero-image-section {
  height: 100vh;
  background-image: url('https://images.pexels.com/photos/1643383/pexels-photo-1643383.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/*=============== HEADER & NAV ===============*/
.header {
  width: 100%;
  background-color: var(--body-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  transition: box-shadow 0.3s ease;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo h2 {
  color: var(--text-color);
  font-weight: var(--font-bold);
  font-family: var(--title-font);
}

.nav__logo span {
  color: var(--primary-color);
}

.nav__list {
  display: flex;
  column-gap: 2rem;
}

.nav__link {
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: color 0.3s ease;
  position: relative;
  font-size: 1.25rem;
}

.nav__link:hover,
.nav__link.active-link {
  color: var(--primary-color);
}

.nav__link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -0.5rem;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active-link::after {
  width: 100%;
}

.nav__toggle,
.nav__close {
  display: none;
}

/* Change background header */
.scroll-header {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

/*=============== HOME ===============*/
.home {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--white-color) 100%);
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.home__container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: center;
  gap: 3rem;
}

.home__content {
  order: 1;
}

.home__title {
  font-size: var(--biggest-font-size);
  font-weight: var(--font-bold);
  margin-bottom: var(--mb-1);
  line-height: 1.2;
  font-family: var(--title-font);
}

.home__title span {
  color: var(--primary-color);
}

.home__description {
  margin-bottom: var(--mb-2-5);
  color: var(--text-color-light);
  line-height: 1.8;
  font-size: 1.1rem;
}

.home__button {
  margin-bottom: var(--mb-3);
}

.home__images {
  order: 2;
  position: relative;
}

.home__img {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.home__img:hover {
  transform: translateY(-10px);
}

.home__img img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.home__img:hover img {
  transform: scale(1.05);
}

.home__scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
}

.home__scroll-button {
  color: var(--text-color);
  transition: color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.home__scroll-button:hover {
  color: var(--primary-color);
}

.home__scroll-name {
  font-size: var(--smaller-font-size);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.home__scroll-arrow {
  animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.5rem);
  }
  100% {
    transform: translateY(0);
  }
}

/*=============== ABOUT ===============*/
.about {
  background-color: var(--white-color);
}

.about__container {
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
  gap: 4rem;
}

.about__data {
  order: 1;
}

.about__title {
  text-align: left;
  margin-bottom: var(--mb-2);
}

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

.about__box {
  background-color: var(--secondary-color);
  padding: 2rem;
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 510px;
}

.about__box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about__subtitle {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--primary-color);
  font-family: var(--title-font);
  font-weight: var(--font-semi-bold);
}

.about__description {
  color: var(--text-color-light);
  line-height: 1.7;
}

.about__img {
  order: 2;
  position: relative;
}

.about__img img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/*=============== PORTFOLIO ===============*/
.portfolio {
  background-color: var(--secondary-color);
}

.portfolio__container {
  max-width: 1400px;
}

.portfolio__content {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.portfolio__item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.portfolio__item:hover {
  transform: translateY(-10px);
}

.portfolio__img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.95) 100%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio__item:hover .portfolio__overlay {
  opacity: 1;
}

.portfolio__item:hover .portfolio__img {
  transform: scale(1.1);
}

.portfolio__info {
  color: var(--white-color);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.portfolio__title {
  font-size: var(--h2-font-size); /* Increased from h2 to h1 */
  margin-bottom: 0.5rem;
  font-family: var(--title-font);
  font-weight: var(--font-bold);
  text-shadow: 1px 1px 3px rgba(250, 250, 250, 0.5); /* Added text shadow for better visibility */
  color: var(--white-color);
}

.portfolio__category {
  font-size: var(--small-font-size);
  /* Removed opacity: 0.8; */
}

.portfolio__button {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 0.75rem;
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.portfolio__button:hover {
  background-color: var(--white-color);
  color: var(--primary-color);
  transform: scale(1.1);
}

/* ======== FOOTER ======== */
.footer {
  background: #f1f1f1;
  padding: 2rem 1rem;
  color: #333;
}

.footer__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.footer__title {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.footer__social-link {
  color: #333;
  margin-right: 1rem;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.footer__social-link:hover {
  color: var(--primary-color);
}

.footer__copy {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/*=============== SCROLL UP ===============*/
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  background-color: var(--primary-color);
  opacity: 0.8;
  padding: 0.5rem;
  border-radius: 0.4rem;
  z-index: var(--z-tooltip);
  transition: all 0.4s ease;
}

.scrollup:hover {
  background-color: #4A5230;
  opacity: 1;
  transform: translateY(-3px);
}

.scrollup__icon {
  color: var(--white-color);
  font-size: 1.2rem;
}

/* Show scroll */
.show-scroll {
  bottom: 5rem;
}

/*=============== MODAL ===============*/
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.show-modal {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  position: relative;
  background-color: var(--white-color);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 800px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal.show-modal .modal__content {
  transform: scale(1);
}

.modal__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--white-color);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: calc(var(--z-modal) + 1);
}

.modal__close:hover {
  color: var(--primary-color);
}

.modal__img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: var(--mb-1-5);
}

.modal__title {
  font-size: var(--h2-font-size);
  margin-bottom: var(--mb-1);
  font-family: var(--title-font);
}

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

/*=============== BREAKPOINTS ===============*/
/* For large devices */
@media screen and (max-width: 992px) {
  .container {
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
  }

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

  .home__content {
    order: 2;
    text-align: center;
  }

  .home__images {
    order: 1;
  }

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

  .about__data {
    order: 2;
  }

  .about__img {
    order: 1;
  }

  .about__img img {
    height: 400px;
  }

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

  .footer__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* For medium devices */
@media screen and (max-width: 768px) {
  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--white-color);
    padding: 6rem 2rem 2rem;
    transition: right 0.3s ease;
  }

  .nav__list {
    flex-direction: column;
    gap: 2rem;
    background-color: rgba(255, 255, 255, 0.95); /* Fundo branco opaco */
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }

  .nav__link {
    font-size: var(--h3-font-size);
  }

  .nav__close,
  .nav__toggle {
    display: block;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
  }

  .nav__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .show-menu {
    right: 0;
  }

  .section {
    padding: 4rem 0 2rem;
  }

  .home {
    padding-top: calc(var(--header-height) + 1rem);
  }

  .home__img img {
    height: 300px;
  }

  .portfolio__content {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .footer__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* For small devices */
@media screen and (max-width: 350px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }

  .home__img img {
    height: 250px;
  }

  .portfolio__content {
    grid-template-columns: 1fr;
  }
  
  .contact__form {
    padding: 2rem 1rem;
  }
}



/*=============== LIGHTBOX ===============*/
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox.show-lightbox {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  position: relative;
  width: 85vw;
  height: 85vh;
  max-width: 1400px;
  max-height: 800px;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox.show-lightbox .lightbox__content {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2.5rem;
  color: var(--white-color);
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 10; /* Increased z-index to ensure it's above the image */
  background: none;
  border: none;
}

.lightbox__close:hover {
  color: var(--primary-color);
}

.lightbox__img {
  /* A imagem se ajustará ao contêiner, mantendo a proporção */
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--white-color);
  border: none;
  padding: 1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 1.5rem;
  z-index: 1;
}

.lightbox__nav:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.lightbox__prev {
  left: 1rem;
}

.lightbox__next {
  right: 1rem;
}

/*=============== LOADING ANIMATION ===============*/
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loader::after {
  content: '';
  width: 50px;
  height: 50px;
  border: 3px solid var(--secondary-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
  border-color: var(--primary-color);
  transition: outline 0.2s ease-in-out;
}

/* ======== SERVIÇOS ======== */
.services {
  background-color: var(--light-bg);
  text-align: center;
}

.services__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service__item {
  background-color: var(--white-color);
  padding: 2rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.service__icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.service__item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.service__item p {
  font-size: 0.95rem;
  color: #444;
}

/* === CONTATO VISUAL MODERNO === */
.section-contact {
  padding: 6rem 1rem;
  background-color: #ffffff;
}

.section-contact .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section-contact h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 3rem;
  font-family: 'Montserrat', sans-serif;
}

.section-contact h2 span {
  color: #5B6236;
}

.section-contact .grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .section-contact .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.section-contact .card {
  background-color: #E6E7E1;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.section-contact .card i {
  font-size: 2rem;
  color: #5B6236;
  margin-bottom: 1rem;
}

.section-contact .card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.section-contact .card p,
.section-contact .card a {
  color: #2c2c2c;
  font-size: 1rem;
  text-decoration: none;
}

.section-contact .card a:hover {
  text-decoration: underline;
}

.section-contact .form-wrapper {
  background-color: #E6E7E1;
  border-radius: 8px;
  padding: 2rem;
}

.section-contact form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-contact label {
  display: block;
  font-weight: 500;
  color: #5B6236;
  margin-bottom: 0.5rem;
}

.section-contact input,
.section-contact textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border 0.3s ease;
}

.section-contact input:focus,
.section-contact textarea:focus {
  border-color: #5B6236;
  outline: none;
}

.section-contact button {
  background-color: #5B6236;
  color: #fff;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-contact button:hover {
  background-color: #4A5230;
}

.section-contact .contact-cards {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ======== UTILITÁRIOS DE ACESSIBILIDADE ======== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

/* ======== RESPONSIVO ======== */
@media (max-width: 768px) {
  .about__container,
  .contact__container,
  .footer__container {
    grid-template-columns: 1fr;
  }

  .services__container {
    grid-template-columns: 1fr;
  }
}