/* --- Cards row --- */
.forms-row{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:24px;
  align-items:stretch;
  margin-top:32px;
}
.section-white.scroll-section { padding-bottom: 56px; }

.form-card{
  border:1px solid #e6e6e6;
  border-radius:12px;
  padding:20px;
  background:#fff;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
}
.form-card h3{
  font-size:1.125rem;
  line-height:1.3;
  margin:0 0 12px;
}
.btn-open-form{
  align-self:flex-start;
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:600;
  cursor:pointer;
  background:#123559; /* use your brand color */
  color:#fff;
}
.btn-open-form:focus{ outline:2px solid #000; outline-offset:2px; }

/* --- Modal base (revisado) --- */
.gf-modal[aria-hidden="true"]{ display:none; }

.gf-modal{
  position:fixed; inset:0; z-index:100000; /* bem alto */
  display:flex; align-items:center; justify-content:center;
  padding:24px; /* respiro nas bordas em telas pequenas */
}

.gf-modal__overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.5);
}

.gf-modal__dialog{
  position:relative; z-index:1;
  width:min(860px, 100%);
  max-height:calc(100vh - 48px); /* nunca passa da viewport */
  margin:0; background:#fff; border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  padding:22px; overflow:auto; /* scroll interno se for longo */
}

.gf-modal__close{
  position:absolute; top:10px; right:10px;
  border:0; background:#f3f3f3; color:#333;
  width:32px; height:32px; border-radius:50%;
  font-size:22px; line-height:32px; text-align:center;
  cursor:pointer;
}

.gf-form-panel[hidden]{ display:none !important; }

/* Responsivo */
@media (max-width: 640px){
  .gf-modal{ padding:14px; }
  .gf-modal__dialog{ width:100%; padding:16px; }
}

.gf-form-panels{ margin-top:6px; }
.gf-form-panel[hidden]{ display:none !important; }

/* Hide duplicate title if you prefer: set title="false" in shortcode above instead */
.gform_wrapper .gform_heading .gform_title{
  font-size:1.25rem; margin-bottom:10px;
}

/* --- A11y helpers --- */
.visually-hidden{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* --- Responsive --- */
@media (max-width: 900px){
  .forms-row{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .forms-row{ grid-template-columns: 1fr; }
  .form-card{ padding:16px; }
  .btn-open-form{ width:100%; text-align:center; }
  .gf-modal__dialog{ width:94vw; padding:16px; }
}