/**
 * Contact page — Super Portistas
 *
 * O mockup dá o aspecto a 1152px; a reflow segue docs/RESPONSIVO.md (mobile-first).
 *
 * @package SuperPortistas
 */

/* ---------------------------------------------------------------------------
 * Page shell — full-bleed hero + centered 1080px content column.
 * ------------------------------------------------------------------------- */
.sp-contact-page {
	background-color: #f4f7fb;
}

/* Neutralise the generic .sp-page-body max-width/padding so the hero can span
 * edge-to-edge; the inner sections re-establish the 1080px column. */
.sp-contact-page__body {
	max-width: none;
	margin: 0;
	padding: 0;
	display: block;
}

/* ---------------------------------------------------------------------------
 * Hero (dark band).
 * ------------------------------------------------------------------------- */
.sp-contact-hero {
	position: relative;
	overflow: hidden;
	border-radius: 0;
	background: #06152b;
	color: #fff;
}

.sp-contact-hero::before {
	content: "";
	position: absolute;
	right: -4%;
	bottom: -60%;
	width: 20rem;
	height: 20rem;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.sp-contact-hero__inner {
	position: relative;
	z-index: 1;
	display: block;
	max-width: 1080px;
	margin: 0 auto;
	padding: 28px 16px;
}

@media (min-width: 640px) {
	.sp-contact-hero__inner {
		padding: 32px 24px;
	}
}

@media (min-width: 768px) {
	.sp-contact-hero__inner {
		padding: 40px 24px;
	}
}

/* Mockup body omits the breadcrumb and the badge. */
.sp-contact-hero__breadcrumb,
.sp-contact-hero__badge {
	display: none;
}

.sp-contact-hero__eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sp-accent, #ff8a3d);
}

/* Passos da escala para H1 de hub em banda escura: 26 / 32 / 40 (RESPONSIVO 1.6). */
.sp-contact-hero__title {
	margin: 0 0 8px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
}

@media (min-width: 768px) {
	.sp-contact-hero__title {
		font-size: 32px;
	}
}

@media (min-width: 1024px) {
	.sp-contact-hero__title {
		font-size: 40px;
	}
}

.sp-contact-hero__intro {
	margin: 0;
	max-width: 520px;
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.7);
}

/* ---------------------------------------------------------------------------
 * Content grid: main column + 300px sidebar (só a partir de `lg`).
 * ------------------------------------------------------------------------- */
.sp-contact-grid {
	max-width: 1080px;
	margin: 0 auto;
	padding: 28px 16px 48px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

@media (min-width: 640px) {
	.sp-contact-grid {
		padding: 32px 24px 56px;
	}
}

/* Lado a lado só em `lg`: a 720px úteis o aside deixaria 380px ao formulário,
   menos do que os dois campos lado a lado precisam (RESPONSIVO 3.5). */
@media (min-width: 1024px) {
	.sp-contact-grid {
		flex-direction: row;
		align-items: flex-start;
		gap: 40px;
		padding: 40px 24px 64px;
	}
}

.sp-contact-grid__main {
	min-width: 0;
}

@media (min-width: 1024px) {
	.sp-contact-grid__main {
		flex: 1;
	}
}

.sp-contact-grid__aside {
	min-width: 0;
}

@media (min-width: 1024px) {
	.sp-contact-grid__aside {
		width: 300px;
		flex-shrink: 0;
	}
}

.sp-contact-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Em tablet o aside é rodapé de conteúdo: numa só coluna a 720px os cartões
   ficariam com 80% de vazio (RESPONSIVO 3.5). */
@media (min-width: 768px) {
	.sp-contact-sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: start;
	}

	.sp-contact-note {
		grid-column: 1 / -1;
	}
}

@media (min-width: 1024px) {
	.sp-contact-sidebar {
		display: flex;
	}
}

/* ---------------------------------------------------------------------------
 * Form card.
 * ------------------------------------------------------------------------- */
.sp-contact-form-card {
	background: #fff;
	border: 1px solid #dfe5ee;
	border-radius: 12px;
}

.sp-contact-form-card__body {
	padding: 20px;
}

@media (min-width: 640px) {
	.sp-contact-form-card__body {
		padding: 24px;
	}
}

@media (min-width: 768px) {
	.sp-contact-form-card__body {
		padding: 30px;
	}
}

