/********** Apostila Porto Alegre - CSS Otimizado **********/

:root {
  --brand: #0096D6;
  --accent: #34AD54;
  --muted: #EEF9FF;
  --danger: #D35097;
  --dark: #061429;
  --text-on-primary: #FFFFFF;

  --bp-sm: 576px;
  --bp-md: 768px;
  --bp-lg: 992px;
  --bp-xl: 1200px;
}

/* Respeitar usuários com animação reduzida */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease-out, visibility 0s linear .5s;
  z-index: 99999;
}

#spinner.show {
  transition: opacity .5s ease-out, visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/*** Headings ***/
h1, h2, .fw-bold { font-weight: 800 !important; }
h3, h4, .fw-semi-bold { font-weight: 700 !important; }
h5, h6, .fw-medium { font-weight: 600 !important; }

/*** Botões ***/
.btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
  will-change: transform;
}

.btn-primary,
.btn-secondary {
  color: #FFFFFF;
  background-color: var(--brand);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  background-color: color-mix(in srgb, var(--brand) 90%, #000 10%);
}

.btn-secondary {
  background-color: var(--accent);
}
.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  background-color: color-mix(in srgb, var(--accent) 90%, #000 10%);
}

/* Acessibilidade: foco visível */
.btn:focus-visible, a:focus-visible {
  outline: 3px solid rgba(0,150,214,0.18);
  outline-offset: 4px;
}

.btn-square { width: 36px; height: 36px; }
.btn-sm-square { width: 30px; height: 30px; }
.btn-lg-square { width: 48px; height: 48px; }
.btn-square, .btn-sm-square, .btn-lg-square {
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

/*** Navbar ***/
.navbar-dark .navbar-nav .nav-link {
  font-family: 'Nunito', sans-serif;
  position: relative;
  margin-left: 18px;
  padding: 18px 0;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  transition: .5s;
}

.sticky-top.navbar-dark .navbar-nav .nav-link {
  padding: 18px 0;
  color: #000000;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: var(--brand);
}

.navbar-dark .navbar-toggler {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

@media (max-width: 991.98px) {
  .sticky-top.navbar-dark {
    position: relative;
    background: #FFFFFF;
  }
  .navbar-dark .navbar-nav .nav-link {
    color: var(--dark);
    padding: 10px 0;
  }
}

@media (min-width: 992px) {
  .navbar-dark {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    border-bottom: 1px solid rgba(256, 256, 256, .1);
    z-index: 999;
  }
  
  .sticky-top.navbar-dark {
    position: fixed;
    background: #FFFFFF;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  }

  .navbar-dark .navbar-nav .nav-link::before {
    position: absolute;
    content: "";
    width: 0;
    height: 2px;
    bottom: -1px;
    left: 50%;
    background: var(--brand);
    transition: .5s;
  }

  .navbar-dark .navbar-nav .nav-link:hover::before,
  .navbar-dark .navbar-nav .nav-link.active::before {
    width: 100%;
    left: 0;
  }
}

/*** Carousel ***/
.carousel-item { position: relative; overflow: hidden; }
.carousel-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.carousel-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,30,62,0.35) 0%, rgba(9,30,62,0.55) 70%);
  z-index: 0;
}
.carousel-caption {
  position: absolute;
  z-index: 2;
  left: 6%;
  right: auto;
  bottom: 20%;
  max-width: 520px;
  text-align: left;
  padding: 0;
}
.carousel-caption h1, .carousel-caption p {
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
@media (max-width: 768px) {
  .carousel-caption { left: 4%; bottom: 14%; max-width: 92%; }
  .carousel-caption h1 { font-size: 1.8rem; }
}

/*** Section Title ***/
.section-title::before {
  position: absolute;
  content: "";
  width: 150px;
  height: 5px;
  left: 0;
  bottom: 0;
  background: var(--brand);
  border-radius: 2px;
}
.section-title.text-center::before {
  left: 50%;
  margin-left: -75px;
}

/*** Services ***/
.service-item {
  position: relative;
  min-height: 260px;
  height: auto;
  padding: 30px;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  transition: transform .2s ease, box-shadow .2s ease;
}
.service-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.service-item .service-icon {
  width:64px;
  height:64px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--danger) 40%));
  color:#fff;
  margin-bottom:18px;
}

