/*
 * Carta D'Ouro, secção de cartas e página de cada carta.
 * Tudo com prefixo .wtb- para não tocar no tema.
 * Fundo, cores e letra copiados da secção de topo da página (Elementor, secção dc24164).
 */

:root {
	--wtb-bg: #232121;
	--wtb-bg-opacity: 0.72;
	--wtb-gold: #be9b41;
	--wtb-gold-deep: #ae8400;
	--wtb-ink: #ffffff;
	--wtb-ink-soft: rgba(255, 255, 255, 0.86);
	--wtb-ink-mute: rgba(255, 255, 255, 0.62);
	--wtb-line: rgba(190, 155, 65, 0.28);
	--wtb-card: rgba(0, 0, 0, 0.26);
	--wtb-font-display: "Black Drama Rough", Georgia, serif;
	--wtb-font-body: Georgia, "Times New Roman", serif;
	--wtb-max: 1280px;
	--wtb-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Superfície com o mesmo fundo do topo da página ---------- */

.wtb-surface {
	position: relative;
	isolation: isolate;
	background-color: var(--wtb-bg);
	color: var(--wtb-ink);
	font-family: var(--wtb-font-body);
}

.wtb-surface::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: var(--wtb-bg-image, none);
	opacity: var(--wtb-bg-opacity);
	pointer-events: none;
}

.wtb-gold {
	color: var(--wtb-gold-deep);
}

.wtb-display {
	margin: 0;
	font-family: var(--wtb-font-display);
	font-weight: 400;
	line-height: 1.05;
	color: var(--wtb-ink);
	text-wrap: balance;
}

.wtb-meta {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 10px;
	font-family: var(--wtb-font-body);
	font-size: 15px;
	font-style: italic;
	color: var(--wtb-ink-mute);
}

.wtb-dot {
	color: var(--wtb-gold);
}

/* ---------- Seta "Descobrir a Carta D'Ouro" ---------- */

.wtb-arrow {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: max-content;
	max-width: calc(100vw - 32px);
	margin: 0 auto;
	padding: 8px 16px;
	color: var(--wtb-ink);
	text-decoration: none;
	font-family: var(--wtb-font-body);
	font-size: 19px;
	font-style: italic;
	line-height: 1.2;
	text-align: center;
	transition: color 0.25s var(--wtb-ease);
}

.wtb-arrow:hover,
.wtb-arrow:focus-visible {
	color: var(--wtb-gold);
	text-decoration: none;
}

.wtb-arrow:focus-visible {
	outline: 2px solid var(--wtb-gold);
	outline-offset: 4px;
}

.wtb-arrow__icon {
	color: var(--wtb-gold);
	animation: wtb-bob 2.2s var(--wtb-ease) infinite;
}

/* No fundo do primeiro ecrã, por cima do topo Elementor. Posição calculada no JS. */
.wtb-arrow.is-floating {
	position: absolute;
	left: 50%;
	z-index: 20;
	margin: 0;
	transform: translateX(-50%);
}

@keyframes wtb-bob {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(8px); }
}

/* ---------- Secção de cartas ---------- */

.wtb-section {
	min-height: 100vh;
	min-height: 100svh;
	padding: 40px 24px 120px;
	scroll-margin-top: 0;
}

.wtb-inner {
	max-width: var(--wtb-max);
	margin: 0 auto;
	padding-top: 56px;
}

.wtb-head {
	max-width: 760px;
	margin: 0 auto 56px;
	text-align: center;
}

.wtb-head .wtb-display {
	font-size: clamp(44px, 6vw, 72px);
}

.wtb-intro {
	margin: 18px 0 0;
	font-size: 22px;
	line-height: 1.5;
	color: var(--wtb-ink-soft);
	text-wrap: pretty;
}

/* Flex e não grid: com uma ou duas cartas, ficam centradas em vez de encostadas à esquerda. */
.wtb-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 32px;
}

.wtb-grid > .wtb-card {
	flex: 0 1 calc((100% - 64px) / 3);
	min-width: min(100%, 300px);
}

@media (max-width: 1024px) {
	.wtb-grid > .wtb-card {
		flex-basis: calc((100% - 32px) / 2);
	}
}

.wtb-empty {
	text-align: center;
	font-size: 20px;
	font-style: italic;
	color: var(--wtb-ink-soft);
}

/* ---------- Cartão ---------- */

.wtb-card {
	height: 100%;
}

.wtb-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--wtb-card);
	border: 1px solid var(--wtb-line);
	color: var(--wtb-ink);
	text-decoration: none;
	transition: border-color 0.3s var(--wtb-ease), transform 0.3s var(--wtb-ease);
}