.sp-contact-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* O mockup fixa 1fr 1fr; o padrão da casa é 1 coluna até `md` (RESPONSIVO 2). */
.sp-contact-form__row--2 {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

@media (min-width: 768px) {
	.sp-contact-form__row--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.sp-contact-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Labels (override generic .sp-form-label within the contact page). */
.sp-contact-page .sp-form-label {
	margin: 0;
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sp-ink-strong, #33415c);
}

/* Inputs / selects (override generic .sp-input).
 * 16px abaixo de `md` é obrigatório: o iOS Safari faz zoom ao focar um campo
 * com menos de 16px. Os 14px do mockup só entram a partir do tablet. */
.sp-contact-page .sp-input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid #dfe5ee;
	border-radius: 8px;
	background: #fff;
	font-family: "Libre Franklin", sans-serif;
	font-size: 16px;
	color: #0f172a;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 768px) {
	.sp-contact-page .sp-input {
		font-size: 14px;
	}
}

.sp-contact-page .sp-contact-form__select {
	padding: 0 12px;
}

.sp-contact-page textarea.sp-input {
	height: auto;
	min-height: 140px;
	padding: 12px 14px;
	line-height: 1.5;
	resize: vertical;
}

.sp-contact-page .sp-input:focus {
	outline: none;
	border-color: #004b9b;
	box-shadow: 0 0 0 2px #e8f0fa;
}

.sp-contact-page .sp-input::placeholder {
	color: #7c8aa5;
}

/* Enquanto submete, o Alpine desactiva o formulário inteiro. */
.sp-contact-page .sp-input:disabled {
	background: var(--sp-surface-muted, #f4f7fb);
	color: var(--sp-ink-soft, #7c8aa5);
	cursor: not-allowed;
}

.sp-contact-form__hint {
	margin: 0;
	font-size: 12px;
	color: #7c8aa5;
}

.sp-contact-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sp-contact-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	height: 48px;
	padding: 0 26px;
	margin-top: 4px;
	border: none;
	border-radius: 8px;
	background: #004b9b;
	color: #fff;
	font-family: "Libre Franklin", sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

/* Em telemóvel ocupa a largura do cartão; a partir de `sm` volta ao tamanho
   do conteúdo, como no mockup. */
@media (min-width: 640px) {
	.sp-contact-form__submit {
		align-self: flex-start;
	}
}

.sp-contact-form__submit:hover {
	background: #003d7a;
}

.sp-contact-form__submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Anel a rodar do catálogo de estados: 18px, aro a 3px e volta em 0,8s. */
.sp-contact-form__spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: var(--sp-radius-pill, 9999px);
	animation: sp-contact-spin 0.8s linear infinite;
}

@keyframes sp-contact-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {

	.sp-contact-form__spinner {
		animation: none;
	}
}

/* ---------------------------------------------------------------------------
 * Success state (replaces the form inside the same card).
 * ------------------------------------------------------------------------- */
.sp-contact-success {
	text-align: center;
	padding: 18px 0;
}

.sp-contact-success__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: 0 auto 16px;
	border-radius: 9999px;
	background: #f0fdf4;
	color: var(--sp-success, #16a34a);
	font-size: 26px;
	font-weight: 800;
}

.sp-contact-success__title {
	margin: 0 0 8px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.sp-contact-success__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}

/* Contorno neutro, não azul: reenviar não é a acção principal deste ecrã
   (catálogo EstadosFormularios, cartão «Mensagem enviada»). */
.sp-contact-success__btn {
	height: 44px;
	margin-top: 18px;
	padding: 0 18px;
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: 8px;
	background: #fff;
	color: var(--sp-ink-strong, #33415c);
	font-family: "Libre Franklin", sans-serif;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.sp-contact-success__btn:hover {
	border-color: #004b9b;
	color: #004b9b;
}

/* ---------------------------------------------------------------------------
 * Error alert — o desenho vive agora em `.sp-alert--danger` (tailwind-src.css).
 * Aqui fica só o espaço que o separa do formulário.
 * ------------------------------------------------------------------------- */
.sp-contact-form-card__alert {
	margin-bottom: 1.25rem;
}

/* ---------------------------------------------------------------------------
 * FAQ ("Antes de escreveres") — inside the main column, below the form.
 * ------------------------------------------------------------------------- */
.sp-contact-faq {
	margin-top: 28px;
	background: transparent;
	border: 0;
	padding: 0;
	overflow: visible;
}

.sp-contact-faq__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding: 0;
}

.sp-contact-faq__eyebrow {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #004b9b;
}

.sp-contact-faq__rule {
	height: 1px;
	flex: 1;
	background: #dfe5ee;
}

.sp-contact-faq__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 0;
}

.sp-contact-faq__item {
	background: #fff;
	border: 1px solid #dfe5ee;
	border-radius: 12px;
	overflow: hidden;
}

.sp-contact-faq__question {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border: 0;
	background: transparent;
	text-align: left;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	cursor: pointer;
	transition: color 0.2s ease;
}

.sp-contact-faq__question:hover {
	color: #004b9b;
}

.sp-contact-faq__chevron {
	display: inline-flex;
	flex-shrink: 0;
	color: var(--sp-ink-soft, #7c8aa5);
	transition: transform 0.2s ease, color 0.2s ease;
}

.sp-contact-faq__question:hover .sp-contact-faq__chevron {
	color: #004b9b;
}

.sp-contact-faq__chevron.is-open {
	transform: rotate(180deg);
}

.sp-contact-faq__answer {
	padding: 0 20px 16px;
}

.sp-contact-faq__answer p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}

/* ---------------------------------------------------------------------------
 * Sidebar cards.
 * ------------------------------------------------------------------------- */
.sp-contact-scard {
	background: #fff;
	border: 1px solid #dfe5ee;
	border-radius: 12px;
	padding: 22px;
}

.sp-contact-scard__title {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #0f172a;
}

/* Régua de acento — azul porto (o laranja é só do kicker do hero). */
.sp-contact-scard__rule {
	display: block;
	height: 3px;
	width: 44px;
	margin-bottom: 16px;
	background: #004b9b;
	border-radius: 2px;
}

.sp-contact-scard__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sp-contact-scard__list--tight {
	gap: 8px;
}

.sp-contact-scard__row {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sp-contact-scard__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #7c8aa5;
}

.sp-contact-scard__link {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #004b9b;
	text-decoration: none;
	word-break: break-word;
}

.sp-contact-scard__link:hover {
	color: #003d7a;
}

/* Nota box. */
.sp-contact-note {
	background: #e8f0fa;
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: 12px;
	padding: 18px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--sp-ink-strong, #33415c);
}

.sp-contact-note strong {
	color: #004b9b;
}

/* ---------------------------------------------------------------------------
 * FAQ e cartões laterais em telemóvel.
 * ------------------------------------------------------------------------- */
.sp-contact-faq__question {
	min-height: 44px;
}

@media (min-width: 768px) {
	.sp-contact-faq {
		margin-top: 36px;
	}
}
