/* ═══════════════════════════════════════════════════════════════════
   VALETAC — pages.css
   Estilos para páginas internas, cards de cluster e mega menu
   ═══════════════════════════════════════════════════════════════════ */

/* ── Page Hero ──────────────────────────────────────────────────── */
.page-hero {
  background: #0f1923;
  padding: 72px 0 48px;
  position: relative;
}
.page-hero h1 {
  color: #fff;
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.page-hero-crumb {
  background: transparent;
  padding: 0;
  margin: 0;
  justify-content: center;
}
.page-hero-crumb .breadcrumb-item,
.page-hero-crumb .breadcrumb-item a       { color: rgba(255,255,255,.65); font-size: 13px; }
.page-hero-crumb .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.35); }
.page-hero-crumb .breadcrumb-item.active  { color: #fff; }

/* ── Banner de serviço ──────────────────────────────────────────── */
.service-banner            { width: 100%; overflow: hidden; max-height: 480px; }
.service-banner img        { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Conteúdo de páginas internas ───────────────────────────────── */
.content-section           { padding: 64px 0; }
.content-section h2        {
  color: #1a1a2e;
  margin-top: 48px;
  margin-bottom: 18px;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.3;
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3        {
  color: #00a853;
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 1.15rem;
  font-weight: 700;
}
.content-section p         { color: #444; line-height: 1.9; margin-bottom: 16px; font-size: 15px; }
.content-section ul.seo-list  { padding-left: 0; list-style: none; margin-bottom: 20px; }
.content-section ul.seo-list li {
  padding: 8px 0 8px 22px;
  position: relative;
  color: #444;
  font-size: 15px;
  line-height: 1.7;
  border-bottom: 1px solid #f0f0f0;
}
.content-section ul.seo-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #00a853;
  font-weight: 700;
}
.content-section ul.seo-list a,
.content-section p a       { color: #00a853; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.content-section ul.seo-list a:hover,
.content-section p a:hover { color: #007a3d; }

.service-card {
  border-left: 4px solid #00a853;
  padding: 16px 22px;
  background: #f8fdf9;
  border-radius: 0 8px 8px 0;
  margin-bottom: 18px;
}
.service-card h3           { margin-top: 0; font-size: 1.05rem; }
.service-card p            { margin-bottom: 0; }

.info-box {
  background: #e8f8f0;
  border: 1px solid #b2e4c8;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
}
.info-box p                { margin: 0; font-size: 14px; color: #1a4d2e; }
.info-box strong           { color: #00a853; }

/* ── Cards de serviço da Home ───────────────────────────────────── */
/* ── Cards de serviço da Home ───────────────────────────────────── */
.col-home-card {
  position:      relative;
  width:         100%;
  padding-left:  15px;
  padding-right: 15px;
}
@media (min-width: 768px) {
  .col-home-card { flex: 0 0 26%; max-width: 26%; }
}

a.home-service-card,
a.home-service-card:hover { text-decoration: none; color: inherit; }

.home-service-card {
  display:        flex;
  flex-direction: column;
  overflow:       hidden;
  transition:     transform .22s ease, box-shadow .22s ease;
  border-top:     3px solid transparent;
}
.home-service-card:hover {
  transform:        translateY(-5px);
  box-shadow:       0 12px 30px rgba(0,0,0,.13) !important;
  border-top-color: #00a853;
}

.home-service-card .item-media { overflow: hidden; }
.home-service-card .item-media img {
  width:           100%;
  height:          150px;
  object-fit:      cover;
  object-position: center;
  display:         block;
  transition:      transform .38s ease;
}
.home-service-card:hover .item-media img { transform: scale(1.06); }

.home-service-card .item-content {
  display:        flex;
  flex-direction: column;
  flex:           1;
  padding:        12px 14px 16px;
}
.home-service-card .item-content h3 {
  font-size:     0.88rem;
  transition:    color .18s;
  margin-bottom: 5px;
}
.home-service-card:hover .item-content h3 { color: #00a853; }
.home-service-card .item-content p {
  flex:      1;
  font-size: 12px;
  color:     #666;
  margin:    0;
  line-height: 1.5;
}

.home-service-btn {
  margin-top:     10px;
  align-self:     center;
  font-size:      11px;
  padding:        4px 12px;
  pointer-events: none;
}
.home-service-card:hover .home-service-btn::after { content: ' →'; }

/* ── Cards de cluster (grid de sub-serviços) ────────────────────── */
.cluster-grid              { padding: 64px 0; }

/* Card como link — acessível e clicável por inteiro */
a.cluster-card,
a.cluster-card:hover       { text-decoration: none; color: inherit; }
.cluster-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
  background: #fff;
  transition: transform .22s ease, box-shadow .22s ease;
  height: 100%;
  cursor: pointer;
}
.cluster-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(0,0,0,.14);
}
.cluster-card__img {
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}
.cluster-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .38s ease;
}
.cluster-card:hover .cluster-card__img img { transform: scale(1.06); }
.cluster-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.cluster-card__body h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 10px;
  line-height: 1.35;
}
.cluster-card__body p {
  font-size: 13px;
  color: #666;
  line-height: 1.65;
  margin: 0 0 16px;
  flex: 1;
}
.cluster-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #00a853;
  transition: gap .18s;
}
.cluster-card:hover .cluster-card__cta { gap: 10px; color: #007a3d; }
.cluster-card__cta::after              { content: '→'; }

/* ═══════════════════════════════════════════════════════════════════
   MEGA MENU
   ═══════════════════════════════════════════════════════════════════ */

/*
 * position:fixed desacopla o mega menu de qualquer contexto de
 * posicionamento (Bootstrap col-*, Superfish ul, etc.).
 * left:50% + translateX(-50%) centra no viewport.
 * O valor de 'top' é recalculado pelo script inline no footer.php
 * usando getBoundingClientRect() do header real.
 */
.sf-menu li.has-mega { position: static !important; }

.sf-menu li.has-mega > ul.mega-menu {
  display:       none;
  position:      fixed !important;
  top:           80px;                  /* fallback; JS sobrescreve */
  left:          50% !important;
  transform:     translateX(-50%) !important;
  margin:        0 !important;
  width:         820px;
  max-width:     calc(100vw - 40px);
  background:    #fff;
  box-shadow:    0 12px 40px rgba(0,0,0,.16);
  border-top:    3px solid #00a853;
  border-radius: 0 0 10px 10px;
  padding:       28px 20px 24px;
  z-index:       99999 !important;
  list-style:    none;
  text-align:    left;
}
/* Superfish revela adicionando sfHover à li pai */
.sf-menu li.has-mega:hover   > ul.mega-menu,
.sf-menu li.has-mega.sfHover > ul.mega-menu {
  display: flex !important;
}

/* Colunas do mega menu */
.mega-col {
  flex: 1;
  padding: 0 20px;
  border-right: 1px solid #eef0ec;
}
.mega-col:last-child        { border-right: none; }

.mega-col-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #00a853 !important;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d4f0e2;
  text-decoration: none !important;
  white-space: nowrap;
}
.mega-col-title:hover       { color: #007a3d !important; }

/* Anula estilos do Superfish nos ULs internos */
.mega-col > ul {
  position:   static !important;
  left:       auto !important;
  top:        auto !important;
  display:    block !important;
  visibility: visible !important;
  opacity:    1 !important;
  box-shadow: none !important;
  background: transparent !important;
  border:     none !important;
  padding:    0 !important;
  margin:     0 !important;
  min-width:  0 !important;
  width:      auto !important;
  list-style: none !important;
}
.mega-col > ul > li {
  display:  block !important;
  width:    100% !important;
  padding:  0 !important;
  margin:   0 !important;
  float:    none !important;
}
.mega-col > ul > li > a {
  display:        block !important;
  font-size:      13px !important;
  color:          #444 !important;
  padding:        5px 0 !important;
  line-height:    1.4 !important;
  white-space:    normal !important;
  border:         none !important;
  background:     transparent !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  text-align:     left !important;
  text-decoration: none !important;
  transition:     color .15s, padding-left .15s;
}
.mega-col > ul > li > a:hover  { color: #00a853 !important; padding-left: 5px !important; }
.mega-col > ul > li.active > a { color: #00a853 !important; font-weight: 700 !important; }

/* Mobile */
@media (max-width: 991px) {
  /* Desativa hover e sfHover — no mobile só abre por clique */
  .sf-menu li.has-mega:hover       > ul.mega-menu,
  .sf-menu li.has-mega.sfHover     > ul.mega-menu { display: none !important; }

  /* Abre somente quando JS adiciona .mobile-open */
  .sf-menu li.has-mega.mobile-open > ul.mega-menu { display: flex !important; }

  .sf-menu li.has-mega > ul.mega-menu {
    position:       static !important;
    width:          100% !important;
    max-width:      100% !important;
    flex-direction: column !important;
    box-shadow:     none !important;
    border:         none !important;
    padding:        0 !important;
    background:     #f5f7f5 !important;
    transform:      none !important;
  }

  /* Seta indicadora de submenu */
  .mega-toggle-arrow {
    display:        inline-block;
    font-size:      10px;
    margin-left:    5px;
    vertical-align: middle;
    transition:     transform .2s;
  }
  .has-mega.mobile-open .mega-toggle-arrow { transform: rotate(180deg); }

  .mega-col {
    border-right:  none;
    border-bottom: 1px solid #dde8dd;
    padding:       12px 16px;
  }
}