.wtb-card__link:hover,
.wtb-card__link:focus-visible {
	border-color: var(--wtb-gold);
	color: var(--wtb-ink);
	text-decoration: none;
	transform: translateY(-4px);
}

.wtb-card__link:focus-visible {
	outline: 2px solid var(--wtb-gold);
	outline-offset: 3px;
}

.wtb-card__media {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.4);
}

.wtb-card__media picture,
.wtb-card__media img {
	display: block;
	width: 100%;
	height: 100%;
}

.wtb-card__media img {
	object-fit: cover;
	transition: transform 0.6s var(--wtb-ease);
}

.wtb-card__link:hover .wtb-card__media img {
	transform: scale(1.04);
}

.wtb-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 24px 24px 26px;
}

.wtb-card__title {
	margin: 0;
	font-family: var(--wtb-font-display);
	font-size: 30px;
	font-weight: 400;
	line-height: 1.1;
	color: var(--wtb-ink);
	text-wrap: balance;
}

.wtb-card__excerpt {
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--wtb-ink-soft);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wtb-card__more {
	margin-top: auto;
	padding-top: 6px;
	font-size: 17px;
	font-style: italic;
	color: var(--wtb-gold);
}

/* ---------- Botões ---------- */

.wtb-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin-top: 56px;
}

.wtb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 26px;
	border: 1px solid var(--wtb-gold);
	background: var(--wtb-gold);
	color: #1b1b1b;
	font-family: var(--wtb-font-display);
	font-size: 21px;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.25s var(--wtb-ease), color 0.25s var(--wtb-ease);
}

.wtb-button:hover,
.wtb-button:focus-visible {
	background: var(--wtb-gold-deep);
	border-color: var(--wtb-gold-deep);
	color: #1b1b1b;
	text-decoration: none;
}

.wtb-button--ghost {
	background: transparent;
	color: var(--wtb-ink);
}

.wtb-button--ghost:hover,
.wtb-button--ghost:focus-visible {
	background: transparent;
	color: var(--wtb-gold);
}

.wtb-button:focus-visible {
	outline: 2px solid var(--wtb-gold);
	outline-offset: 3px;
}

/* ---------- Página da carta ---------- */

/* O mesmo encaixe por baixo do cabeçalho transparente que o topo da página usa. */
.wtb-single {
	margin-top: -80px;
	padding: 130px 24px 110px;
}

.wtb-article {
	max-width: 820px;
	margin: 0 auto;
}

.wtb-article__head {
	margin-bottom: 36px;
}

.wtb-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
	font-size: 15px;
	color: var(--wtb-ink-mute);
}

.wtb-breadcrumb a {
	color: var(--wtb-gold);
	text-decoration: none;
}

.wtb-breadcrumb a:hover {
	text-decoration: underline;
}

.wtb-breadcrumb [aria-current] {
	overflow: hidden;
	max-width: 42ch;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wtb-article__title {
	margin-bottom: 18px;
	font-size: clamp(46px, 6.4vw, 81px);
}

.wtb-media {
	position: relative;
	margin: 0 0 44px;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid var(--wtb-line);
}

.wtb-media picture,
.wtb-media img,
.wtb-media video,
.wtb-media iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.wtb-media img,
.wtb-media video {
	object-fit: cover;
}

.wtb-play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: rgba(0, 0, 0, 0.18);
	color: var(--wtb-gold);
	cursor: pointer;
	transition: background-color 0.25s var(--wtb-ease);
}

.wtb-play:hover,
.wtb-play:focus-visible {
	background: rgba(0, 0, 0, 0.32);
}

.wtb-play:focus-visible {
	outline: 2px solid var(--wtb-gold);
	outline-offset: -4px;
}

/* ---------- Texto do artigo ---------- */

.wtb-prose {
	font-family: var(--wtb-font-body);
	font-size: 20px;
	line-height: 1.75;
	color: var(--wtb-ink-soft);
}

.wtb-prose > * + * {
	margin-top: 1.1em;
}

