/**
 * Services Page Stylesheet — RN Carpintaria
 * Vitrine de engenharia e marcenaria arquitetônica com efeito cortina sobreposta,
 * hero em tela cheia e grid editorial refinado.
 */

/* ==========================================================================
   1. ESTRUTURA GERAL DA PÁGINA DE SERVIÇOS
   ========================================================================== */
.services-page {
  background-color: #171615;
  color: #FFFFFF;
  overflow-x: clip;
}

/* ==========================================================================
   2. DOBRA 1: HERO EM FULL WIDTH & FULL HEIGHT (TELA CHEIA)
   ========================================================================== */
.services-hero-section {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: hidden;
  z-index: 1;
  will-change: transform, opacity;
}

.services-hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.services-hero-backdrop picture {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.services-hero-img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(17, 16, 15, 0.55) 0%,
      rgba(17, 16, 15, 0.25) 40%,
      rgba(17, 16, 15, 0.1) 70%,
      rgba(17, 16, 15, 0.4) 100%);
  z-index: 2;
  pointer-events: none;
}

.services-hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: clamp(3rem, 6vw, 5.5rem);
}

.services-hero-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.services-hero-text-col {
  max-width: 830px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.services-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-body);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-gold);
}

.services-hero-kicker::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background-color: var(--color-accent-gold);
}

.services-hero-title {
  font-family: var(--font-family-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: #FFFFFF;
}

.services-hero-desc {
  font-family: var(--font-family-body);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
}

.services-hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 0.75rem;
}

.services-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.05rem 2.2rem;
  background-color: #FFFFFF;
  color: #151515;
  border-radius: var(--radius-pill);
  font-family: var(--font-family-body);
  font-size: 0.875rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
}

.services-hero-btn .btn-dot {
  font-size: 0.9375rem;
  line-height: 1;
}

.services-hero-btn:hover {
  background-color: var(--color-accent-gold);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.services-hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-body);
  font-size: 0.6875rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  padding-bottom: 0.75rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.services-hero-scroll:hover {
  color: #FFFFFF;
}

.services-hero-scroll svg {
  transition: transform var(--transition-fast);
}

.services-hero-scroll:hover svg {
  transform: translateY(3px);
}

/* ==========================================================================
   3. SEÇÕES EM EFEITO CORTINA (STACKING CURTAIN ARCHITECTURE)
   ========================================================================== */
.services-curtain-section {
  position: relative;
  width: 100%;
  padding-top: clamp(4.5rem, 8vw, 7.5rem);
  padding-bottom: clamp(4.5rem, 8vw, 7.5rem);
}

/* Z-Index e posições para arquitetura de cortina sobreposta */
.services-curtain-2 {
  position: relative;
  z-index: 10;
  background-color: #282828;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.services-curtain-3 {
  position: relative;
  z-index: 12;
  background-color: #636363;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.services-curtain-4 {
  position: relative;
  z-index: 14;
  background-color: #282828;
}

.services-curtain-5 {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #282828;
  min-height: 70vh;
  min-height: 70svh;
  display: flex;
  align-items: center;
}

.services-curtain-5 .container {
  transform-origin: center top;
  will-change: transform, opacity, filter;
  width: 100%;
}

/* ==========================================================================
   4. DOBRA 2: PORTAS E JANELAS (CAIXILHOS & ESQUADRIAS ESPECIAIS)
   ========================================================================== */
