/* ============================================================
   MEC CRIO — Camada de Refinamento Visual & UX (2026-10)
   Carregada DEPOIS de styles.css. Não remove nada do layout
   original: apenas ajusta hierarquia, espaçamento, leitura,
   acessibilidade e responsividade. Para reverter, basta tirar
   o <link> de refine.css do index.html.
   ============================================================ */

:root {
  --header-h: 68px;
  --ring: 0 0 0 3px rgba(68, 166, 232, 0.45);
  --shadow-soft: 0 1px 2px rgba(13, 25, 38, 0.04), 0 8px 24px -12px rgba(13, 25, 38, 0.12);
  --shadow-lift: 0 2px 4px rgba(13, 25, 38, 0.05), 0 18px 40px -18px rgba(11, 76, 124, 0.28);
}

html { scroll-padding-top: calc(var(--header-h) + 12px); }

/* Acessibilidade: foco visível para quem navega pelo teclado */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--blue-100); color: var(--blue-900); }

/* ============================================================
   CABEÇALHO — fixo no topo, com logo, menu e ação principal
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}

.header.scrolled { box-shadow: 0 6px 24px -14px rgba(13, 25, 38, 0.35); }

.header-container,
.header-container[class] {
  justify-content: space-between;
  min-height: var(--header-h);
  padding-block: 0.5rem;
  gap: 1rem;
}

.header-logo {
  margin-right: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo picture { display: block; }

.header-logo-img,
.header-logo-img[class] {
  height: 44px;
  width: auto;
  transform: none;
}

.header-logo:hover .header-logo-img { transform: none; opacity: 0.88; }

.header-actions { display: none; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.header-phone {
  display: none;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.25rem;
  white-space: nowrap;
}
.header-phone i { color: var(--accent); font-size: 0.8rem; }
.header-phone:hover { color: var(--accent); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.62rem 1.1rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 6px 16px -8px rgba(14, 111, 163, 0.7);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.header-cta:hover { background: var(--blue-700); color: #fff; transform: translateY(-1px); }

@media (max-width: 480px) {
  .header-logo-img,
  .header-logo-img[class] { height: 38px; }
}

@media (min-width: 768px) {
  .header-actions { display: flex; }
}

@media (min-width: 1280px) {
  .header-phone { display: inline-flex; }
}

/* Menu lateral (celular): escondido por recorte, não por deslocamento.
   Antes ele ficava fora da tela à direita e deixava a página mais larga
   que o celular (arrastava para o lado / zoom-out). */
@media (max-width: 1023.98px) {
  /* Sem desfoque no celular: o desfoque prendia o menu dentro do cabeçalho */
  .header,
  .header[class] { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  /* Menu aberto fica acima do fundo escuro */
  body.nav-is-open .header { z-index: 1001; }

  .nav-toggle { order: 3; margin-right: -6px; position: relative; z-index: 1002; }
  .header-actions { order: 2; margin-left: auto; }

  .nav {
    transform: none;
    clip-path: inset(0 0 0 100%);
    visibility: hidden;
    transition: clip-path 0.35s var(--ease-out), visibility 0s linear 0.35s;
  }
  .nav.open {
    clip-path: inset(0 0 0 -60px);
    visibility: visible;
    transition: clip-path 0.35s var(--ease-out), visibility 0s;
  }
  .nav-link { padding-block: 0.9rem; }
}

/* Menu no computador: logo à esquerda, links ao centro, ação à direita */
@media (min-width: 1024px) {
  .nav,
  .nav[class] { width: auto; flex: 1; gap: 0.15rem; }

  .nav-link,
  .nav-link[class] {
    position: relative;
    font-size: 0.86rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
  }
  .nav-link:hover { transform: none; }

  .nav-link.is-active { color: var(--accent); background: var(--blue-50); }
}

@media (min-width: 1024px) and (max-width: 1180px) {
  .nav-link,
  .nav-link[class] { padding-inline: 0.6rem; font-size: 0.82rem; }
}

/* Barra de aviso: no celular mostra só a frase principal (uma linha) */
@media (max-width: 1023.98px) {
  .announcement-detail { display: none; }
}
@media (max-width: 767.98px) {
  .top-announcement-bar .announcement-content,
  .top-announcement-bar .announcement-content[class] {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.6rem;
    padding-block: 0.45rem;
  }
  .top-announcement-bar .announcement-text { font-size: 0.76rem; line-height: 1.4; }
  .top-announcement-bar .announcement-link { font-size: 0.76rem; margin: 0; }
}

/* ============================================================
   HERO — leitura limpa sobre a foto da fachada
   ============================================================ */
.hero-bg-media {
  background-image: url('assets/img/hero/fachada-mec-crio-mobile.webp');
  background-image: image-set(url('assets/img/hero/fachada-mec-crio-mobile.webp') type('image/webp'), url('assets/img/hero/fachada-mec-crio.jpg') type('image/jpeg'));
}

@media (min-width: 768px) {
  .hero-bg-media {
    background-image: url('assets/img/hero/fachada-mec-crio.webp');
    background-image: image-set(url('assets/img/hero/fachada-mec-crio.webp') type('image/webp'), url('assets/img/hero/fachada-mec-crio.jpg') type('image/jpeg'));
  }
}

.hero-bg-overlay {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.84) 60%, rgba(245, 249, 253, 0.95) 100%);
}

