/* Crédito Habitação: página completa do shortcode [core_credito]. Tudo dentro de .core-cred. */
.core-cred { width: 100%; max-width: 1080px; margin: 0 auto; font-family: 'Inter', -apple-system, sans-serif; color: #041456; box-sizing: border-box; padding: 4px 0 40px; line-height: 1.55; }
.core-cred * { box-sizing: border-box; }
.core-cred h2, .core-cred h3, .core-cred p, .core-cred ul, .core-cred ol { margin-top: 0; }

/* O tema põe as páginas numa coluna de 8/12 com uma barra lateral vazia: aqui a página usa a largura toda. */
.row:has(.core-cred) > .bt-content-wrap { flex: 0 0 100%; max-width: 100%; }
.row:has(.core-cred) > .bt-sidebar-wrap { display: none; }
.page-content-wrap:has(.core-cred) { padding-left: 0; padding-right: 0; }
body:has(.core-cred) { overflow-x: clip; }

.core-cred-t { font-family: 'Lora', serif; font-weight: 700; line-height: 1.1; color: #041456; margin: 0 0 16px; text-wrap: balance; font-size: clamp(36px, 6vw, 68px); }
.core-cred-t em { font-style: italic; color: #6b5228; font-weight: 500; }
.core-cred-h2 { font-family: 'Lora', serif; font-weight: 700; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; color: #041456; margin: 0 0 18px; }
.core-cred-eyebrow { font: 600 12px 'Inter', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #6b5228; margin: 0 0 14px; }
.core-cred-lead { font-size: clamp(16px, 1.6vw, 18px); color: #4a5580; max-width: 540px; margin: 0 auto 26px; }

/* Botões */
.core-cred-btn { appearance: none; display: inline-block; background: #041456; color: #fff; border: 1.5px solid #041456; border-radius: 28px; padding: 13px 30px; font: 600 15px 'Inter', sans-serif; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.core-cred-btn:hover { background: #d9c48f; border-color: #d9c48f; color: #041456; }
.core-cred-btn--ghost { background: transparent; color: #041456; border-color: #d9c48f; }
.core-cred-btn--ghost:hover { background: #f2ecd9; border-color: #041456; }
.core-cred-btn:disabled { opacity: .6; cursor: default; }

/* Cabeçalho: título em pergunta e as três cartas */
.core-cred-hero { text-align: center; padding-top: 8px; }
.core-cred-cartas { display: flex; justify-content: center; gap: 16px; margin: 30px 0 38px; }
.core-cred-carta { width: 220px; background: #fff; border: 1px solid #e4d7ae; border-radius: 12px; padding: 18px; box-shadow: 0 12px 30px rgba(107,82,40,.15); text-align: left; }
.core-cred-carta:nth-child(1) { transform: rotate(-3deg) translateY(10px); }
.core-cred-carta:nth-child(2) { transform: translateY(-6px); }
.core-cred-carta:nth-child(3) { transform: rotate(3deg) translateY(10px); }
.core-cred-carta small { display: block; font: 600 10.5px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #6b5228; }
.core-cred-carta h3 { font: 700 21px 'Lora', serif; margin: 6px 0 6px; color: #041456; }
.core-cred-carta p { margin: 0; font-size: 13.5px; color: #4a5580; }

/* Formulário em 3 passos: o passo seguinte só aparece depois de preencher o anterior */
.core-cred-form { max-width: 940px; margin: 0 auto; }
.core-cred-form[hidden], .core-cred-ok[hidden] { display: none; }
.core-cred-ind { text-align: center; font: 600 13px 'Inter', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #6b5228; margin: 0 0 14px; }
.core-cred-ind b { font-size: 15px; color: #041456; }
.core-cred-pn[hidden] { display: none; }
.core-cred-barra { display: grid; grid-template-columns: 1.25fr 1fr 1fr auto; gap: 12px; align-items: end; background: #fff; border: 1px solid #e4d7ae; border-radius: 22px; box-shadow: 0 14px 40px rgba(107,82,40,.13); padding: 18px; }
.core-cred-barra .core-cred-campo { margin: 0; }
.core-cred-barra .core-cred-btn { height: 46px; padding-inline: 26px; }
.core-cred-cartao { background: #fff; border: 1px solid #e4d7ae; border-radius: 18px; box-shadow: 0 14px 40px rgba(107,82,40,.13); padding: 26px; max-width: 640px; margin: 0 auto; }
.core-cred-cartao h3 { font: 700 21px 'Lora', serif; margin: 0 0 14px; color: #041456; }
.core-cred-campo { display: flex; flex-direction: column; gap: 6px; margin: 0 0 13px; min-width: 0; text-align: left; }
.core-cred-campo label { font-size: 13px; font-weight: 600; color: #041456; }
.core-cred-campo input[type="text"], .core-cred-campo input[type="email"], .core-cred-campo input[type="tel"], .core-cred-campo input[type="date"], .core-cred-campo select, .core-cred-campo textarea {
	width: 100%; background: #fbf9f2; color: #041456; border: 1.5px solid #e4d7ae; border-radius: 12px; padding: 11px 14px; font: 400 15px 'Inter', sans-serif; transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; -webkit-appearance: none;
}
.core-cred-campo select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23041456' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.core-cred-campo textarea { resize: vertical; min-height: 84px; }
.core-cred-campo input::placeholder, .core-cred-campo textarea::placeholder { color: #8a90ab; }
.core-cred-campo input:focus, .core-cred-campo select:focus, .core-cred-campo textarea:focus { outline: none; background: #fff; border-color: #d9c48f; box-shadow: 0 0 0 3px rgba(217,196,143,.35); }
.core-cred-campo.tem-erro input, .core-cred-campo.tem-erro select { border-color: #b3261e; }
.core-cred-erro { color: #b3261e; font-size: 12.5px; }
.core-cred-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.core-cred-bot { display: flex; gap: 10px; margin-top: 6px; }
.core-cred-bot .core-cred-btn { flex: 1; text-align: center; }
.core-cred-consent { display: flex; align-items: flex-start; gap: 11px; font-size: 13px; font-weight: 400 !important; line-height: 1.5; cursor: pointer; color: #4a5580; }
.core-cred-consent input { margin-top: 3px; accent-color: #041456; flex: 0 0 auto; }
.core-cred-consent a { color: #041456; text-decoration: underline; text-underline-offset: 3px; }
.core-cred-aviso { margin: 10px 0 12px; color: #b3261e; font-size: 14px; }
.core-cred-aviso--1 { display: none; }
.core-cred-fine { text-align: center; font-size: 13px; color: #6b5228; font-weight: 600; margin: 14px 0 0; }
.core-cred-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.core-cred-ok { text-align: center; background: #f2ecd9; border: 1px solid #e4d7ae; border-radius: 16px; padding: 40px 24px; max-width: 640px; margin: 0 auto; }
.core-cred-ok-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #041456; color: #d9c48f; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.core-cred-ok-titulo { font-family: 'Lora', serif; font-size: 24px; font-weight: 700; margin: 0 0 6px; }

/* Pastilha do Banco de Portugal */
.core-cred-centro { text-align: center; margin-top: 34px; }
.core-cred-pilula { display: inline-flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid #d9c48f; border-radius: 14px; padding: 9px 16px; box-shadow: 0 6px 18px rgba(107,82,40,.12); color: #041456; text-decoration: none; text-align: left; flex-wrap: wrap; justify-content: center; }
.core-cred-bdp { flex: 0 0 auto; height: 28px; width: auto; }
.core-cred-pilula-t b { display: block; font: 700 14px 'Inter', sans-serif; }
.core-cred-pilula-t span { font-size: 12.5px; color: #4a5580; }
.core-cred-pilula-t u { text-decoration: underline; text-underline-offset: 3px; color: #041456; }

/* Logótipos em movimento: uma fila no computador, duas no telemóvel */
.core-cred-parceiros { margin-top: 44px; }
.core-cred-parc-tit { text-align: center; font: 600 12.5px 'Inter', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #6b5228; margin: 0 0 12px; }
.core-cred-faixa { overflow: hidden; border-block: 1px solid #e4d7ae; padding: 16px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.core-cred-pista { display: flex; gap: 18px; width: max-content; animation: core-cred-mover 46s linear infinite; }
.core-cred-faixa:hover .core-cred-pista { animation-play-state: paused; }
.core-cred-inv .core-cred-pista { animation-direction: reverse; }
.core-cred-logo { flex: 0 0 auto; width: 170px; height: 64px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #e4d7ae; border-radius: 12px; padding: 12px 18px; }
.core-cred-logo img { max-width: 100%; max-height: 34px; width: auto; height: auto; object-fit: contain; }
@keyframes core-cred-mover { to { transform: translateX(calc(-50% - 9px)); } }
.core-cred-so-mob { display: none; }
@media (prefers-reduced-motion: reduce) { .core-cred-pista { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } .core-cred-faixa { -webkit-mask-image: none; mask-image: none; } .core-cred-logo.dup { display: none; } }

.core-cred-citlinha { display: flex; justify-content: center; margin-top: 44px; }
.core-cred-cit { font: 500 italic clamp(19px, 2.4vw, 26px)/1.4 'Lora', serif; border-left: 3px solid #d9c48f; padding-left: 20px; margin: 0; max-width: 520px; text-align: left; color: #041456; }

/* Como funciona: a toda a largura, com foto de fundo e sem painel */
.core-cred-banda { margin: 56px calc(50% - 50vw) 0; padding: clamp(30px, 4.5vw, 58px) max(16px, calc(50vw - 540px)); background: linear-gradient(rgba(232, 220, 185, .5), rgba(232, 220, 185, .5)), var(--fundo) center / cover no-repeat; color: #041456; }
.core-cred-banda .core-cred-h2 { color: #041456; text-align: center; font-size: clamp(20px, 2.2vw, 26px); margin: 0 0 4px; text-shadow: 0 0 3px rgba(255,255,255,.95), 0 0 14px rgba(255,255,255,.85); }
.core-cred-passos { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.core-cred-passos::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 1px; background: rgba(4,20,86,.4); }
.core-cred-passos li { position: relative; text-align: center; }
.core-cred-n { position: relative; width: 34px; height: 34px; border-radius: 50%; background: #041456; color: #fff; font: 700 15px 'Lora', serif; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.core-cred-passos h3 { font: 600 14px 'Inter', sans-serif; margin: 0 0 3px; color: #041456; text-shadow: 0 0 3px rgba(255,255,255,.95), 0 0 12px rgba(255,255,255,.85); }
.core-cred-passos p { margin: 0 auto; max-width: 190px; font-size: 12.5px; line-height: 1.4; font-weight: 500; color: #041456; text-shadow: 0 0 3px rgba(255,255,255,.95), 0 0 12px rgba(255,255,255,.85); }

/* Perguntas frequentes: discretas, para não pesarem mais do que o formulário */
.core-cred-faq { margin-top: 56px; }
.core-cred-faq .core-cred-h2 { text-align: center; font-size: clamp(20px, 2.2vw, 24px); }
.core-cred-faq-l { max-width: 760px; margin: 0 auto; }
.core-cred-faq-l details { border-bottom: 1px solid #e4d7ae; }
.core-cred-faq-l summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 12px 0; font: 600 15px 'Inter', sans-serif; }
.core-cred-faq-l summary::-webkit-details-marker { display: none; }
.core-cred-faq-l summary::after { content: "+"; font: 400 22px 'Inter', sans-serif; color: #6b5228; flex: 0 0 auto; }
.core-cred-faq-l details[open] summary::after { content: "–"; }
.core-cred-faq-l details p { margin: 0 0 14px; color: #4a5580; font-size: 14.5px; }

/* Banner final de ver imóveis: a toda a largura, texto alinhado com o conteúdo */
.core-cred-banner { margin: 56px calc(50% - 50vw) 0; background: #f2ecd9; border-block: 1px solid #e4d7ae; display: grid; grid-template-columns: 1fr; }
.core-cred-banner[style*="--banner"] { grid-template-columns: 1.2fr 1fr; }
.core-cred-banner-t { padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 48px) clamp(32px, 5vw, 64px) max(16px, calc(50vw - 540px)); display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.core-cred-banner-f { font: 700 clamp(22px, 2.8vw, 30px)/1.2 'Lora', serif; margin: 0 0 6px; color: #041456; max-width: 640px; }
.core-cred-banner-t small { font-size: 13px; color: #4a5580; margin-bottom: 12px; max-width: 560px; }
.core-cred-banner-foto { background: var(--banner) center / cover no-repeat; min-height: 260px; }

/* Informação legal */
.core-cred-info { margin-top: 36px; padding: 20px 0 0; border-top: 1px solid #e4d7ae; font-size: 13px; line-height: 1.6; color: #4a5580; }
.core-cred-info a { color: #041456; text-decoration: underline; text-underline-offset: 3px; }
.core-cred-info a:hover { color: #6b5228; }
.core-cred-intermediario { margin: 0 0 12px; }
.core-cred-rgpd summary { cursor: pointer; font-weight: 600; color: #041456; font-size: 14px; }
.core-cred-rgpd-corpo { padding-top: 10px; }
.core-cred-rgpd-corpo p { margin: 0 0 10px; }
.core-cred-bancos { columns: 2; column-gap: 24px; margin: 0 0 12px; padding-left: 18px; }
.core-cred-bancos li { margin: 0 0 3px; break-inside: avoid; }

@media (max-width: 920px) {
	.core-cred-banner[style*="--banner"] { grid-template-columns: 1fr; }
	.core-cred-banner-t { padding-inline: max(16px, 4vw); }
	.core-cred-banda { margin-top: 40px; padding: 24px max(16px, 4vw) 22px; }
	.core-cred-banda .core-cred-h2 { font-size: 19px; }
	.core-cred-passos { grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
	.core-cred-passos::before { display: none; }
	.core-cred-passos li { display: grid; grid-template-columns: 28px 1fr; gap: 0 10px; text-align: left; align-items: start; }
	.core-cred-n { width: 26px; height: 26px; font-size: 12.5px; margin: 0; grid-row: span 2; }
	.core-cred-passos h3 { font-size: 13.5px; margin: 0; align-self: center; }
	.core-cred-passos p { max-width: none; margin: 0; font-size: 12.5px; }
	.core-cred-barra { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.core-cred-g2 { grid-template-columns: 1fr; }
	.core-cred-cartao { padding: 22px 18px; }
	.core-cred-bancos { columns: 1; }
	.core-cred-btn { width: 100%; text-align: center; }
	.core-cred-pilula { flex-wrap: wrap; }
	/* logótipos em duas filas, a andar em sentidos opostos */
	.core-cred-so-desk { display: none; }
	.core-cred-so-mob { display: block; border-top: 0; margin-top: 8px; padding: 8px 0; }
	.core-cred-inv { border-top: 0; }
	.core-cred-logo { width: 132px; height: 52px; padding: 8px 12px; }
	.core-cred-logo img { max-height: 28px; }
	/* as três cartas: uma fila, a primeira à frente e a 2 e 3 por trás, com todo o texto visível */
	.core-cred-cartas { gap: 0; padding: 8px 4px 14px; margin: 18px 0 26px; align-items: stretch; }
	.core-cred-carta { position: relative; flex: 1 1 0; width: auto; min-width: 0; padding: 13px 12px 15px; border-radius: 10px; box-shadow: 0 10px 24px rgba(107,82,40,.22); }
	.core-cred-carta + .core-cred-carta { margin-left: -22px; }
	.core-cred-carta:nth-child(1) { z-index: 3; }
	.core-cred-carta:nth-child(2) { z-index: 2; padding-left: 34px; }
	.core-cred-carta:nth-child(3) { z-index: 1; padding-left: 34px; }
	.core-cred-carta small { font-size: 8.5px; letter-spacing: .06em; line-height: 1.25; }
	.core-cred-carta h3 { font-size: 16px; margin: 5px 0 4px; line-height: 1.15; }
	.core-cred-carta p { font-size: 11.5px; line-height: 1.35; }
	.core-cred-barra { padding: 14px; }
}

/* Proteção de dados: ligação sublinhada e pop-up por cima da página */
.core-cred-consent a, .core-cred-rgpd-abrir { color: #041456; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.core-cred-consent a:hover { color: #6b5228; }
body.core-cred-sem-rolagem { overflow: hidden; }
.core-cred-modal { position: fixed; inset: 0; z-index: 2147483000; background: rgba(4,20,86,.58); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.core-cred-modal[hidden] { display: none; }
.core-cred-modal *, .core-cred-modal *::before, .core-cred-modal *::after { box-sizing: border-box; }
.core-cred-modal-caixa { position: relative; width: 100%; max-width: 660px; max-height: 86vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 30px 28px 26px; box-shadow: 0 24px 70px rgba(4,20,86,.4); font-family: 'Inter', -apple-system, sans-serif; color: #1f2a55; outline: none; }
.core-cred-modal-caixa h3 { font: 700 22px 'Lora', serif; color: #041456; margin: 0 40px 14px 0; }
.core-cred-modal-x { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f2ecd9; color: #041456; font: 400 26px/1 'Inter', sans-serif; cursor: pointer; }
.core-cred-modal-x:hover { background: #d9c48f; }
.core-cred-modal .core-cred-rgpd-corpo { padding: 0; font-size: 14px; line-height: 1.6; }
.core-cred-modal .core-cred-rgpd-corpo p { margin: 0 0 12px; }
.core-cred-modal a { color: #041456; text-decoration: underline; text-underline-offset: 3px; }
.core-cred-modal .core-cred-bancos { columns: 2; column-gap: 24px; margin: 0 0 12px; padding-left: 18px; }
.core-cred-modal .core-cred-bancos li { margin: 0 0 3px; break-inside: avoid; }
@media (max-width: 640px) { .core-cred-modal .core-cred-bancos { columns: 1; } .core-cred-modal-caixa { padding: 24px 18px 20px; max-height: 90vh; } }

/* O tema tira o sublinhado às ligações: aqui tem de se ver que são ligações */
.core-cred .core-cred-consent a, .core-cred a.core-cred-rgpd-abrir, .core-cred-modal a { text-decoration: underline !important; text-underline-offset: 3px; }
