/* Fallback estático oculto enquanto aguarda Firestore; exibe quando dinâmico carrega ou em fallback */
/* Home: ocultar Portfólio/Blog até haver conteúdo real.
   Para reativar: remova a classe construg-hide-home-feeds do <body> em index.html
   e restaure Portfólio/Blog em construg-nav.js + carrossel do blog. */
body.construg-hide-home-feeds #portfolio,
body.construg-hide-home-feeds #portfolio-carousel,
body.construg-hide-home-feeds .elementor-element-368a620,
body.construg-hide-home-feeds #blog {
  display: none !important;
}

:root {
  --construg-header-offset: 88px;
  --construg-mobile-chrome-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--construg-header-offset);
}
#Inicio,
#sobre,
#portfolio,
#blog,
#contato,
#historia,
#equipe,
#formulario,
#beneficios {
  scroll-margin-top: var(--construg-header-offset);
}

/* CTA Nossa História (seção Sobre da home) */
.construg-about-historia-cta-wrap {
  margin: 1.25rem 0 0 !important;
}
.construg-about-historia-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid #093DAB;
  color: #093DAB !important;
  font-family: "Libre Franklin", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease;
}
.construg-about-historia-cta:hover {
  background: #093DAB;
  color: #fff !important;
}

#portfolio-carousel.construg-static-carousel:not(.construg-dynamic-loaded) {
  display: none !important;
}
.blog-static-wp {
  display: none !important;
}
body.construg-show-static-fallback .blog-static-wp {
  display: flex !important;
}
body.construg-show-static-fallback #portfolio-carousel.construg-static-carousel {
  display: flex !important;
}

.construg-hero-cta-wrap {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  height: auto !important;
}
.construg-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  flex: 0 0 auto;
  min-height: 48px;
  max-height: 56px;
  height: auto !important;
  padding: 12px 28px;
  border-radius: 999px;
  background: #093DAB;
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease;
}
.construg-hero-cta:hover { background: #0773D0; transform: translateY(-1px); }
.construg-hero-cta--secondary {
  background: transparent;
  border: 2px solid #fff;
  color: #fff !important;
}
.construg-hero-cta--secondary:hover { background: rgba(255,255,255,0.12); }

.construg-mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
  background: rgba(1, 28, 72, 0.96);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  gap: 8px;
}
.construg-mobile-cta-bar a {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  color: #fff !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.construg-mobile-cta-bar .construg-mcta-primary { background: #093DAB; }
.construg-mobile-cta-bar .construg-mcta-secondary { background: #0773D0; }

/* Evita menu dropdown Elementor duplicado no desktop */
@media (min-width: 768px) {
  .elementor-nav-menu--dropdown {
    display: none !important;
  }
}

/* Header mobile: gap excessivo logo/toggle (home + Nossa História) */
@media (max-width: 1024px) {
  .elementor-element-bff086d,
  .elementor-element-170efef,
  .elementor-element-6246eff,
  .elementor-element-faed663,
  .header-menu.e-con {
    --gap: 12px 12px !important;
  }
  .elementor-element-6246eff {
    --justify-content: space-between !important;
    --align-items: center !important;
    width: 100%;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  .elementor-element-6246eff > .e-con-inner {
    width: 100%;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .elementor-element-28a40c6 > .elementor-widget-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Toggle do menu: não usa position:fixed desalinhada do header */
  body.elementor-page-462 .menu-toggle {
    position: static;
    top: auto;
    right: auto;
    margin: 0;
    flex-shrink: 0;
  }
}

@media (max-width: 767px) {
  :root { --construg-header-offset: 72px; }
  .construg-mobile-cta-bar { display: flex; }
  body.construg-has-mobile-cta { padding-bottom: var(--construg-mobile-chrome-bottom); }
  .construg-hero-cta-wrap {
    flex-direction: column;
    align-items: stretch;
    padding: 0 16px;
  }
  .construg-hero-cta {
    width: 100%;
    font-size: 0.85rem;
    padding: 12px 20px;
    min-height: 48px;
  }
  #site-footer .footer-contact-link span {
    white-space: normal;
    word-break: break-word;
  }
  #site-footer {
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    margin-left: 0 !important;
    position: relative !important;
  }
  .construg-about-historia-cta {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}
@media (max-width: 380px) {
  .construg-hero-cta { font-size: 0.8rem; }
  .construg-mobile-cta-bar a { font-size: 0.78rem; padding: 10px 6px; }
}

.construg-form-feedback {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  display: none;
}
.construg-form-feedback--ok {
  display: block;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.construg-form-feedback--err {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.construg-post-chrome {
  background: #011C48;
  color: #fff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.construg-post-chrome a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.construg-post-chrome a:hover { color: #0773D0; }
.construg-post-chrome-cta {
  background: #093DAB;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
}
.construg-post-footer {
  margin-top: 48px;
  padding: 24px;
  text-align: center;
  background: #f5f7fa;
  border-top: 1px solid #e2e8f0;
}
.construg-post-footer a { color: #093DAB; font-weight: 600; }

/* Cookie consent LGPD */
.construg-cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(1, 28, 72, 0.96);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}
body.construg-has-mobile-cta .construg-cookie-banner {
  bottom: var(--construg-mobile-chrome-bottom);
}
.construg-cookie-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}
.construg-cookie-banner p { margin: 0; flex: 1 1 280px; }
.construg-cookie-banner a { color: #93c5fd; }
.construg-cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.construg-cookie-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}
.construg-cookie-btn--primary { background: #093DAB; color: #fff; }
.construg-cookie-btn--secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.45); }

.construg-newsletter-hidden,
.elementor-element-2247d2c.construg-newsletter-hidden {
  display: none !important;
}

@media (max-width: 767px) {
  .construg-hide-mobile-scroll-top {
    display: none !important;
  }
}

/* Selos de confiança (home) */
.construg-trust-bar {
  background: linear-gradient(180deg, #f4f7fb 0%, #eef3f9 100%);
  padding: 48px 24px;
  border-top: 1px solid rgba(1, 28, 72, 0.06);
  border-bottom: 1px solid rgba(1, 28, 72, 0.06);
}
.construg-trust-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.construg-trust-bar-title {
  margin: 0 0 24px;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: #011C48;
  font-weight: 700;
}
.construg-trust-bar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.construg-trust-bar-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(1, 28, 72, 0.08);
  border-radius: 12px;
  color: #011C48;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}
.construg-trust-bar-check {
  color: #093DAB;
  font-weight: 700;
}

.construg-service-area {
  margin: 12px 0 0;
  font-size: 0.95rem;
  color: #334155;
  font-weight: 500;
}

/* Blog: lista dinâmica ocupa a coluna principal; evita layout espremido */
#blog-firestore-list {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
#blog-firestore-list .elementor-posts-container {
  width: 100%;
}