@media (min-width: 992px) {
  .hero-bg-overlay {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.7) 64%, rgba(255, 255, 255, 0.1) 88%),
      linear-gradient(0deg, rgba(245, 249, 253, 0.9) 0%, rgba(245, 249, 253, 0) 22%);
  }
}

.hero { padding-block: 2.75rem 2.5rem; }

@media (min-width: 1024px) {
  .hero { padding-block: 4.5rem 3.5rem; min-height: min(760px, calc(100vh - var(--header-h) - 40px)); display: flex; align-items: center; }
  .hero > .container { width: 100%; }
}

.hero-content { gap: 1.4rem; max-width: 640px; }

/* O logo agora fica no cabeçalho; no topo fica só a assinatura da marca */
.hero-snowflake-glow { display: none; }

/* Rótulo de assinatura: texto limpo com traço de destaque (sem cápsula) */
.hero-brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
}
.hero-brand-sub::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-title,
.hero-title[class] {
  font-size: clamp(1.9rem, 4.6vw, 3.3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--blue-900);
}
.hero-title .gradient-text { color: var(--accent); }

@media (max-width: 767.98px) {
  .hero-title br { display: none; }
  .hero-brand-sub { font-size: 0.62rem; letter-spacing: 0.08em; }
  .hero-brand-sub::before { width: 18px; }
}