.services-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.services-split-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.services-section-title {
  font-family: var(--font-family-display);
  font-size: clamp(2.25rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.services-body-paragraph {
  font-family: var(--font-family-body);
  font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.services-visual-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.8;
  border-radius: 0 !important;
  overflow: hidden;
}

.services-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.services-visual-wrap:hover .services-visual-img {
  transform: scale(1.03);
}

/* ==========================================================================
   5. DOBRA 3: ESCADAS, PAVIMENTOS, GAZEBOS E LOFTS (LINHAS EDITORIAIS)
   ========================================================================== */
.services-editorial-list-section {
  position: relative;
}

.services-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  margin-bottom: 0.5rem;
}

.services-list-kicker {
  font-family: var(--font-family-body);
  font-size: 0.75rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.services-editorial-item {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: baseline;
  padding-top: clamp(2rem, 3.5vw, 3rem);
  padding-bottom: clamp(2rem, 3.5vw, 3rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: padding-left var(--transition-fast), background-color var(--transition-fast);
}

.services-editorial-item:hover {
  background-color: rgba(255, 255, 255, 0.02);
  padding-left: 0.5rem;
}

.services-editorial-name {
  font-family: var(--font-family-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.15;
}

.services-editorial-desc {
  font-family: var(--font-family-body);
  font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 680px;
}

/* ==========================================================================
   6. DOBRA 4: REVESTIMENTOS (PAINÉIS E FORROS RIPADOS)
   ========================================================================== */
.services-heading-block {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.services-super-title {
  font-family: var(--font-family-display);
  font-size: clamp(2.5rem, 4vw, 3rem);
  text-align: center;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}

.services-revestimentos-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.services-block-subtitle {
  font-family: var(--font-family-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.services-landscape-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0 !important;
  overflow: hidden;
}

.services-revestimentos-grid .services-landscape-wrap {
  aspect-ratio: 900 / 847;
}

.services-estruturas-grid .services-landscape-wrap {
  aspect-ratio: 835 / 900;
}

/* ==========================================================================
   7. DOBRA 5: ESTRUTURAS DE MADEIRA (PERGOLADOS E COBERTURAS MONUMENTAIS)
   ========================================================================== */
.services-estruturas-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

/* ==========================================================================
   8. DOBRA FINAL: CTA COM EFEITO CORTINA & FOOTER REVEAL
   ========================================================================== */
.services-page main {
  position: relative;
  z-index: 10;
  background-color: #171615;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.services-cta-curtain {
  position: relative;
  z-index: 30;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #12100E;
  box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.3), 0 -12px 24px rgba(0, 0, 0, 0.3);
}

.services-page .site-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
}

/* ==========================================================================
   9. RESPONSIVIDADE RIGOROSA (TABLET & MOBILE)
   ========================================================================== */

/* Tablet (768px a 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .services-page .container {
    padding-left: 28px;
    padding-right: 28px;
  }

  /* Hero no Tablet: Imagem ocupando todo o height da seção */
  .services-hero-section {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: calc(var(--header-height, 75px) + 2rem);
    display: flex;
    align-items: flex-end;
  }

  .services-hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .services-hero-backdrop picture {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .services-hero-img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .services-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(17, 16, 15, 0.72) 0%,
        rgba(17, 16, 15, 0.35) 45%,
        rgba(17, 16, 15, 0.1) 75%,
        rgba(17, 16, 15, 0.35) 100%);
    pointer-events: none;
  }

  .services-hero-content {
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
  }

  .services-hero-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  /* Reduzir um pouco a fonte do título no tablet */
  .services-hero-title {
    font-size: clamp(2.15rem, 4.5vw, 2.75rem);
    line-height: 1.15;
  }

  /* Botão Solicitar Orçamento no Tablet: NÃO esticado, tamanho natural compacto */
  .services-hero-actions {
    width: auto;
    display: flex;
    justify-content: flex-start;
  }

  .services-hero-btn {
    width: auto;
    max-width: fit-content;
    align-self: flex-start;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.95rem 1.85rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .services-hero-scroll {
    display: none;
  }

  /* Dobra 2 (Portas e Caixilhos): Uma única linha com duas colunas no tablet */
  .services-split-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: clamp(2rem, 3.5vw, 3.5rem) !important;
    align-items: center !important;
  }

  .services-split-text {
    order: 1 !important;
  }

  .services-visual-wrap {
    order: 2 !important;
    width: 100% !important;
    aspect-ratio: 4 / 4.8 !important;
    border-radius: 0 !important;
  }

  /* Dobra 4 (Painéis e Forros Ripados): Uma única linha com duas colunas no tablet */
  .services-revestimentos-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: clamp(2rem, 3.5vw, 3.5rem) !important;
    align-items: center !important;
  }

  .services-revestimentos-text {
    order: 1 !important;
  }

  .services-revestimentos-grid .services-landscape-wrap {
    order: 2 !important;
    width: 100% !important;
    aspect-ratio: 900 / 847 !important;
    border-radius: 0 !important;
  }

  /* Dobra 5 (Pergolados e Coberturas): Uma única linha com duas colunas no tablet */
  .services-estruturas-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: clamp(2rem, 3.5vw, 3.5rem) !important;
    align-items: center !important;
  }

  .services-estruturas-grid .services-landscape-wrap {
    order: 1 !important;
    width: 100% !important;
    aspect-ratio: 835 / 900 !important;
    border-radius: 0 !important;
  }

  .services-estruturas-text {
    order: 2 !important;
  }

  .services-section-title {
    font-size: clamp(1.65rem, 3vw, 2rem);
    line-height: 1.15;
    margin-bottom: 1rem;
  }

  .services-block-subtitle {
    font-size: clamp(1.65rem, 3vw, 2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .services-body-paragraph {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1em;
  }

  /* Dobra 3 (Escadas, Pavimentos, Gazebo, Lofts): Grade em 2 linhas e 2 colunas no tablet */
  .services-editorial-grid,
  .services-editorial-list-section .container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    column-gap: clamp(2rem, 4vw, 3.5rem);
    row-gap: clamp(1.75rem, 3.5vw, 2.5rem);
  }

  .services-editorial-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .services-editorial-name {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .services-editorial-desc {
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 100%;
  }

  /* Dobra 5 e Seção CTA no Tablet: mesma animação e efeito cortina do desktop */
  .services-curtain-5 {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 70vh;
    min-height: 70svh;
  }

  .services-cta-curtain {
    position: relative;
    z-index: 30;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #12100E;
    box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.3), 0 -12px 24px rgba(0, 0, 0, 0.3);
  }

  .services-page .site-footer {
    position: relative !important;
    bottom: auto !important;
    z-index: 10 !important;
    padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  }
}

@media (min-width: 768px) and (max-width: 768px) {
  .services-curtain-2 {
    min-height: 75svh;
    min-height: 75vh;
  }

  .services-section-title {
    font-size: clamp(1.5rem, 3.2vw, 1.5rem);
  }

  .services-super-title {
    font-size: 2rem;
  }

  .services-curtain-5 {
    min-height: 55svh;
    min-height: 55vh;
  }

  .services-editorial-name,
  .services-block-subtitle {
    font-size: 1.5rem;
  }
}

/* Mobile (<= 767.98px) */
@media (max-width: 767.98px) {
  .services-page .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Hero no Mobile */
  .services-hero-section {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: calc(var(--header-height, 75px) + 1.5rem);
    display: flex;
    align-items: flex-end;
  }

  .services-hero-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .services-hero-backdrop picture {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .services-hero-img {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .services-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(17, 16, 15, 0.75) 0%,
        rgba(17, 16, 15, 0.35) 45%,
        rgba(17, 16, 15, 0.1) 75%,
        rgba(17, 16, 15, 0.35) 100%);
    pointer-events: none;
  }

  .services-hero-content {
    padding-bottom: 2.5rem;
  }

  .services-hero-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .services-hero-kicker {
    font-size: 0.6875rem;
  }

  .services-hero-title {
    font-size: clamp(3rem, 8vw, 3rem);
    line-height: 1.2;
  }

  .services-hero-desc {
    font-size: 0.9375rem;
    line-height: 1.55;
  }

  .services-hero-actions {
    width: auto;
    display: flex;
    justify-content: flex-start;
  }

  .services-hero-btn {
    width: auto;
    max-width: fit-content;
    align-self: flex-start;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.95rem 1.85rem;
    font-size: 0.8125rem;
    white-space: nowrap;
  }

  .services-hero-scroll {
    display: none;
  }

  /* Dobras de Conteúdo no Mobile */
  .services-curtain-section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Portas e Janelas (Dobra 2): 1 Coluna com Foto no Topo Inteira sem Cortes */
  .services-split-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .services-visual-wrap {
    order: -1;
    width: 100%;
    aspect-ratio: 743 / 900;
    border-radius: 0 !important;
    overflow: hidden;
  }

  .services-visual-wrap .services-visual-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .services-section-title {
    font-size: clamp(1.85rem, 6.5vw, 2.35rem);
    line-height: 1.15;
  }

  /* Dobra 3 (Lista de Serviços): 1 Coluna por Item no Mobile */
  .services-editorial-grid,
  .services-editorial-list-section .container {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .services-editorial-item {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .services-editorial-name {
    font-size: 1.75rem;
  }

  .services-editorial-desc {
    font-size: 0.875rem;
    line-height: 1.55;
  }

  /* Dobra 4 (Revestimentos): 1 Coluna */
  .services-super-title {
    font-size: clamp(2rem, 7vw, 2.5rem);
    line-height: 1.12;
  }

  .services-revestimentos-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  .services-landscape-wrap {
    order: -1;
    border-radius: 0 !important;
  }

  .services-block-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.85rem;
  }

  /* Dobra 5 (Estruturas de Madeira): 1 Coluna com Imagem no Topo */
  .services-estruturas-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
  }

  /* Dobra Final (CTA) e Rodapé no Mobile: rolagem contínua sem travar ou cortar o footer */
  .services-page main {
    box-shadow: none;
  }

  .services-cta-curtain {
    min-height: 480px;
    height: auto;
    padding: clamp(4.5rem, 12vw, 6.5rem) 0;
    box-shadow: none;
  }

  .services-page .site-footer {
    position: relative !important;
    bottom: auto !important;
    z-index: 10 !important;
    padding-bottom: clamp(2rem, 6vw, 3.5rem);
  }
}

/* Telas Ultra-Compactas (<= 390px) */
@media (max-width: 390px) {
  .services-hero-title {
    font-size: 2rem;
  }

  .services-section-title,
  .services-super-title {
    font-size: 1.75rem;
  }

  .services-editorial-name {
    font-size: 1.5rem;
  }
}