/* RC6 — correção estrutural do espaço excessivo e polimento de ritmo vertical */
@media (min-width:1200px){
  body.portfolio-projects-page .projects-list>.container{
    grid-template-columns:250px minmax(0,1fr);
    gap:16px;
    align-items:start;
  }
  .rc4-project-sidebar{
    grid-column:1;
    grid-row:1;
  }
  .rc6-portfolio-main{
    grid-column:2;
    grid-row:1;
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:0;
  }
  .rc6-portfolio-main>.project-card{
    width:100%;
    grid-column:auto!important;
    grid-row:auto!important;
  }
  .rc6-portfolio-main>.rc4-explore{
    width:100%;
    grid-column:auto;
    margin-top:14px;
  }
  .rc4-explore h2{margin:0 0 8px}
  body.portfolio-projects-page .project-card .project-media{padding:14px 14px 12px}
  body.portfolio-projects-page .project-card .project-thumbs{margin-top:8px}
  body.portfolio-projects-page .project-card .project-counter{margin-top:4px}
  body.portfolio-projects-page .project-card .project-info{padding:28px 26px}
  body.portfolio-projects-page .project-card .project-info p{margin-bottom:14px}
  body.portfolio-projects-page .project-card .project-meta{margin-bottom:14px}
  .rc4-project-stats{margin-bottom:12px}
  body.portfolio-projects-page .project-cta{margin-top:0}
  body.portfolio-projects-page .projects-list{padding-bottom:18px}
  body.portfolio-projects-page .portfolio-final-cta{padding:4px 0 30px}
  body.portfolio-projects-page .portfolio-final-cta-card{padding:28px 34px}
}
@media (min-width:1200px) and (max-width:1360px){
  body.portfolio-projects-page .projects-list>.container{grid-template-columns:230px minmax(0,1fr);gap:14px}
}
@media (max-width:1199px){
  .rc6-portfolio-main{display:contents}
}

/* RC7 — Padronização definitiva da posição da galeria
   Em todos os projetos, a mídia permanece à esquerda e as informações à direita. */
@media (min-width: 981px){
  body.portfolio-projects-page .project-card,
  body.portfolio-projects-page .project-card:nth-child(even){
    grid-template-columns:minmax(0,1.24fr) minmax(340px,.86fr)!important;
  }

  body.portfolio-projects-page .project-card .project-media,
  body.portfolio-projects-page .project-card:nth-child(even) .project-media{
    grid-column:1!important;
    order:1!important;
    border-right:1px solid rgba(109,60,255,.08);
    border-left:0!important;
  }

  body.portfolio-projects-page .project-card .project-info,
  body.portfolio-projects-page .project-card:nth-child(even) .project-info{
    grid-column:2!important;
    order:2!important;
  }
}

@media (max-width: 980px){
  body.portfolio-projects-page .project-card .project-media,
  body.portfolio-projects-page .project-card:nth-child(even) .project-media{
    order:1!important;
  }

  body.portfolio-projects-page .project-card .project-info,
  body.portfolio-projects-page .project-card:nth-child(even) .project-info{
    order:2!important;
  }
}

/* RC8 — navegador “Ver todos os projetos” e modal de filtros compacto */
@media (min-width: 901px){
  .portfolio-filter-dialog[open]{
    display:none!important;
  }
}
@media (max-width: 900px){
  .portfolio-filter-dialog[open]{
    align-items:center;
    justify-content:center;
    padding:18px;
  }
  .filter-dialog-sheet{
    width:min(100%,680px);
    max-height:min(720px,calc(100dvh - 36px));
    padding:10px 18px max(18px,env(safe-area-inset-bottom));
    border-radius:24px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .filter-dialog-handle{margin-bottom:10px}
  .filter-dialog-header{padding-bottom:12px}
  .filter-dialog-header h2{font-size:1.18rem}
  .filter-dialog-body{
    gap:12px;
    padding:14px 0;
    overflow:auto;
  }
  .filter-dialog-body .filter-field{gap:4px}
  .filter-dialog-body .filter-field select{
    height:48px;
    border-radius:13px;
    font-size:.88rem;
  }
  .filter-dialog-footer{flex:0 0 auto}
  .filter-dialog-footer button{height:48px}
}
@media (max-width: 600px){
  .portfolio-filter-dialog[open]{
    align-items:flex-end;
    padding:0;
  }
  .filter-dialog-sheet{
    width:100%;
    max-height:min(650px,88dvh);
    border-radius:24px 24px 0 0;
  }
}
