/**
 * Template Público — Padrão
 * QuickSite / SONAD
 * As cores dinâmicas são definidas via CSS variables pelo PHP:
 *   --qs-primary e --qs-secondary (injetadas inline no <head>)
 */

/* ── Reset / Base ──────────────────────────────────────────── */
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* ── Navbar ─────────────────────────────────────────────────── */
.qs-navbar {
  background: rgba(255,255,255,.92) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0,0,0,.06);
  transition: box-shadow .3s;
  position: fixed !important;
  top: 0; left: 0; right: 0; z-index: 1030;
}
.qs-navbar.scrolled { box-shadow: 0 1px 24px rgba(0,0,0,.1); }
.qs-navbar .navbar-brand img { height: 52px; object-fit: contain; }
.qs-navbar .nav-link {
  font-weight: 500; font-size: .9rem;
  color: #374151 !important;
  transition: color .2s; padding: .5rem .85rem !important;
}
.qs-navbar .nav-link:hover { color: var(--qs-primary) !important; }
.qs-navbar .navbar-brand span { color: #0f172a; font-weight: 700; font-size: 1.1rem; }
.qs-navbar .navbar-toggler { border: none; }
.qs-btn-nav,
.qs-navbar .nav-link.qs-btn-nav {
  background: var(--qs-primary) !important; color: #fff !important;
  border-radius: 50px; padding: .4rem 1.1rem !important;
  font-weight: 600 !important; font-size: .85rem !important;
  transition: filter .2s !important;
}
.qs-btn-nav:hover,
.qs-navbar .nav-link.qs-btn-nav:hover { filter: brightness(1.12); color: #fff !important; }

/* ── Hero ──────────────────────────────────────────────────── */
.qs-hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: 6rem 0 4rem;
  background: linear-gradient(145deg, #f0f7ff 0%, #e8f4fb 40%, #f0eeff 100%);
  position: relative; overflow: hidden;
}
.qs-hero::before {
  content: ""; position: absolute;
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--qs-primary) 8%, transparent) 0%, transparent 65%);
  top: -250px; right: -200px; pointer-events: none;
}
.qs-hero::after {
  content: ""; position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.06) 0%, transparent 65%);
  bottom: -100px; left: -100px; pointer-events: none;
}
.qs-hero-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.qs-hero-title {
  font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800;
  line-height: 1.15; color: #0f172a; letter-spacing: -.02em;
}
.qs-hero-sub { color: #475569; font-size: 1.05rem; line-height: 1.65; max-width: 400px; }
.qs-badge-online {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(16,185,129,.1); color: #059669;
  border: 1px solid rgba(16,185,129,.2);
  padding: .35rem .9rem; border-radius: 50px;
  font-size: .8rem; font-weight: 600;
}
.qs-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #10b981; animation: qsPulse 1.5s ease-in-out infinite;
}
@keyframes qsPulse {
  0%,100%{ transform: scale(1); opacity: 1; }
  50%    { transform: scale(1.4); opacity: .6; }
}

