/* ==========================================================
   RS Serralheria - Estilos
   Paleta baseada na logo: vermelho, preto e branco
   ========================================================== */
:root {
  --red: #e30613;
  --red-dark: #b8040f;
  --black: #151515;
  --black-soft: #222222;
  --gray: #f4f4f4;
  --gray-mid: #8a8a8a;
  --white: #ffffff;
  --whats: #25d366;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .12);
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { font-family: var(--font-body); color: var(--black); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }
.center { text-align: center; margin-top: 40px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-title); font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  padding: 14px 26px; border-radius: 50px; border: 2px solid transparent;
  cursor: pointer; transition: transform .2s, background .2s, color .2s, box-shadow .2s; font-size: .95rem;
}
.btn svg { width: 22px; height: 22px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn--red { background: var(--red); color: var(--white); box-shadow: 0 8px 20px rgba(227, 6, 19, .35); }
.btn--red:hover { background: var(--red-dark); }
.btn--outline { border-color: var(--white); color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--black); }
.btn--white { background: var(--white); color: var(--red); }
.btn--white:hover { background: var(--black); color: var(--white); }
.btn--sm { padding: 10px 18px; font-size: .8rem; }
.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn--full { width: 100%; }

/* ---------- Topbar ---------- */
.topbar { background: var(--black); color: #ddd; font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 10px; padding: 8px 20px; flex-wrap: wrap; }
.topbar a { color: var(--white); font-weight: 600; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 2px 12px rgba(0, 0, 0, .08); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.header__logo img { height: 70px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { font-family: var(--font-title); font-weight: 700; font-size: .9rem; text-transform: uppercase; position: relative; }
.nav a:not(.btn)::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 3px; background: var(--red); transition: width .25s; }
.nav a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 26px; position: relative; }
.nav-toggle span { position: absolute; left: 0; width: 100%; height: 3px; background: var(--black); border-radius: 3px; transition: .3s; }
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 22px; }
.nav-toggle.is-open span:nth-child(1) { top: 11px; transform: rotate(45deg); background: var(--red); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { top: 11px; transform: rotate(-45deg); background: var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center; color: var(--white);
  background: url('../img/catalogo/termoacustica-06.jpg') center/cover no-repeat;
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10, 10, 10, .93) 0%, rgba(10, 10, 10, .75) 55%, rgba(227, 6, 19, .45) 100%); }
.hero__content { position: relative; z-index: 1; padding-top: 60px; padding-bottom: 60px; max-width: 1200px; }
.tag { display: inline-block; background: var(--red); padding: 6px 16px; border-radius: 4px; font-family: var(--font-title); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; }
.hero h1 { font-family: var(--font-title); font-weight: 900; font-size: clamp(2.1rem, 5vw, 3.8rem); line-height: 1.1; text-transform: uppercase; max-width: 780px; margin-bottom: 20px; }
.hero h1 span { color: var(--red); font-style: italic; }
.hero p { font-size: 1.15rem; max-width: 620px; color: #e5e5e5; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.hero__badges { display: flex; gap: 24px; flex-wrap: wrap; font-weight: 600; font-size: .95rem; }

/* ---------- Seções ---------- */
.section { padding: 90px 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--gray { background: var(--gray); }
.section__head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.section__head p { color: var(--gray-mid); margin-top: 12px; }
.section--dark .section__head p { color: #bbb; }
.section__sub { display: inline-block; color: var(--red); font-family: var(--font-title); font-weight: 800; text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; margin-bottom: 8px; }
.section__title { font-family: var(--font-title); font-weight: 900; font-size: clamp(1.8rem, 3.5vw, 2.6rem); text-transform: uppercase; line-height: 1.15; }
.section__title::after { content: ''; display: block; width: 70px; height: 4px; background: var(--red); margin: 16px auto 0; }
.section__title span { color: var(--red); }
.section__title--left::after { margin-left: 0; }

/* ---------- Serviços ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card {
  background: var(--white); border-radius: var(--radius); padding: 34px 28px; box-shadow: var(--shadow);
  border-bottom: 4px solid transparent; transition: transform .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--red); }
.service-card__icon { width: 62px; height: 62px; border-radius: 50%; background: var(--black); display: grid; place-items: center; margin-bottom: 18px; transition: background .25s; }
.service-card:hover .service-card__icon { background: var(--red); }
.service-card__icon svg { width: 30px; height: 30px; fill: var(--white); }
.service-card h3 { font-family: var(--font-title); font-weight: 800; font-size: 1.2rem; text-transform: uppercase; margin-bottom: 10px; }
.service-card p { color: #555; font-size: .95rem; }

/* ---------- CTA Strip ---------- */
.cta-strip { background: var(--red); color: var(--white); padding: 46px 0; }
.cta-strip__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-strip h2 { font-family: var(--font-title); font-weight: 900; text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 2rem); }

/* ---------- Diferenciais ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--black-soft); border-radius: var(--radius); padding: 30px 24px; border-top: 4px solid var(--red); }
.feature strong { font-family: var(--font-title); font-size: 2.4rem; font-weight: 900; color: var(--red); line-height: 1; }
.feature h3 { font-family: var(--font-title); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; margin: 12px 0 8px; }
.feature p { color: #bbb; font-size: .93rem; }

/* ---------- Catálogo ---------- */
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.filter {
  font-family: var(--font-title); font-weight: 700; font-size: .85rem; text-transform: uppercase;
  padding: 10px 20px; border-radius: 50px; border: 2px solid var(--black); background: transparent; cursor: pointer; transition: .2s;
}
.filter:hover { border-color: var(--red); color: var(--red); }
.filter.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.gallery__item { position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; aspect-ratio: 4 / 3; background: var(--gray); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; color: var(--white);
  font-family: var(--font-title); font-weight: 700; font-size: .9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
}
.gallery__item::before { content: '+'; position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; font-size: 1.4rem; font-weight: 700; z-index: 1; opacity: 0; transition: opacity .25s; }
.gallery__item:hover::before { opacity: 1; }
.gallery__item.is-hidden { display: none; }

/* ---------- Contato ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact__list { margin: 34px 0; display: grid; gap: 20px; }
.contact__list li { padding-left: 18px; border-left: 3px solid var(--red); color: #ddd; }
.contact__list strong { display: block; color: var(--white); font-family: var(--font-title); text-transform: uppercase; font-size: .85rem; letter-spacing: 1px; margin-bottom: 2px; }
.contact__list a { font-size: 1.4rem; font-weight: 700; color: var(--white); }
.contact__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.contact__form { background: var(--white); color: var(--black); padding: 34px; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--red); }
.contact__form h3 { font-family: var(--font-title); font-weight: 900; text-transform: uppercase; font-size: 1.4rem; }
.contact__form > p { color: var(--gray-mid); margin-bottom: 20px; }
.contact__form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.contact__form input, .contact__form select, .contact__form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1px solid #d6d6d6; border-radius: 6px;
  font: inherit; font-weight: 400; transition: border-color .2s;
}
.contact__form input:focus, .contact__form select:focus, .contact__form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 6, 19, .15); }
.form-error { display: block; color: var(--red); font-size: .85rem; min-height: 1.2em; margin-bottom: 8px; }
.map { margin-top: 60px; }
.map iframe { width: 100%; height: 360px; border: 0; border-radius: var(--radius); filter: grayscale(.3); }

/* ---------- Footer ---------- */
.footer { background: #0b0b0b; color: #aaa; padding: 50px 0 30px; text-align: center; border-top: 4px solid var(--red); }
.footer__inner { display: grid; gap: 8px; justify-items: center; }
.footer__logo { height: 110px; width: auto; background: var(--white); border-radius: var(--radius); padding: 6px; margin-bottom: 12px; }
.footer a { color: var(--white); font-weight: 700; }
.footer small { margin-top: 16px; color: #666; }

/* ---------- WhatsApp flutuante ---------- */
.whats-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200; width: 62px; height: 62px; border-radius: 50%;
  background: var(--whats); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  animation: pulse 2s infinite;
}
.whats-float svg { width: 34px; height: 34px; fill: var(--white); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .6); }
  70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(0, 0, 0, .94); display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.is-open { display: flex; }
.lightbox figure { max-width: 1100px; width: 100%; text-align: center; }
.lightbox img { max-height: 80vh; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { color: var(--white); font-family: var(--font-title); font-weight: 700; margin-top: 14px; }
.lightbox__close { position: absolute; top: 14px; right: 22px; background: none; border: 0; color: var(--white); font-size: 3rem; cursor: pointer; line-height: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--red); color: var(--white); font-size: 1.3rem; cursor: pointer; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__close:hover, .lightbox__nav:hover { opacity: .8; }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .services, .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero { min-height: 70vh; }
  :root { --header-h: 72px; }
  .header__logo img { height: 58px; }
  .nav-toggle { display: block; }
  /* No celular o topo NÃO fica fixo: rola junto com a página */
  .header { position: relative; border-bottom: 3px solid var(--red); }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 99;
    flex-direction: column; gap: 0; background: var(--white);
    border-bottom: 3px solid var(--red); box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { width: 100%; text-align: center; padding: 16px; border-bottom: 1px solid #eee; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin: 16px 0 20px; }
  .contact { grid-template-columns: 1fr; }
  .cta-strip__inner { text-align: center; justify-content: center; }
}
@media (max-width: 600px) {
  .topbar span { display: none; }
  .topbar__inner { justify-content: center; }
  .section { padding: 64px 0; }
  .services, .features { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero__actions .btn { width: 100%; }
  .contact__form { padding: 24px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
  .container { padding: 0 16px; }
  .header__logo img { height: 52px; }
  .hero__content { padding-top: 44px; padding-bottom: 50px; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .hero p { font-size: 1rem; margin-bottom: 26px; }
  .tag { font-size: .7rem; padding: 5px 12px; }
  .hero__actions { gap: 12px; }
  .hero__badges { flex-direction: column; gap: 6px; font-size: .9rem; }
  .btn--lg { padding: 15px 22px; font-size: .9rem; }
  .section__head { margin-bottom: 34px; }
  .service-card { padding: 26px 22px; }
  .cta-strip { padding: 36px 0; }
  .cta-strip .btn { width: 100%; }
  .filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; margin: 0 -16px 24px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; padding: 9px 16px; font-size: .78rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery__item figcaption { font-size: .72rem; padding: 22px 10px 8px; }
  .gallery__item::before { display: none; }
  .center .btn { width: 100%; }
  .contact { gap: 36px; }
  .contact__list a { font-size: 1.25rem; }
  .contact__actions .btn { flex: 1 1 100%; }
  .map { margin-top: 40px; }
  .map iframe { height: 280px; }
  .footer__logo { height: 90px; }
  .whats-float { width: 56px; height: 56px; right: 14px; bottom: 14px; }
  .whats-float svg { width: 30px; height: 30px; }
  .lightbox img { max-height: 70vh; }
}
@media (max-width: 340px) {
  .gallery { grid-template-columns: 1fr; }
  .gallery__item figcaption { font-size: .85rem; }
}
/* Telas sensíveis ao toque: sem efeitos de hover que "grudam" */
@media (hover: none) {
  .btn:hover, .service-card:hover { transform: none; }
  .gallery__item:hover img { transform: none; }
}