.wtb-prose p,
.wtb-prose ul,
.wtb-prose ol,
.wtb-prose blockquote,
.wtb-prose figure,
.wtb-prose table {
	margin-bottom: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

.wtb-prose h2,
.wtb-prose h3 {
	margin-bottom: 0;
	font-family: var(--wtb-font-display);
	font-weight: 400;
	line-height: 1.1;
	text-wrap: balance;
}

.wtb-prose h2 {
	margin-top: 1.8em;
	font-size: 42px;
	color: var(--wtb-ink);
	scroll-margin-top: 120px;
}

.wtb-prose h3 {
	margin-top: 1.5em;
	font-size: 30px;
	color: var(--wtb-gold);
}

.wtb-prose h4 {
	margin-top: 1.4em;
	font-family: var(--wtb-font-body);
	font-size: 21px;
	font-weight: 700;
	color: var(--wtb-ink);
}

.wtb-prose strong {
	color: var(--wtb-ink);
}

.wtb-prose a {
	color: var(--wtb-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wtb-prose a:hover {
	color: var(--wtb-ink);
}

.wtb-prose ul,
.wtb-prose ol {
	padding-left: 1.3em;
}

.wtb-prose li + li {
	margin-top: 0.35em;
}

.wtb-prose li::marker {
	color: var(--wtb-gold);
}

.wtb-prose blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 4px 0 4px 24px;
	border-left: 2px solid var(--wtb-gold);
	font-style: italic;
	font-size: 22px;
	color: var(--wtb-ink);
}

.wtb-prose img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.6em auto;
}

.wtb-prose hr {
	width: 80px;
	margin: 2.4em auto;
	border: 0;
	border-top: 1px solid var(--wtb-gold);
}

.wtb-prose code {
	padding: 2px 6px;
	background: rgba(0, 0, 0, 0.35);
	font-size: 0.85em;
}

.wtb-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 17px;
}

.wtb-prose th,
.wtb-prose td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--wtb-line);
	text-align: left;
}

/* ---------- Subscrever, mais cartas, voltar ---------- */

.wtb-subscribe {
	margin-top: 64px;
	padding: 36px 32px;
	border: 1px solid var(--wtb-line);
	background: var(--wtb-card);
}

.wtb-subscribe__title {
	margin-bottom: 20px;
	font-size: 42px;
}

.wtb-more {
	max-width: var(--wtb-max);
	margin: 100px auto 0;
}

.wtb-more__title {
	margin-bottom: 40px;
	font-size: clamp(40px, 5vw, 56px);
	text-align: center;
}

.wtb-back {
	margin: 64px 0 0;
	text-align: center;
}

/* ---------- Ecrãs mais pequenos ---------- */

@media (max-width: 1024px) {
	/* Mesmo encaixe do topo Elementor em tablet: margem -230px, padding 230px. */
	.wtb-single {
		margin-top: -230px;
		padding-top: 270px;
	}
}

@media (max-width: 767px) {
	.wtb-section {
		padding: 24px 18px 90px;
	}

	.wtb-inner {
		padding-top: 32px;
	}

	.wtb-head {
		margin-bottom: 40px;
	}

	.wtb-intro {
		font-size: 19px;
	}

	.wtb-grid {
		gap: 24px;
	}

	.wtb-grid > .wtb-card {
		flex-basis: 100%;
	}

	.wtb-card__title {
		font-size: 27px;
	}

	.wtb-single {
		padding: 260px 18px 90px;
	}

	.wtb-prose {
		font-size: 18px;
	}

	.wtb-prose h2 {
		font-size: 34px;
	}

	.wtb-prose h3 {
		font-size: 26px;
	}

	.wtb-subscribe {
		padding: 28px 20px;
	}

	.wtb-subscribe__title {
		font-size: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wtb-arrow__icon {
		animation: none;
	}

	.wtb-card__link,
	.wtb-card__media img,
	.wtb-arrow,
	.wtb-button {
		transition: none;
	}

	.wtb-card__link:hover,
	.wtb-card__link:focus-visible,
	.wtb-card__link:hover .wtb-card__media img {
		transform: none;
	}
}

/* ---------- Imagens no texto (BlogFigure) ---------- */

.wtb-prose .wtb-figure {
	margin: 2em 0;
}

.wtb-prose .wtb-figure img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	border: 1px solid var(--wtb-line);
	background: rgba(0, 0, 0, 0.4);
}

.wtb-prose .wtb-figure figcaption {
	margin-top: 10px;
	font-size: 16px;
	font-style: italic;
	line-height: 1.5;
	color: var(--wtb-ink-mute);
	text-align: center;
}

.wtb-prose .wtb-figure-grid {
	display: grid;
	grid-template-columns: repeat(var(--wtb-cols, 2), minmax(0, 1fr));
	gap: 16px;
	margin: 2em 0;
}

.wtb-prose .wtb-figure-grid .wtb-figure {
	margin: 0;
}

.wtb-prose .wtb-figure-grid .wtb-figure img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

@media (max-width: 600px) {
	.wtb-prose .wtb-figure-grid {
		grid-template-columns: 1fr;
	}
}
