/* ============================================================
   COMPONENTES
   ============================================================ */

/* ---------------- BOTÕES ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.6rem;
  min-height: 52px;
  border-radius: var(--r-pill);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 19px; height: 19px; }

.btn-primary { background: var(--petrol-700); color: var(--on-dark); box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--petrol-600); box-shadow: var(--sh-md); }

.btn-secondary { background: var(--sage-600); color: #fff; box-shadow: var(--sh-sm); }
.btn-secondary:hover { background: var(--sage-700); box-shadow: var(--sh-md); }

.btn-ghost { background: transparent; color: var(--petrol-700); border: 1.5px solid var(--petrol-300); }
.btn-ghost:hover { border-color: var(--petrol-600); background: var(--petrol-100); }

.btn-outline-light { background: rgba(255,255,255,0.06); color: var(--on-dark); border: 1.5px solid rgba(255,255,255,0.35); }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.6); }

.btn-whats { background: #1FA855; color: #fff; box-shadow: 0 6px 18px -6px rgba(31,168,85,0.5); }
.btn-whats:hover { background: #16944a; box-shadow: 0 10px 26px -8px rgba(31,168,85,0.6); }

.btn-lg { min-height: 58px; padding: 1.05rem 2rem; font-size: var(--fs-body); }
.btn-block { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--petrol-700);
  transition: gap var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.link-arrow svg { width: 17px; height: 17px; transition: transform var(--dur-fast) var(--ease); }
.link-arrow:hover { color: var(--sage-700); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------------- BADGES ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: var(--fs-cap); font-weight: 600; letter-spacing: 0.02em;
  padding: 0.34rem 0.8rem; border-radius: var(--r-pill);
}
.badge-sage { background: var(--sage-100); color: var(--sage-700); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); }
.badge-petrol { background: var(--petrol-100); color: var(--petrol-700); }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--ink-muted); }

/* ---------------- HEADER ---------------- */
#header-mount {
  /* Reserva o espaço do header (altura + borda inferior) antes da injeção via JS, evitando CLS */
  min-height: calc(var(--header-h) + 1px);
}
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,244,239,0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--sh-xs); background: rgba(247,244,239,0.92); }
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-5);
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand .brand-name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.5rem; color: var(--petrol-700); letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand .brand-sub {
  font-size: 0.66rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--ink-muted); margin-top: 3px;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: var(--sp-2); }
.nav a {
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-soft);
  padding: 0.5rem 0.85rem; border-radius: var(--r-pill);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  position: relative;
}
.nav a:hover { color: var(--petrol-700); }
.nav a.active { color: var(--petrol-700); font-weight: 600; }
.nav a.active::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 2px;
  height: 2px; background: var(--gold-500); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: var(--sp-3); }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: var(--r-pill); align-items: center; justify-content: center; color: var(--petrol-700); }
.menu-toggle:hover { background: var(--surface); }
.menu-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1024px) {
  .nav, .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------------- MOBILE DRAWER ---------------- */
.drawer-scrim {
  position: fixed; inset: 0; background: rgba(17,45,54,0.4);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur); z-index: 150;
  backdrop-filter: blur(2px);
}
.drawer-scrim.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(86vw, 360px);
  background: var(--bg); z-index: 160; box-shadow: var(--sh-lg);
  transform: translateX(100%); transition: transform var(--dur) var(--ease);
  display: flex; flex-direction: column; padding: var(--sp-5);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.drawer-head .brand-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; color: var(--petrol-700); }