/*** Facts ***/
@media (min-width: 991.98px) {
  .facts {
    position: relative;
    margin-top: -75px;
    z-index: 1;
  }
}

/*** Links animados ***/
.link-animated a {
  transition: .5s;
}
.link-animated a:hover {
  padding-left: 10px;
  color: var(--brand);
}

/*** Back to top ***/
.back-to-top {
  position: fixed;
  display: none;
  right: 28px;
  bottom: 50px;
  z-index: 1200;
}
.back-to-top.show {
  display:block;
}

/*** Whatsapp Flutuante ***/
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  background-color: #25D366;
  color: #fff;
  border-radius: 50px;
  padding: 10px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
}
.whatsapp-float img {
  width: 24px;
  height: 24px;
}
@media (min-width: 992px) {
  .whatsapp-float { display: none; }
}

/*** Focus e acessibilidade extra ***/
a, button { -webkit-tap-highlight-color: transparent; }
a:focus, button:focus { outline: none; }
a:focus-visible, button:focus-visible {
  outline: 3px solid rgba(52,173,84,0.16);
  outline-offset: 3px;
}

/* pequeno CSS inline para o carousel caption alinhado à esquerda */
    .carousel-caption {
      text-align: left;
      left: 50%;
      right: auto;
      bottom: 40%;
      max-width: 520px;
    }
    @media (max-width: 768px) {
      .carousel-caption { left:10%; bottom:15%; max-width:90%; }
      .carousel-caption h1 { font-size:1.8rem; }
      .carousel-caption p { font-size:1rem; }
    }
    /* botão whatsapp flutuante (opcional) */
    .whatsapp-float {
      position: fixed;
      right: 100px;
      bottom: 50px;
      z-index: 9999;
      background-color: #25D366;
      color: #fff;
      border-radius: 50px;
      padding: 10px 14px;
      box-shadow: 0 6px 18px rgba(0,0,0,0.2);
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
      font-weight:700;
    }
    
    .whatsapp-float img { width:24px; height:24px; }

    /* ========= Estilo para o card WhatsApp (coerente com os demais) ========= */
