.portfolio-page {
  background: #F5F1E8;
  color: #30352d;
}

/* HERO */

.portfolio-hero {
  min-height: 78vh;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 140px 24px 90px;

  background-image: url("../assets/images/portfolio-hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  overflow: hidden;
}

.portfolio-hero-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.38),
      rgba(0, 0, 0, 0.16),
      rgba(245, 241, 232, 0.16)
    );
}

.portfolio-hero-content {
  width: min(900px, 100%);

  position: relative;
  z-index: 1;

  text-align: center;
}

.portfolio-hero-content span {
  display: block;

  margin-bottom: 16px;

  color: #F5F1E8;

  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portfolio-hero-content h1 {
  margin: 0 auto 22px;

  color: #ffffff;

  font-family: "Playfair Display", serif;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  font-weight: 500;
  line-height: 1.02;
}

.portfolio-hero-content p {
  max-width: 640px;

  margin: 0 auto;

  color: rgb(111 102 102 / 88%);

  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

/* INTRO */

.portfolio-intro {
  width: min(880px, calc(100% - 48px));

  margin: 0 auto;
  padding: 96px 0 56px;

  text-align: center;
}

.portfolio-intro span {
  display: block;

  margin-bottom: 14px;

  color: #6B705C;

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portfolio-intro h2 {
  margin: 0 0 22px;

  color: #3A506B;

  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1.1;
}

.portfolio-intro p {
  max-width: 720px;

  margin: 0 auto;

  color: rgba(48, 53, 45, 0.78);

  font-size: 1rem;
  line-height: 1.85;
}

/* FILTROS */

.portfolio-stories {
  width: min(1220px, calc(100% - 48px));

  margin: 0 auto;
  padding: 24px 0 110px;
}

.portfolio-filters {
  margin-bottom: 42px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portfolio-filter {
  padding: 11px 18px;

  background: rgba(255, 255, 255, 0.52);
  color: #3A506B;

  border: 1px solid rgba(107, 112, 92, 0.2);
  border-radius: 999px;

  font-size: 0.88rem;
  font-weight: 600;

  cursor: pointer;

  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.portfolio-filter:hover {
  transform: translateY(-2px);

  background: rgba(107, 112, 92, 0.12);
}

.portfolio-filter.active {
  background: #6B705C;
  color: #F5F1E8;

  border-color: #6B705C;
}

/* GRID */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.portfolio-card {
  min-height: 520px;

  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(107, 112, 92, 0.16);
  border-radius: 30px;

  overflow: hidden;

  box-shadow: 0 20px 50px rgba(58, 80, 107, 0.08);

  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.25s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);

  box-shadow: 0 26px 64px rgba(58, 80, 107, 0.13);
}

.portfolio-card.is-hidden {
  display: none;
}

.portfolio-card a {
  height: 100%;

  display: flex;
  flex-direction: column;

  color: inherit;
  text-decoration: none;
}

.portfolio-card-image {
  height: 340px;

  overflow: hidden;
}

.portfolio-card-image img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;

  transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-card-image img {
  transform: scale(1.06);
}

.portfolio-card-content {
  flex: 1;

  padding: 24px 24px 28px;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.portfolio-card-content span {
  display: block;

  margin-bottom: 10px;

  color: #6B705C;

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.portfolio-card-content h2 {
  margin: 0 0 8px;

  color: #3A506B;

  font-family: "Playfair Display", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.portfolio-card-content h3 {
  margin: 0 0 16px;

  color: rgba(107, 112, 92, 0.9);

  font-size: 0.88rem;
  font-weight: 600;
}

.portfolio-card-content p {
  margin: 0;

  color: rgba(48, 53, 45, 0.76);

  font-size: 0.95rem;
  line-height: 1.7;
}

/* CTA */

.portfolio-cta-section {
  padding: 0 24px 110px;
}

.portfolio-cta-box {
  width: min(920px, 100%);

  margin: 0 auto;
  padding: 70px 56px;

  background: #647a6f;
  border-radius: 38px;

  text-align: center;

  box-shadow: 0 28px 80px rgba(58, 80, 107, 0.18);

  box-sizing: border-box;
}

.portfolio-cta-box span {
  display: block;

  margin-bottom: 14px;

  color: rgba(245, 241, 232, 0.72);

  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portfolio-cta-box h2 {
  margin: 0 0 20px;

  color: #F5F1E8;

  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  line-height: 1.12;
}

.portfolio-cta-box p {
  max-width: 620px;

  margin: 0 auto 30px;

  color: rgba(245, 241, 232, 0.78);

  font-size: 1rem;
  line-height: 1.75;
}

.portfolio-cta-box a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 24px;

  background: #F5F1E8;
  color: #3A506B;
  border-radius: 999px;

  text-decoration: none;

  font-size: 0.94rem;
  font-weight: 700;

  transition: transform 0.25s ease, opacity 0.25s ease;
}

.portfolio-cta-box a:hover {
  transform: translateY(-2px);

  opacity: 0.86;
}

/* ANIMAÇÃO */

.reveal-on-scroll {
  opacity: 0;

  transform: translateY(24px);

  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-on-scroll.visible {
  opacity: 1;

  transform: translateY(0);
}

/* RESPONSIVO */

@media (max-width: 1080px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-card {
    min-height: 500px;
  }
}

@media (max-width: 760px) {
  .portfolio-hero {
    min-height: 72vh;

    padding: 130px 22px 74px;
  }

  .portfolio-hero-content h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .portfolio-intro {
    width: min(100% - 36px, 880px);

    padding: 72px 0 42px;
  }

  .portfolio-stories {
    width: min(100% - 36px, 1220px);

    padding: 14px 0 84px;
  }

 .portfolio-filters {
    width: calc(100% + 36px);

    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: 34px;

    padding: 0 18px 10px;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x proximity;
    scroll-behavior: smooth;

    scrollbar-width: none;

    -webkit-overflow-scrolling: touch;
  }

  .portfolio-filters::-webkit-scrollbar {
    display: none;
  }

  .portfolio-filter {
    flex: 0 0 auto;

    white-space: nowrap;

    scroll-snap-align: start;
  }


  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .portfolio-card {
    min-height: auto;
    border-radius: 28px;
  }

  .portfolio-card-image {
    height: 340px;
  }

  .portfolio-card-content {
    padding: 24px 22px 28px;
  }

  .portfolio-cta-section {
    padding: 0 18px 84px;
  }

  .portfolio-cta-box {
    padding: 52px 26px;
    border-radius: 30px;
  }
}

@media (max-width: 420px) {
  .portfolio-card-image {
    height: 300px;
  }
    
  .portfolio-card-content h2 {
    font-size: 1.4rem;
  }
}

/* FOOTER */

.footer {
  padding: 64px 24px 24px;

  background: #647a6f;
  color: #F5F1E8;
}

.footer-content {
  width: min(1180px, 100%);

  margin: 0 auto;

  display: grid;
  grid-template-columns: 1.2fr auto 0.8fr auto 1.2fr;
  align-items: center;
  gap: 44px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.footer-brand img {
  width: 118px;
  height: auto;

  display: block;
}

.footer-brand p {
  max-width: 280px;

  margin: 0;

  color: rgba(245, 241, 232, 0.82);

  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-divider {
  width: 1px;
  height: 150px;

  background: linear-gradient(
    to bottom,
    transparent,
    rgba(245, 241, 232, 0.45),
    transparent
  );
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-links a {
  color: rgba(245, 241, 232, 0.9);
  text-decoration: none;

  font-size: 0.95rem;

  transition: transform 0.25s ease, color 0.25s ease;
}

.footer-links a:hover {
  color: #ffffff;

  transform: translateX(4px);
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-icon {
  width: 44px;
  height: 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(245, 241, 232, 0.12);
  border: 1px solid rgba(245, 241, 232, 0.22);
  border-radius: 50%;

  flex-shrink: 0;

  transition: transform 0.25s ease, background 0.25s ease;
}

a.footer-icon:hover {
  background: rgba(245, 241, 232, 0.22);

  transform: translateY(-3px);
}

.footer-icon img {
  width: 20px;
  height: 20px;

  display: block;
}

.footer-icon-static {
  cursor: default;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  flex-shrink: 0;
}

.footer-email span {
  color: rgba(245, 241, 232, 0.82);

  font-size: 0.88rem;
  line-height: 1;
  white-space: nowrap;
}

.footer-bottom {
  width: min(1180px, 100%);
  
  margin: 54px auto 0;
  padding-top: 22px;

  border-top: 1px solid rgba(245, 241, 232, 0.16);

  text-align: center;
}

.footer-bottom p {
  margin: 0;

  color: rgba(245, 241, 232, 0.68);

  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-bottom a {
  color: #F5F1E8;
  text-decoration: none;
  font-weight: 600;

  transition: opacity 0.25s ease;
}

.footer-bottom a:hover {
  opacity: 0.75;
}

@media (max-width: 900px) {
  .footer {
    padding: 56px 24px 24px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;

    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-brand p {
    max-width: 340px;
  }

  .footer-divider {
    width: 100%;
    height: 1px;

    background: linear-gradient(
      to right,
      transparent,
      rgba(245, 241, 232, 0.35),
      transparent
    );
  }

  .footer-links {
    align-items: center;
  }

.footer-social {
  justify-content: center;
  align-items: center;
  padding-bottom: 0;
}

.footer-email {
  justify-content: center;
}
}

.site-public-loading,
.site-public-empty {
  grid-column: 1 / -1;

  margin: 0;
  padding: 28px;

  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(107, 112, 92, 0.16);
  border-radius: 26px;

  color: rgba(48, 53, 45, 0.68);

  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;

  box-shadow: 0 16px 42px rgba(58, 80, 107, 0.07);
}

.dynamic-portfolio-card img,
.dynamic-blog-card img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;
}

.blog-read-more {
  width: fit-content;

  margin-top: 8px;
  padding: 10px 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #3A506B;
  color: #F5F1E8;

  border-radius: 999px;

  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.portfolio-card-link {
  height: 100%;

  display: flex;
  flex-direction: column;

  color: inherit;
  text-decoration: none;
}

.portfolio-card-link img {
  flex: 1;
}

/* =========================================================
   PORTFÓLIO MOBILE - ANTI-OVERFLOW
========================================================= */

@media (max-width: 760px) {
  .portfolio-page,
  .portfolio-intro,
  .portfolio-stories,
  .portfolio-cta-box {
    width: min(100%, calc(100vw - 28px));
    margin-left: auto;
    margin-right: auto;
  }

  .portfolio-filters {
    max-width: 100%;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    overflow-x: hidden;
  }

  .portfolio-filter {
    flex: 1 1 auto;
    min-width: fit-content;
  }

  .portfolio-cta-box a {
    width: 100%;
    max-width: 320px;

    justify-content: center;
    text-align: center;
  }
}