.drawer-close { width: 46px; height: 46px; border-radius: var(--r-pill); display: grid; place-items: center; color: var(--ink-soft); }
.drawer-close:hover { background: var(--surface); }
.drawer-close svg { width: 24px; height: 24px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a {
  font-size: 1.15rem; font-weight: 500; color: var(--ink-warm);
  padding: 1rem 0.75rem; border-radius: var(--r-md); min-height: 44px;
  display: flex; align-items: center; transition: background var(--dur-fast) var(--ease);
}
.drawer-nav a:hover, .drawer-nav a.active { background: var(--surface); color: var(--petrol-700); }
.drawer-foot { margin-top: auto; padding-top: var(--sp-5); display: grid; gap: var(--sp-3); }

/* ---------------- FOOTER ---------------- */
.site-footer { background: var(--petrol-900); color: var(--on-dark-mut); }
.footer-top { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--sp-7); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { font-family: var(--font-display); font-size: 1.7rem; color: var(--on-dark); font-weight: 600; }
.footer-brand .brand-sub { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--gold-300); margin-top: 5px; }
.footer-brand p { margin-top: var(--sp-4); max-width: 32ch; font-size: var(--fs-sm); line-height: var(--lh-relaxed); }
.footer-col h5 { font-family: var(--font-body); font-size: var(--fs-cap); text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold-300); font-weight: 600; margin-bottom: var(--sp-4); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a, .footer-col li { font-size: var(--fs-sm); color: var(--on-dark-mut); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--on-dark); }
.footer-social { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }
.footer-social a { width: 42px; height: 42px; border-radius: var(--r-pill); display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.16); color: var(--on-dark-mut); transition: all var(--dur-fast) var(--ease); }
.footer-social a:hover { background: rgba(255,255,255,0.08); color: var(--on-dark); border-color: rgba(255,255,255,0.3); }
.footer-social svg { width: 19px; height: 19px; }
.footer-note { font-size: var(--fs-cap); line-height: var(--lh-relaxed); color: var(--on-dark-mut); opacity: 0.85; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-block: var(--sp-5); }
.footer-bottom .wrap-wide { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.footer-bottom p { font-size: var(--fs-cap); color: var(--on-dark-mut); opacity: 0.8; }
.pending { color: var(--gold-300); font-style: italic; }

/* ---------------- CARDS ---------------- */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-6);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--line-soft); }

/* card "como posso ajudar" — com ícone */
.help-card { display: flex; flex-direction: column; gap: var(--sp-4); }
.help-card .icon-wrap {
  width: 56px; height: 56px; border-radius: var(--r-md);
  display: grid; place-items: center; background: var(--sage-100); color: var(--sage-700);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.help-card:hover .icon-wrap { background: var(--sage-600); color: #fff; }
.help-card .icon-wrap svg { width: 28px; height: 28px; }
.help-card h3 { font-size: 1.4rem; }
.help-card p { font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-relaxed); }

/* card de serviço */
.svc-card { display: flex; flex-direction: column; gap: var(--sp-4); height: 100%; }
.svc-card .svc-num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-600); font-weight: 600; }
.svc-card h3 { font-size: 1.5rem; }
.svc-card p { font-size: var(--fs-sm); color: var(--ink-soft); flex: 1; }
.svc-card .link-arrow { margin-top: var(--sp-2); }

/* card de blog */
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.post-card .ph { border-radius: 0; border: none; border-bottom: 1px solid var(--line); min-height: 220px; }
.post-card .post-body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; }
.post-meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-cap); color: var(--ink-muted); }
.post-card h3 { font-size: 1.4rem; line-height: 1.2; }
.post-card p { font-size: var(--fs-sm); color: var(--ink-soft); flex: 1; }

/* ---------------- TIMELINE ---------------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: var(--sp-6); padding-left: var(--sp-6); }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold-300), var(--sage-300)); }
.tl-item { position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-6) + 1px); top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2.5px solid var(--gold-500);
}
.tl-year { font-family: var(--font-body); font-size: var(--fs-cap); font-weight: 700; letter-spacing: 0.08em; color: var(--sage-700); text-transform: uppercase; }
.tl-item h4 { margin-top: 4px; font-size: 1.3rem; }
.tl-item p { margin-top: 6px; font-size: var(--fs-sm); color: var(--ink-soft); }

/* ---------------- FAQ ---------------- */
.faq { display: flex; flex-direction: column; gap: var(--sp-3); }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: 1.25rem 1.4rem; text-align: left; font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 600; color: var(--ink-warm); min-height: 44px;
}
.faq-q .chev { flex-shrink: 0; width: 22px; height: 22px; color: var(--sage-600); transition: transform var(--dur) var(--ease); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); }
.faq-a-inner { padding: 0 1.4rem 1.3rem; font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-relaxed); }

/* ---------------- BLOCO DE AVISO ÉTICO ---------------- */
.ethics {
  background: var(--surface); border: 1px solid var(--sage-300);
  border-left: 4px solid var(--sage-600);
  border-radius: var(--r-md); padding: var(--sp-6);
  display: flex; gap: var(--sp-5); align-items: flex-start;
}
.ethics .ethics-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--r-pill); background: var(--sage-100); display: grid; place-items: center; color: var(--sage-700); }
.ethics .ethics-icon svg { width: 25px; height: 25px; }
.ethics h4 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.ethics p { font-size: var(--fs-sm); color: var(--ink-soft); line-height: var(--lh-relaxed); }
.ethics strong { color: var(--petrol-700); }
@media (max-width: 560px) { .ethics { flex-direction: column; gap: var(--sp-4); } }