.service-item.service-cta {
  background: linear-gradient(180deg, rgba(0,150,214,1) 0%, rgba(0,144,214,0.95) 100%);
  color: #fff;
  min-height: 260px;            /* igual aos outros .service-item */
  padding: 30px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

/* mantenha o hover coerente */
.service-item.service-cta:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* título e texto centralizados com espaçamento */
.service-item.service-cta h3,
.service-item.service-cta p {
  color: #fff;
}

/* ícone - manter proporções parecidas com outros */
.service-item.service-cta .service-icon {
  width:64px;
  height:64px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:18px;
  background: rgba(255,255,255,0.12); /* leve fundo para o ícone */
  color: #fff;
  box-shadow: none;
}

/* botão CTA verde (mesma cor do site) */
.service-item.service-cta .btn {
  background: #34AD54;
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  margin-top: 12px;
  font-weight: 700;
}
.service-item.service-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

/* responsividade: espaçamentos menores em telas pequenas */
@media (max-width: 768px) {
  .service-item.service-cta { padding: 22px; min-height: 220px; }
  .service-item.service-cta h3 { font-size: 1.25rem; }
}

/* ====== Estilos para Calculadora Otimizada ====== */
.calc-container {
  background: linear-gradient(180deg, rgba(0,150,214,0.98) 0%, rgba(0,140,200,0.96) 100%);
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* inputs e selects com estilo claro sobre o fundo azul */
.calc-container .form-control,
.calc-container .form-select {
  height: 48px;
  border-radius: 6px;
  border: none;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
}

/* placeholder e texto */
.calc-container .form-control::placeholder { color: rgba(0,0,0,0.45); }

/* resultado destaque (flash) */
#resultado.flash {
  background: #e9f7ec !important;
  transition: background .9s ease;
  color: #08350f;
  font-weight: 700;
}

/* botão calcular e botão whatsapp */
.btn-success { background: #34AD54; border: none; color: #fff; }
#display-orcamento .btn { border-radius: 8px; }

/* responsividade */
@media (max-width: 576px) {
  .calc-container { padding: 18px; min-height: auto; }
  #display-orcamento .btn { font-size: 0.95rem; padding: 10px 12px; }
  .input-group-text { font-size: 0.9rem; }
}

/* ===== Ajustes calculadora: alinhamento e visual ===== */
.calc-container .lead { color: #173643; }

/* Lista com ícones simples */
.checklist li {
  margin-bottom: 0.45rem;
  color: #173643;
  font-size: 0.98rem;
  padding-left: 0.5rem;
  position: relative;
}
.checklist li::before {
  content: "•";
  color: var(--brand);
  position: absolute;
  left: -0.9rem;
  font-weight: 700;
  top: 0;
}

/* callout */
.callout-note { font-size: 0.95rem; color: #083047; }

/* Ações: botão + resultado alinhados */
.calc-actions { display:flex; align-items:center; gap: 12px; }

/* Tornar resultado visualmente consistente */
#resultado { text-align: left; font-weight: 700; background: #f1f1f1; color:#1b2b2b; }

/* flash effect (mantém do snippet anterior) */
#resultado.flash { background: #e9f7ec !important; color: #08350f; }

/* responsividade: empilha no mobile */
@media (max-width: 576px) {
  .calc-actions { flex-direction: column; align-items: stretch; }
  .calc-actions > div[style] { width: 100% !important; min-width: 0 !important; }
  .calc-container { padding: 16px; }
  .section-title h1 { font-size: 1.9rem; }
  .checklist li::before { left: -0.8rem; }
}
/* ===== Ajuste visual do botão Calcular e campo Resultado ===== */
.calc-actions {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 12px;
}

.calc-actions .calc-action-item {
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.calc-actions .btn-success {
  height: 55px;
  font-size: 1rem;
  border-radius: 6px;
  background-color: #34AD54;
  border: none;
  color: #fff;
}

.calc-actions .input-group {
  height: 55px;
}

.calc-actions .input-group-text {
  background-color: #eaeaea;
  border: none;
  font-weight: 600;
}

.calc-actions input#resultado {
  height: 55px;
  border: none;
  background-color: #f5f5f5;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1b2b2b;
}

/* Efeito de destaque no resultado */
#resultado.flash {
  background-color: #e0f5e4 !important;
  transition: background 0.8s ease;
}

/* Mobile: empilha botão e resultado */
@media (max-width: 576px) {
  .calc-actions {
    flex-direction: column;
  }
  .calc-actions .calc-action-item {
    width: 100%;
  }
  .calc-actions .btn-success {
    height: 50px;
  }
}
/* ===== Ajuste definitivo: botão + valor alinhado ===== */
.calc-actions-final {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
}

/* Colunas - ficam 50/50 no desktop */
.calc-left,
.calc-right {
  box-sizing: border-box;
}

/* Força proporções iguais — ajuste % conforme seu layout */
.calc-left { flex: 1 1 58%; }   /* botão ocupa mais espaço */
.calc-right { flex: 1 1 42%; max-width: 42%; }

/* botão: força altura e remove sombras que desalinham */
.calc-btn {
  width: 100%;
  height: 56px;                /* mesma altura do campo */
  min-height: 56px;
  border-radius: 6px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: none !important; /* remove sombras que quebram alinhamento */
  border: none;
}

/* Wrap do resultado: usamos flex para manter R$ e input alinhados */
.resultado-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;                /* mesma altura do botão */
}

/* label do R$ (estilize para combinar) */
.rs-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 100%;
  border-radius: 6px;
  background: #e9e9e9;
  color: #333;
  font-weight: 700;
  border: none;
  padding: 0 8px;
  box-sizing: border-box;
}

/* input do resultado */
.resultado-input {
  height: 56px;
  border-radius: 6px;
  border: none;
  background: #f5f5f5;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0 12px;
  color: #111;
  box-shadow: none;
  box-sizing: border-box;
  width: 100%;
}

/* Efeito flash (já fornecido) */
#resultado.flash {
  background-color: #e6f7e9 !important;
}

/* Small screens: empilha e mantém proporções visuais */
@media (max-width: 576px) {
  .calc-actions-final {
    flex-direction: column;
    gap: 10px;
  }
  .calc-left, .calc-right { width: 100%; max-width: 100%; flex: none; }
  .resultado-wrap { height: 50px; }
  .calc-btn { height: 50px; }
  .rs-label { min-width: 48px; height: 100%; }
  .resultado-input { height: 50px; }
}