/* Prova social: só do tamanho do conteúdo */
.avatar-circles-group,
.avatar-circles-group[class] {
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.hero-subtitle,
.hero-subtitle[class] {
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  color: #2b4459;
  max-width: 560px;
}
.hero-subtitle strong { color: var(--blue-900); font-weight: 600; }

.hero-ctas .btn-primary,
.hero-ctas .btn-secondary {
  min-height: 52px;
  border-radius: 10px;
  letter-spacing: 0.03em;
}

.hero-stats { gap: 0.6rem; margin-top: 0.4rem; }

.hero-stat-card,
.hero-stat-card[class] {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.95rem 0.75rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.hero-stat-number { display: inline-block; font-size: 1.65rem; letter-spacing: -0.02em; }
.hero-stat-label { color: var(--text-secondary); font-size: 0.68rem; }

/* ============================================================
   SEÇÕES — ritmo e títulos consistentes
   ============================================================ */
.section-title,
.section-title[class] { letter-spacing: -0.025em; }

.section-desc { max-width: 620px; margin-inline: auto; }

/* ============================================================
   SERVIÇOS — cartões alinhados e sem "buraco" na última linha
   ============================================================ */
@media (min-width: 640px) {
  .services-grid,
  .services-grid[class] {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }
  .services-grid > .service-card { flex: 0 1 calc((100% - 1.5rem) / 2); }
}

@media (min-width: 1024px) {
  .services-grid > .service-card { flex-basis: calc((100% - 3rem) / 3); }
}

.service-card,
.service-card[class] {
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}
.service-card:hover { box-shadow: var(--shadow-lift); }

.service-icon-box { color: var(--accent); font-size: 1.25rem; }

.service-card-actions {
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.service-card-actions .service-schedule-btn {
  flex: 1;
  justify-content: center;
  min-height: 44px;
  font-size: 0.86rem;
  border-radius: 8px;
}

/* Todos os botões de serviço na mesma cor (o destaque laranja e a loja verde mantêm a deles) */
.service-schedule-btn:not([style]):not(.btn-store-highlight) {
  background: var(--accent);
  opacity: 1;
}
.service-schedule-btn:not([style]):not(.btn-store-highlight):hover { background: var(--blue-700); }

/* ============================================================
   AGENDAMENTO — opções mais fáceis de tocar e de ler
   ============================================================ */
.booking-service-btn {
  border-color: var(--border-light);
  border-radius: 10px;
  padding: 0.95rem 1rem;
  min-height: 92px;
}
.booking-service-btn:hover { border-color: var(--accent-light); }
.booking-service-btn.selected { outline-offset: -1px; box-shadow: 0 8px 20px -14px rgba(14, 111, 163, 0.8); }

.bsvc-icon { color: var(--accent); font-size: 1.2rem; }

/* Número ímpar de opções: a última ocupa a linha inteira */
.booking-services-grid > .booking-service-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

@media (max-width: 380px) {
  .booking-services-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RITMO DAS SEÇÕES — antes eram 6 seções seguidas quase brancas
   (#fff / #f5f9fd). Agora alternam claro / suave e o agendamento
   vira uma faixa escura da marca, o ponto alto da página.
   ============================================================ */
#servicos {
  background: linear-gradient(180deg, #e6eef6 0%, #edf2f8 100%);
  border-top: 1px solid #d9e3ee;
  border-bottom: 1px solid #d9e3ee;
}

#sobre,
#contato { background: #ffffff; }

#faq {
  background: linear-gradient(180deg, #e6eef6 0%, #edf2f8 100%);
  border-top: 1px solid #d9e3ee;
  border-bottom: 1px solid #d9e3ee;
}

/* Agendamento: faixa azul-marinho com o formulário branco em destaque */
#agendamento {
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(68, 166, 232, 0.28), transparent 65%),
    radial-gradient(700px 380px at 100% 100%, rgba(14, 111, 163, 0.22), transparent 70%),
    linear-gradient(180deg, #0b2540 0%, #071a2c 100%);
  border: 0;
}
#agendamento::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}
#agendamento .section-label { color: #7ec4f5; }
#agendamento .section-title { color: #ffffff; }
#agendamento .section-title span { color: #7ec4f5; }
#agendamento .section-desc { color: rgba(240, 248, 255, 0.78); }

#agendamento .booking-step-indicator::before { background: rgba(255, 255, 255, 0.16); }
#agendamento .step-dot {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.75);
}
#agendamento .step-label { color: rgba(240, 248, 255, 0.6); }
#agendamento .booking-step-indicator.active .step-dot { background: #44a6e8; border-color: #44a6e8; color: #04263a; }
#agendamento .booking-step-indicator.active .step-label { color: #7ec4f5; }
#agendamento .booking-step-indicator.done .step-dot { background: #22c55e; border-color: #22c55e; color: #fff; }
#agendamento .booking-step-indicator.done .step-label { color: #86efac; }

#agendamento .booking-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ============================================================
   FAQ, CONTATO E RODAPÉ — acabamentos
   ============================================================ */
.faq-item { border-radius: 12px; }
.faq-question { min-height: 56px; }

.footer-logo { width: 200px; height: auto; }

/* Aviso de privacidade: cartão compacto no celular (antes cobria meia tela) */
@media (max-width: 767.98px) {
  .lgpd-banner,
  .lgpd-banner[class] {
    left: 10px;
    right: 10px;
    bottom: calc(10px + 70px);
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    box-shadow: 0 14px 40px -12px rgba(13, 25, 38, 0.35);
    background: #fff;
  }
  .lgpd-banner-content,
  .lgpd-banner-content[class] { flex-direction: column; align-items: stretch; gap: 0.7rem; text-align: left; }
  .lgpd-banner-icon,
  .lgpd-banner-icon[class] { display: none; }
  .lgpd-banner-text,
  .lgpd-banner-text[class] { text-align: left; }
  .lgpd-banner-text strong { font-size: 0.9rem; }
  .lgpd-banner-text p { font-size: 0.76rem; line-height: 1.45; }
  .lgpd-banner-actions,
  .lgpd-banner-actions[class] { gap: 0.5rem; }
  .lgpd-banner-actions button { flex: 1; padding-block: 0.6rem; border-radius: 8px; }
}

/* ============================================================
   Movimento reduzido: respeita a preferência do sistema
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
