/* ==========================================================================
   MS INSTALADORA - MODERNIZAÇÃO v2
   Novas seções (trabalhos, FAQ, lightbox), prova real no hero e refinamentos.
   Carregado depois de style.css / responsive.css.
   ========================================================================== */

:root {
  --radius-lg: 20px;
  --radius-md: 14px;
}

::selection {
  background: rgba(255, 107, 0, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--orange-light);
  outline-offset: 3px;
  border-radius: 6px;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 10px);
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  text-wrap: balance;
}

.section-subtitle {
  text-wrap: pretty;
}

/* ---------- Hero ---------- */
.hero-cinematic-title {
  text-wrap: balance;
}

.hero-response-note {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-response-note i {
  color: var(--orange-light);
}

.hero-proof-stack {
  position: relative;
  display: block;
  width: min(100%, 380px);
  height: 440px;
  margin-left: auto;
}

.hero-proof-img {
  position: absolute;
  width: 62%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 4px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-proof-img.img-back {
  top: 0;
  left: 0;
  transform: rotate(-6deg);
}

.hero-proof-img.img-front {
  top: 40px;
  right: 0;
  transform: rotate(5deg);
}

.hero-proof-stack:hover .img-back { transform: rotate(-9deg) translateX(-10px); }
.hero-proof-stack:hover .img-front { transform: rotate(7deg) translateX(10px); }

.hero-proof-caption {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  background: rgba(8, 14, 24, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.86rem;
  color: var(--text-light);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.hero-proof-caption strong { color: #fff; }
.hero-proof-caption i { color: var(--orange-light); font-size: 0.8rem; }

.proof-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-whatsapp);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2);
}

/* ---------- Serviços ---------- */
.service-title {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* ---------- Climatização (foto real vertical) ---------- */
.climatizacao-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center 30%;
}

/* ---------- Promoções ---------- */
.promotions-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.promo-disclaimer {
  margin: 28px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
}

.promo-disclaimer i {
  margin-right: 4px;
}

/* ---------- Trabalhos realizados ---------- */
.works-section {
  padding: 100px 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 107, 0, 0.08), transparent 70%),
    var(--bg-base);
}

.works-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.works-filter {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.works-filter:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.works-filter.active {
  background: var(--orange-accent);
  border-color: var(--orange-accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 0, 0.3);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.work-item {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  cursor: zoom-in;
  aspect-ratio: 3 / 4;
  animation: workIn 0.45s ease both;
}

@keyframes workIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(5, 8, 14, 0.88) 100%);
  pointer-events: none;
}

.work-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  text-align: left;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
}

.work-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 24, 0.7);
  color: #fff;
  font-size: 0.8rem;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition);
}

.work-item:hover img { transform: scale(1.06); }
.work-item:hover .work-zoom,
.work-item:focus-visible .work-zoom { opacity: 1; transform: scale(1); }

.works-cta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: center;
}

.works-cta p {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: #fff;
  font-weight: 600;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(3, 5, 9, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 72px;
  animation: lbIn 0.25s ease;
}

.lightbox[hidden] { display: none; }

@keyframes lbIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-figure {
  margin: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  width: auto;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-figure figcaption {
  color: var(--text-light);
  font-size: 0.92rem;
  text-align: center;
}

.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.lightbox-btn:hover { background: var(--orange-accent); border-color: var(--orange-accent); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Área de atendimento ---------- */
.cities-label {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin: 14px 0 6px;
}

/* ---------- Sobre (foto real vertical) ---------- */
.about-img {
  height: 480px;
  object-position: center 25%;
}

/* ---------- FAQ ---------- */
.faq-section {
  padding: 100px 0;
  background: var(--bg-base);
}

.faq-container {
  max-width: 860px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.faq-item[open] {
  border-color: var(--border-orange);
  background: var(--bg-card-hover);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 22px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.04rem;
  color: #fff;
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 107, 0, 0.12);
  color: var(--orange-light);
  font-size: 1.2rem;
  transition: var(--transition);
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--orange-accent);
  color: #fff;
}

.faq-item p {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item a {
  color: var(--orange-light);
  text-decoration: underline;
}

/* ---------- Formulário ---------- */
.form-privacy-note {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- Rodapé: acesso admin discreto ---------- */
.footer-admin-btn {
  opacity: 0.35;
  font-size: 0.7rem;
  padding: 4px 6px;
}

.footer-admin-btn:hover,
.footer-admin-btn:focus-visible {
  opacity: 1;
}

/* ---------- Painel admin (novos elementos) ---------- */
.admin-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.admin-toast {
  display: none;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
}

.admin-toast.show { display: block; animation: lbIn 0.2s ease; }
.admin-toast.ok { background: rgba(37, 211, 102, 0.12); border: 1px solid rgba(37, 211, 102, 0.4); color: #6ee7a0; }
.admin-toast.error { background: rgba(229, 57, 53, 0.12); border: 1px solid rgba(229, 57, 53, 0.45); color: #ff8a80; }

.auth-footnote {
  margin-top: 18px;
  font-size: 0.76rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}

.btn-block {
  width: 100%;
  justify-content: center;
  font-size: 0.82rem;
  padding: 10px 16px;
}

.btn-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .hero-response-note { justify-content: center; }
  .hero-proof-stack { margin: 0 auto; height: 400px; width: min(100%, 340px); }
  .climatizacao-img { height: 440px; }
  .about-img { height: 420px; }
}

@media (max-width: 768px) {
  .works-section, .faq-section { padding: 70px 0; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .work-caption { font-size: 0.76rem; left: 10px; right: 10px; bottom: 8px; }
  .work-zoom { opacity: 1; transform: scale(1); width: 28px; height: 28px; }
  .lightbox { padding: 60px 8px 24px; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
  .lightbox-figure img { max-height: calc(100vh - 170px); }
  .faq-item summary { font-size: 0.96rem; padding: 18px 52px 18px 18px; }
  .faq-item p { padding: 0 18px 18px; }
}

@media (max-width: 480px) {
  .hero-proof-stack { height: 330px; width: min(100%, 290px); }
  .hero-proof-caption { font-size: 0.78rem; padding: 8px 14px; }
  .climatizacao-img { height: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Logo oficial (PNG/WebP transparente com o nome) ---------- */
.brand-logo-img {
  height: 58px;
  width: auto;
  border-radius: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s ease;
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.03);
}

.mobile-drawer-header .brand-logo-img {
  height: 50px;
}

.footer-logo-img {
  height: 84px;
}

.admin-logo-img {
  height: 44px;
  border-radius: 0;
}

@media (max-width: 768px) {
  .main-header .brand-logo-img { height: 48px; }
  .footer-logo-img { height: 72px; }
}
