/* INFRAESTRUTURA — Desktop-first (≤1810) */
@media (max-width: 1810px) {
  .section-infra { width: 100%; }
  .section-infra .infra-container { width: 100%; max-width: 100%; padding: 0 1.5rem; }
  .section-infra .section-header { width: 100%; height: auto; }
}

/* INFRAESTRUTURA — Ajustes progressivos (≤1760, ≤1600, ≤1510, ≤1440, ≤1280) */
@media (max-width: 1760px) {
  .bento-grid { grid-template-rows: 280px 280px; gap: 1.5rem; }
  .wood-viewport { height: 170px; }
}

@media (max-width: 1600px) {
  .bento-grid { grid-template-rows: 270px 270px; }
  .wood-viewport { height: 160px; }
}

@media (max-width: 1510px) {
  .bento-grid { grid-template-rows: 260px 260px; }
  .wood-viewport { height: 160px; }
}

@media (max-width: 1440px) {
  .bento-grid { grid-template-rows: 250px 250px; }
  .wood-viewport { height: 160px; }
}

@media (max-width: 1280px) {
  .bento-grid { grid-template-rows: 240px 240px; }
  .wood-viewport { height: 150px; }
}

/* INFRAESTRUTURA — Médio (≤1120) */
@media (max-width: 1120px) {
  .section-infra { width: 100%; height: auto; background-attachment: scroll; }
  .section-infra .infra-container { width: 100%; max-width: 100%; padding: 0 1rem; }
  .section-infra .section-header { width: 100%; height: auto; margin: 0 auto 1rem; }
  .bento-grid { grid-template-columns: 2fr 1fr; grid-template-rows: 220px 220px; gap: 1rem; }
  .wood-viewport { height: 150px; }
}

/* INFRAESTRUTURA — Reflow (≤1024) */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 1rem; }
  .item-main-video { grid-column: 1 / 3; aspect-ratio: 16/9; }
  .item-img-1 { grid-column: 1 / 2; aspect-ratio: 1; }
  .item-sec-video { grid-column: 2 / 3; aspect-ratio: 1; }
  .item-info { grid-column: 1 / 3; }
  .item-text { grid-column: 1 / 3; }
  .wood-viewport { height: 140px; }
}

/* HERO, NAV & SERVIÇOS — Desktop-first (≤980) */
@media (max-width: 980px) {
  .container { padding: 0 1rem; }
  .site-header { padding: 0.4rem 0 0.6rem; }
  .header-inner { width: calc(100% - 2rem); padding: 0.65rem 1.4rem; }
  .site-nav a { font-size: 0.9rem; padding: 0.35rem 0.6rem; }
  .hero { padding: 5rem 0 3rem; background-position: center; }
  .hero-grid { grid-template-columns: 1fr; row-gap: 2rem; justify-items: start; }
  .hero-text h1 { font-size: 1.6rem; max-width: 100%; }
  .hero-text p { max-width: 100%; margin-bottom: 1.4rem; }
  .hero-actions { margin-top: 1rem; margin-bottom: 1.2rem; }
  .hero-highlight { margin-top: 1rem; }
  .hero-video-wrapper { margin: 0 auto; width: min(22rem, 100%); aspect-ratio: 16 / 9; justify-self: center; align-self: center; margin-right: 0; }
  .cards-grid-services { flex-direction: column; align-items: flex-start; gap: 2rem; margin-top: 2.5rem; }
  .cards-grid-services::before { top: 1.5rem; bottom: 0.8rem; left: 1.6rem; right: auto; width: 0.22rem; height: auto; background: linear-gradient(180deg, var(--color-blue), var(--color-red), var(--color-yellow)); }
  .card-service { max-width: 100%; padding-left: 2rem; text-align: left; }
  .wood-viewport { height: 140px; }
}

/* SLIDER — Ajustes finos (≤900, ≤820) */
@media (max-width: 900px) {
  .wood-viewport { height: 130px; }
}

@media (max-width: 820px) {
  .wood-viewport { height: 120px; }
}

/* HERO & BENTO — Mobile (≤720) */
@media (max-width: 720px) {
  .hero { padding: 5rem 0 3rem; }
  .hero-grid { gap: 2rem; }
  .hero-tag { width: 100%; font-size: 0.75rem; letter-spacing: 0.06em; }
  .hero-text h1 { font-size: 1.45rem; }
  .hero-text p { max-width: 100%; margin-bottom: 1.2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: 1rem; margin-bottom: 1.2rem; }
  .hero-highlight { margin-top: 0.8rem; height: auto; padding: 0.6rem 0.8rem; }
  .hero-highlight p { font-size: 1.1rem; padding: 0; }
  .hero-video-wrapper { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; }
  .bento-grid { display: flex; flex-direction: column; }
  .bento-item { min-height: 200px; }
  .wood-track { gap: 0.75rem; padding: 0.75rem; }
  .wood-item { flex: 0 0 calc((100% - 2.25rem) / 2); }
  .wood-viewport { height: 110px; }
}

/* HERO — Desktop refinements (≥1100, ≥1400) */
@media (min-width: 1100px) {
  .hero .container { padding-left: 0; }
  .hero-text { margin-left: -6rem; margin-top: -1.25rem; }
}

@media (min-width: 1400px) {
  .hero-text { margin-left: -10rem; }
}