/* ── Chat Widget (embutido no hero) ─────────────────────────── */
.qs-chat-widget {
  background: #fff; border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0,0,0,.35);
  overflow: hidden; display: flex; flex-direction: column;
  height: 520px; max-width: 500px; margin: 0 auto;
}
.qs-cw-header {
  background: var(--qs-primary); color: #fff;
  padding: 1rem 1.25rem;
  display: flex; align-items: center; gap: .85rem; flex-shrink: 0;
}
.qs-cw-avatar-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.qs-cw-info strong { font-size: 1rem; display: block; }
.qs-cw-status { font-size: .75rem; opacity: .85; display: flex; align-items: center; gap: .3rem; }
.qs-online-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; }
.qs-cw-messages {
  flex: 1; overflow-y: auto; padding: 1.1rem;
  display: flex; flex-direction: column; gap: .65rem; scroll-behavior: smooth;
}
.qs-cw-messages::-webkit-scrollbar { width: 4px; }
.qs-cw-messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
.qs-cw-msg { display: flex; }
.qs-cw-msg.bot    { justify-content: flex-start; }
.qs-cw-msg.user   { justify-content: flex-end; }
.qs-cw-msg.typing { justify-content: flex-start; }
.qs-cw-bubble {
  max-width: 78%; padding: .6rem .95rem; border-radius: 16px;
  font-size: .9rem; line-height: 1.5; word-break: break-word;
}
.qs-cw-msg.bot  .qs-cw-bubble { background: #f1f5f9; color: #1e293b; border-bottom-left-radius: 4px; }
.qs-cw-msg.user .qs-cw-bubble { background: var(--qs-primary); color: #fff; border-bottom-right-radius: 4px; }
.qs-cw-msg.typing .qs-cw-bubble { background: #f1f5f9; padding: .65rem 1rem; }
.qs-dots { display: inline-flex; gap: 4px; align-items: center; }
.qs-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #94a3b8;
  animation: qsDot .9s ease-in-out infinite;
}
.qs-dots span:nth-child(2){ animation-delay: .15s; }
.qs-dots span:nth-child(3){ animation-delay: .3s; }
@keyframes qsDot {
  0%,80%,100%{ transform: scale(1); opacity: .4; }
  40%        { transform: scale(1.3); opacity: 1; }
}
.qs-cw-quick-btns { display: flex; flex-wrap: wrap; gap: .4rem; padding: .25rem 0 .1rem; }
.qs-cw-quick-btn {
  background: #fff; border: 1.5px solid var(--qs-primary); color: var(--qs-primary);
  border-radius: 20px; padding: .35rem .85rem; font-size: .8rem;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.qs-cw-quick-btn:hover { background: var(--qs-primary); color: #fff; }
.qs-cw-footer { padding: .75rem 1rem 1rem; border-top: 1px solid #f1f5f9; flex-shrink: 0; }
.qs-cw-form {
  display: flex; align-items: center; gap: .5rem;
  background: #f8fafc; border-radius: 50px;
  padding: .3rem .3rem .3rem .85rem;
  border: 1.5px solid #e2e8f0; transition: border-color .2s;
}
.qs-cw-form:focus-within { border-color: var(--qs-primary); }
.qs-cw-input {
  flex: 1; border: none; background: transparent;
  outline: none; font-size: .9rem; color: #1e293b; padding: .3rem 0;
}
.qs-cw-input::placeholder { color: #94a3b8; }
.qs-cw-send {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--qs-primary); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; transition: filter .2s, transform .15s; flex-shrink: 0;
}
.qs-cw-send:hover    { filter: brightness(1.12); transform: scale(1.05); }
.qs-cw-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Seções genéricas ────────────────────────────────────────── */
.qs-section { padding: 5.5rem 0; }
.qs-section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: #0f172a; letter-spacing: -.02em; }
.qs-divider {
  width: 48px; height: 4px; border-radius: 4px;
  background: var(--qs-primary); margin: .75rem auto 2.5rem;
}
.qs-divider.left { margin-left: 0; }

/* ── Sobre ────────────────────────────────────────────────────── */
.qs-sobre-img { border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.1); width: 100%; object-fit: cover; max-height: 400px; }
.qs-dif-item { display: flex; align-items: flex-start; gap: 1rem; }
.qs-dif-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: color-mix(in srgb, var(--qs-primary) 12%, transparent);
  color: var(--qs-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* ── Serviços ─────────────────────────────────────────────────── */
.qs-srv-card {
  border: none !important; border-radius: 18px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.06) !important;
  transition: transform .25s, box-shadow .25s; overflow: hidden;
}
.qs-srv-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,.12) !important; }
.qs-srv-img { height: 180px; object-fit: cover; width: 100%; }
.qs-srv-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: color-mix(in srgb, var(--qs-primary) 10%, transparent);
  color: var(--qs-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.qs-badge-destaque {
  background: var(--qs-primary); color: #fff;
  font-size: .7rem; font-weight: 700; padding: .25rem .6rem;
  border-radius: 50px; white-space: nowrap;
}

/* ── Portfólio ────────────────────────────────────────────────── */
.qs-port-card {
  border: none !important; border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.06) !important;
  transition: transform .25s, box-shadow .25s;
}
.qs-port-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(0,0,0,.14) !important; }
.qs-port-img { width: 100%; height: 210px; object-fit: cover; display: block; }
.qs-port-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.qs-port-card:hover .qs-port-overlay { opacity: 1; }

/* ── Contato ──────────────────────────────────────────────────── */
.qs-contato-card { background: #fff; border-radius: 20px; box-shadow: 0 8px 40px rgba(0,0,0,.08); padding: 2.5rem; }
.qs-contato-input {
  border: 1.5px solid #e2e8f0; border-radius: 10px;
  padding: .75rem 1rem; font-size: .95rem; width: 100%;
  transition: border-color .2s; outline: none; font-family: inherit;
}
.qs-contato-input:focus { border-color: var(--qs-primary); }
.qs-contato-btn {
  background: var(--qs-primary); color: #fff; border: none;
  border-radius: 50px; padding: .8rem 2rem;
  font-size: .95rem; font-weight: 700; cursor: pointer; width: 100%;
  transition: filter .2s, transform .15s;
}
.qs-contato-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.qs-info-item { display: flex; align-items: flex-start; gap: .85rem; padding: .75rem 0; border-bottom: 1px solid #f1f5f9; }
.qs-info-item:last-child { border-bottom: none; }
.qs-info-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  background: color-mix(in srgb, var(--qs-primary) 10%, transparent);
  color: var(--qs-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.qs-maps-embed { border-radius: 14px; overflow: hidden; width: 100%; height: 220px; }
.qs-maps-embed iframe { width: 100%; height: 100%; border: none; }

/* ── Footer ───────────────────────────────────────────────────── */
.qs-footer { background: #0b1120; color: #64748b; padding: 2.5rem 0; }
.qs-footer a { color: #64748b; text-decoration: none; transition: color .2s; }
.qs-footer a:hover { color: #fff; }
.qs-social-links { display: flex; gap: .75rem; flex-wrap: wrap; }
.qs-social-link {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.06); color: #64748b;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background .2s, color .2s; text-decoration: none;
}
.qs-social-link:hover { background: var(--qs-primary); color: #fff !important; }

/* ── Página de Serviço Individual ─────────────────────────────── */
.qs-servico-hero {
  padding: 7rem 0 4rem;
  background: linear-gradient(145deg, #f0f7ff 0%, #e8f4fb 40%, #f0eeff 100%);
  position: relative; overflow: hidden;
}
.qs-servico-hero::before {
  content: ""; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--qs-primary) 8%, transparent) 0%, transparent 65%);
  top: -200px; right: -150px; pointer-events: none;
}
.qs-servico-img {
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.12);
  width: 100%; object-fit: cover; max-height: 420px;
}
.qs-outros-servicos .qs-srv-card { cursor: pointer; }

/* ── Mobile ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .qs-hero { padding: 5rem 0 3rem; min-height: auto; }
  .qs-chat-widget { height: 420px; }
  .qs-hero-title { font-size: 1.9rem; }
  .qs-section { padding: 4rem 0; }
  .qs-contato-card { padding: 1.5rem; }
}
@media (max-width: 575px) {
  .qs-chat-widget { height: 380px; }
  .qs-cw-messages { padding: .75rem; }
  .qs-section { padding: 3rem 0; }
  .qs-section-title { font-size: 1.4rem; }
  .qs-hero-title { font-size: 1.6rem; }
  /* Garante que o chat widget não ultrapasse a viewport */
  .qs-chat-widget { max-width: 100%; }
  /* Footer mobile */
  .qs-social-links { justify-content: center; }
}