/* ---------------- BANNER PETRÓLEO (palestras) ---------------- */
.banner-petrol {
  position: relative; background: var(--petrol-700); color: var(--on-dark);
  border-radius: var(--r-xl); padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  overflow: hidden;
}
.banner-petrol::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(123,161,133,0.22), transparent 55%),
    radial-gradient(80% 100% at 0% 100%, rgba(201,169,110,0.16), transparent 60%);
  pointer-events: none;
}
.banner-petrol > * { position: relative; }
.banner-petrol h2 { color: var(--on-dark); }
.banner-petrol .lead { color: var(--on-dark-mut); }

/* ---------------- FORMULÁRIO ---------------- */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-warm); }
.field label .req { color: var(--gold-700); }
.field input, .field textarea, .field select {
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--r-md); padding: 0.9rem 1.05rem; font-size: var(--fs-body);
  color: var(--ink); min-height: 52px; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; line-height: var(--lh-body); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--petrol-500); box-shadow: 0 0 0 3px rgba(62,119,133,0.16);
}
.field .hint { font-size: var(--fs-cap); color: var(--ink-muted); }
.field.error input, .field.error textarea { border-color: #c0563f; }
.field .err-msg { font-size: var(--fs-cap); color: #c0563f; display: none; }
.field.error .err-msg { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-success { display: none; background: var(--sage-100); border: 1px solid var(--sage-300); border-radius: var(--r-md); padding: var(--sp-5); color: var(--sage-700); }
.form-success.show { display: flex; gap: var(--sp-4); align-items: center; }
.form-success svg { width: 26px; height: 26px; flex-shrink: 0; }

/* ---------------- WHATSAPP FLUTUANTE ---------------- */
.whats-fab {
  position: fixed; right: clamp(1rem, 2vw, 1.75rem); bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: 120; width: 60px; height: 60px; border-radius: var(--r-pill);
  background: #1FA855; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 30px -6px rgba(31,168,85,0.55); transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.whats-fab:hover { transform: scale(1.06); box-shadow: 0 14px 36px -6px rgba(31,168,85,0.65); }
.whats-fab svg { width: 32px; height: 32px; }
.whats-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid #1FA855; animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse { 0% { opacity: 0.6; transform: scale(1); } 70%,100% { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .whats-fab::after { animation: none; display: none; } }

/* ---------------- PAGE HERO (páginas internas) ---------------- */
.page-hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2rem,1.5rem+3vw,3.5rem); background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: var(--sp-4); }
.page-hero .display { max-width: 16ch; }
.page-hero .lead { margin-top: var(--sp-5); max-width: 56ch; }
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-cap); color: var(--ink-muted); margin-bottom: var(--sp-5); }
.breadcrumb a:hover { color: var(--petrol-700); }
.breadcrumb svg { width: 14px; height: 14px; }

/* ---------------- CARROSSEL DE SERVIÇOS (Home) ---------------- */
.svc-carousel-controls {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.svc-carousel-btn {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--petrol-700);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.svc-carousel-btn:hover {
  border-color: var(--petrol-300);
  background: var(--petrol-100);
  box-shadow: var(--sh-sm);
}
.svc-carousel-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.svc-carousel-btn svg { width: 18px; height: 18px; }

.svc-carousel-counter {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink-muted);
  min-width: 56px;
  text-align: center;
  line-height: 1;
}
.svc-carousel-counter .js-svc-cur {
  color: var(--petrol-700);
  font-weight: 600;
}

.svc-carousel { position: relative; }

.svc-carousel-viewport { overflow: hidden; }

.svc-carousel-track {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
  margin: 0; padding: 0;
  will-change: transform;
}

.svc-carousel-track li {
  list-style: none;
  flex-shrink: 0;
  display: flex;
}

.svc-carousel-track .svc-card { height: 100%; width: 100%; }

.svc-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.svc-dot {
  width: 28px; height: 4px;
  padding: 0; border: none;
  border-radius: 2px;
  background: var(--line);
  cursor: pointer;
  transition: width var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.svc-dot.is-active {
  width: 44px;
  background: var(--petrol-600);
}
.svc-dot:hover:not(.is-active) { background: var(--petrol-300); }
.svc-dot:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.svc-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .svc-carousel-track { transition: none !important; }
  .svc-dot { transition: background var(--dur-fast) linear; }
}