/* HERO — Proteções mobile (≤960) */
@media (max-width: 960px) {
  .hero-text { margin-left: 0 !important; margin-top: 0 !important; max-width: 100%; }
  .container { padding: 0 1rem; }
  .site-header { padding: 0.4rem 0 0.6rem; }
  .header-inner { width: calc(100% - 2rem); padding: 0.65rem 1.4rem; }
  .site-nav a { font-size: 0.9rem; padding: 0.35rem 0.6rem; }
  .hero { padding: 5rem 0 3rem; background-position: center; }
  .hero-grid { grid-template-columns: 1fr; row-gap: 2rem; justify-items: start; }
  .hero-text h1 { font-size: 1.6rem; max-width: 100%; }
  .hero-text p { max-width: 100%; margin-bottom: 1.4rem; }
  .hero-actions { margin-top: 1rem; margin-bottom: 1.2rem; }
  .hero-highlight { margin-top: 1rem; }
  .hero-video-wrapper { margin: 0 auto; width: min(22rem, 100%); aspect-ratio: 16 / 9; justify-self: center; align-self: center; margin-right: 0; }
  .cards-grid-services { flex-direction: column; align-items: flex-start; gap: 2rem; margin-top: 2.5rem; }
  .cards-grid-services::before { top: 1.5rem; bottom: 0.8rem; left: 1.6rem; right: auto; width: 0.22rem; height: auto; background: linear-gradient(180deg, var(--color-blue), var(--color-red), var(--color-yellow)); }
  .card-service { max-width: 100%; padding-left: 2rem; text-align: left; }
  .card-service::after { top: auto; left: 1.6rem; right: auto; bottom: -0.25rem; transform: translate(-50%, 0) rotate(45deg); }
  .cards-grid-services .card-service:last-child::after { display: none; }
  .card-icon { top: 0; left: 1.6rem; transform: translate(-50%, 0); }
  .card-service.up .card-icon { position: relative; top: 0; margin-bottom: 0.5rem; }
  .card-service.down .card-icon { position: relative; bottom: auto; margin-top: 0.5rem; }
  .card-icon::after { display: none; }
  .card-service .card-body { margin-top: 0.35rem; }
  .infra-grid, .about-grid, .contact-grid, .cert-grid { grid-template-columns: minmax(0, 1fr); }
  .cert-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
  .cert-media .cert-logo-card { grid-column: 1 / -1; justify-self: center; }
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch-grid { grid-template-columns: 1fr; gap: 3rem; }
  .arch-photo { height: clamp(300px, 40vh, 380px); }

  /* MENU MOBILE */
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    inset: 4.2rem 0 auto 0;
    background: linear-gradient(135deg, var(--color-blue-dark), var(--color-red), var(--color-yellow));
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.9rem 1.5rem 1.4rem;
    gap: 0.8rem;
  }
  .site-nav a {
    color: #f9fafb;
    background: transparent;
    white-space: normal;
  }
  .site-nav a::after { background: #f9fafb; }
  .site-nav.nav-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* INFRAESTRUTURA — ≤1024 (afinamento de grid e container) */
@media (max-width: 1024px){
  .section-infra .infra-container{ max-width: 1120px; }
  .section-infra .bento-grid{ grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-rows: 210px 210px; gap: 1.25rem; }
}

/* INFRAESTRUTURA — ≤820 (stack vertical) */
@media (max-width: 820px){
  .section-infra{ background-attachment: scroll; }
  .section-infra .bento-grid{ grid-template-columns: 1fr; grid-template-rows: 320px auto auto; }
  .section-infra .item-main-video{ grid-column: 1; grid-row: 1; }
  .section-infra .item-info{ grid-column: 1; grid-row: 2; }
  .section-infra .item-text{ grid-column: 1; grid-row: 3; }
  
  /* Restringir altura dos cards para não esticar demais */
  .section-infra .info-content,
  .section-infra .text-card {
    max-height: 280px;
    overflow-y: auto;
  }

  .section-infra .parallax-title{ font-size: clamp(2rem, 7vw, 3.2rem); }
}

/* CERTIFICAÇÕES, RESULTADOS, CONTATO — ≤980 */
@media (max-width: 980px) {
  .cert-feature-grid { grid-template-columns: 1fr; }
  .cert-feature-top { grid-template-columns: 1fr; }
  .cert-logo-chip { width: 96px; height: 96px; }
  .cert-gallery { grid-template-columns: 1fr; }
  .cert-shot img { height: 280px; }
  .gallery-grid-results .results-portraits{ grid-template-columns: 1fr; }
  :root{ --results-portrait-h: clamp(260px, 70vw, 340px); }
  .contact-cards { grid-template-columns: 1fr; }
}

/* SERVIÇOS — Desktop (≥961) */
@media (min-width: 961px) {
  .cards-grid-services .card-service .card-body {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}

/* FORMULÁRIOS — ≤560 */
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* GALERIA & CUIDADOS — ≤900 */
@media (max-width: 900px) {
  .gallery-grid.gallery-grid-results { grid-template-columns: 1fr; }
  .care-grid { grid-template-columns: 1fr; }
  .care-visual { min-height: 18rem; }
}

/* CONTROLES — Botões de superfície (≤600) */
@media (max-width: 600px){
  .surface-btn{ width:38px; height:38px; }
  .surface-btn.prev{ left:10px; }
  .surface-btn.next{ right:10px; }
}
