/* =============================================
   PORTFOLIO.CSS — estilos das páginas de
   portfólio e listagens do blog.
   Depende de main.css.
   ============================================= */

/* ── Seção portfólio ──────────────────────── */

.container-portfolio {
  margin-top: var(--espacamento-secao);
  margin-bottom: var(--espacamento-secao);
  padding: 0 1rem;
}

.container-portfolio h2,
.sub {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Grid de cards ────────────────────────── */

.card-portfolio {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.card-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 556px;
  width: 100%;
  padding: 30px;
  background-color: var(--cor-branco);
  border: 2px solid #0d0e0d;
  border-radius: 10px;
  box-shadow: 5px 5px 0 #0d0e0d;
}

.card-item img {
  width: 100%;
  height: auto;
  display: block;
  padding: 20px;
}

/* ── Conteúdo interno do card ─────────────── */

.item {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.item h3 {
  font-size: 1.8rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.item p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1; /* empurra o botão para baixo */
}

/* ── Botão "Veja mais" / "Leia mais" ─────── */

.btn-veja {
  display: inline-block;
  align-self: center;
  padding: 0.75rem 1.5rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--cor-branco);
  background-color: var(--cor-azul);
  border: 2px solid #0d0e0d;
  border-radius: 5px;
  box-shadow: 3px 3px 0 #0d0e0d;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.btn-veja:hover {
  background-color: var(--cor-link);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #0d0e0d;
}

/* ── Conteúdo didático (conteudo.html) ────── */

.container-contents {
  max-width: 95%;
  margin: var(--espacamento-secao) auto;
  padding: 2rem 5rem;
  background-color: var(--cor-bege);
  border-radius: 10px;
  border: 2px solid #0d0e0d;
  box-shadow: 5px 5px 0 #0d0e0d;
}

.container-contents h2 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
}

/* ── Editorias (filtro de blog) ───────────── */

.editorials-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

.editorials-hamburger {
  display: none;
  background: none;
  border: 2px solid #0d0e0d;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 5px 5px 0 #0d0e0d;
}

.editorials {
  display: flex;
  gap: 3rem;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.editorial-btn {
  padding: 1.125rem 2.25rem;
  font-size: 2rem;
  font-weight: bold;
  color: var(--cor-preto);
  border-radius: 10px;
  border: 2px solid #0d0e0d;
  box-shadow: 5px 5px 0 #0d0e0d;
  cursor: pointer;
  background: transparent;
  transition: background-color 0.2s, transform 0.06s;
}

.editorial-btn:hover,
.editorial-btn.ativa {
  background-color: var(--cor-branco);
}

.editorial-section { display: block; }
.editorial-section[hidden] { display: none; }

/* ── Slideshow ────────────────────────────── */

.ig-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── Case ─────────────────────────────────── */

.container-case {
  max-width: 900px;
  margin: var(--espacamento-secao) auto;
}

.container-case h3 {
  font-size: 3rem;
  font-weight: bold;
}

.container-case p {
  font-size: 1.6rem;
  margin: 3rem 1rem;
}

/* ── Acessibilidade ───────────────────────── */

.sr-only {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden;
}

/* ── Responsivo ───────────────────────────── */

@media (max-width: 1131px) {
  .editorials-wrapper {
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .editorials-hamburger {
    display: inline-block;
  }

  .editorials {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
    gap: 0.75rem;
    background: var(--cor-bege);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #0d0e0d;
    box-shadow: 5px 5px 0 #0d0e0d;
    display: none;
    z-index: 9999;
    width: calc(100% - 2rem);
    max-width: 480px;
  }

  .editorials.open {
    display: flex;
  }

  .editorial-btn {
    font-size: 1.4rem;
    padding: 0.8rem 1rem;
    text-align: center;
  }

  .container-case {
    max-width: 90%;
    margin: 1.5rem auto;
    padding: 0 1rem;
  }
}

@media (min-width: 1132px) and (max-width: 1250px) {
  .editorials {
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .editorials li {
    flex: 0 0 auto;
  }

  .editorials::-webkit-scrollbar {
    height: 8px;
  }

  .editorials::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
  }
}

@media (max-width: 1184px) {
  .container-portfolio h2,
  .container-contents h2,
  .container-case h3 {
    font-size: 2rem;
  }
}

@media (max-width: 892px) {
  .container-portfolio {
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .container-case {
    max-width: 90%;
  }

  .container-case p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
}
