/*
Theme Name: Story Noticias
Theme URI: https://claude.ai
Description: Tema de noticias em formato story. No celular em pé a foto ocupa a tela toda com o título sobre ela. Em paisagem a foto se ajusta à largura, corta o excesso e o texto vai para a lateral, como um banner de propaganda. Bolinhas embaixo navegam entre as notícias.
Author: Claudio
Version: 1.3.1
Text Domain: story-noticias
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
*/

:root {
	--story-ouro: #ffc914;
	--story-texto-claro: #f4f4f4;
	--story-fonte: "Roboto", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-snap-type: y proximity;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--story-fonte);
	font-weight: 400;
	background: #000;
	color: #fff;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

/* ===== STORY (lista da home e arquivos) ===== */

.stories {
	margin: 0;
}

.story {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 520px;
	overflow: hidden;
	background: #111;
	scroll-snap-align: start;
}

.story--sem-foto {
	background: linear-gradient(135deg, #1d2b3a 0%, #0b0f14 100%);
}

.story-media {
	position: absolute;
	inset: 0;
	display: block;
}

.story-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 0%;
	display: block;
}

/* Degradê que deixa o texto legível */
.story::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0) 66%);
}

.story-texto {
	position: absolute;
	z-index: 2;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 0 6vw calc(env(safe-area-inset-bottom, 0px) + 10vh);
}

.story-titulo {
	font-size: clamp(2.1rem, 9vw, 3.4rem);
	line-height: 1.05;
	font-weight: 900;
	letter-spacing: -0.01em;
	margin: 0 0 0.35em;
	color: var(--story-ouro);
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.story-titulo a {
	text-decoration: none;
}

.story-linha {
	font-size: clamp(1.15rem, 4.4vw, 1.6rem);
	line-height: 1.2;
	font-weight: 900;
	margin: 0 0 0.7em;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.story-resumo {
	font-size: clamp(0.95rem, 3.6vw, 1.1rem);
	line-height: 1.5;
	font-weight: 900;
	margin: 0 0 1.1em;
	color: var(--story-texto-claro);
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.story-leia {
	display: inline-block;
	font-size: 1.1rem;
	font-weight: 900;
	color: var(--story-ouro);
	text-decoration: none;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.story-leia:focus-visible,
.story-titulo a:focus-visible,
.story-media:focus-visible {
	outline: 3px solid var(--story-ouro);
	outline-offset: 4px;
}

/* ===== BOLINHAS DE NAVEGAÇÃO ===== */

.story-dots {
	position: fixed;
	z-index: 10;
	left: 50%;
	bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
	transform: translateX(-50%);
	display: flex;
	gap: 12px;
	padding: 8px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.25);
}

.story-dots a {
	display: block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	transition: background 0.2s ease, transform 0.2s ease;
}

.story-dots a.is-active {
	background: var(--story-ouro);
	transform: scale(1.25);
}

/* ===== PAISAGEM (celular deitado ou computador) ===== */

@media (orientation: landscape) and (min-width: 560px) {
	.story {
		min-height: 0;
	}

	.story::before {
		background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 62%);
	}

	.story--alt::before {
		background: linear-gradient(to left, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0) 62%);
	}

	.story-texto {
		top: 50%;
		bottom: auto;
		left: 0;
		right: auto;
		width: min(40vw, 560px);
		transform: translateY(-50%);
		padding: 0 3vw 0 5vw;
	}

	.story--alt .story-texto {
		left: auto;
		right: 0;
		padding: 0 5vw 0 3vw;
		text-align: right;
	}

	.story--alt .story-leia {
		margin-left: auto;
	}

	.story-titulo {
		font-size: clamp(1.8rem, 3.6vw, 3.8rem);
	}

	.story-linha {
		font-size: clamp(1rem, 1.9vw, 1.6rem);
	}

	.story-resumo {
		font-size: clamp(0.9rem, 1.25vw, 1.15rem);
	}
}

/* Telas baixas (celular deitado): resumo limitado a 3 linhas */
@media (orientation: landscape) and (max-height: 500px) {
	.story-resumo {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.story-titulo {
		font-size: clamp(1.5rem, 4vw, 2.2rem);
	}
}

/* Quem prefere menos movimento não recebe a rolagem animada */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.story-dots a {
		transition: none;
	}
}

/* ===== PÁGINA NORMAL DA NOTÍCIA ===== */

body.single-post {
	background: #fff;
	color: #111;
}

.post-topo {
	padding: 1rem 6vw;
	border-bottom: 1px solid #eee;
}

.post-topo a {
	text-decoration: none;
	font-weight: 900;
}

.post-capa {
	margin: 0;
}

.post-capa-img {
	display: block;
	width: 100%;
	height: auto;
}

.post-cabeca {
	padding: 1.5rem 6vw 0;
	max-width: 860px;
	margin: 0 auto;
}

.post-titulo {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 900;
	line-height: 1.08;
	margin: 0.3em 0;
	color: #111;
}

.post-linha {
	font-size: clamp(1.1rem, 2.5vw, 1.4rem);
	font-weight: 900;
	line-height: 1.25;
	color: #333;
	margin: 0 0 1em;
}

.post-meta {
	font-size: 0.9rem;
	color: #666;
	margin: 0;
}

.post-corpo {
	max-width: 860px;
	margin: 0 auto;
	padding: 1.5rem 6vw;
	font-size: 1.125rem;
	line-height: 1.75;
}

.post-corpo p {
	margin: 0 0 1.1em;
}

.post-voltar {
	display: inline-block;
	max-width: 860px;
	margin: 0 6vw 3rem;
	font-weight: 900;
}

/* ===== REFORÇO BORDA A BORDA (v1.1.1) =====
   Garante que a notícia ocupe a tela inteira, encostando nas quatro bordas,
   mesmo com margens ou preenchimentos vindos do site, de plugins ou do WordPress. */
html,
body {
	margin: 0 !important;
	padding: 0 !important;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

html {
	margin-top: 0 !important;
}

.stories {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

.story {
	width: 100% !important;
	max-width: 100% !important;
	height: 100vh !important;
	height: 100dvh !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.story-media,
.story-media img,
.story-img {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	max-width: none !important;
	max-height: none !important;
}

.story-media img {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

/* ===== NOME DO SITE NO TOPO (v1.2) ===== */
.story-marca {
	position: fixed;
	z-index: 10;
	top: calc(env(safe-area-inset-top, 0px) + 3.5vh);
	left: 6vw;
	font-size: clamp(1rem, 3.6vw, 1.3rem);
	font-weight: 900;
	color: #fff;
	text-decoration: none;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

@media (orientation: landscape) and (min-width: 560px) {
	.story-marca {
		top: 4vh;
		left: 5vw;
		font-size: clamp(1rem, 1.6vw, 1.4rem);
	}
}

/* ===== PÁGINAS ESPECIAIS (v1.2.2) ===== */
.pagina-especial {
	padding: 2rem 6vw 4rem;
}

.pagina-titulo {
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 900;
	line-height: 1.1;
	color: var(--story-ouro);
	margin: 0 0 0.8em;
}

.pagina-conteudo {
	font-size: 1.05rem;
	line-height: 1.7;
}

/* ===== PÁGINAS ESPECIAIS, FORMATO ESCURO ORGANIZADO (v1.2.4) ===== */
body.page {
	background: #000;
	color: #fff;
}

body.page .pagina-especial {
	max-width: 860px;
	margin: 0 auto;
	padding: 2.5rem 6vw 5rem;
}

body.page .pagina-titulo, body.single-post .post-titulo {
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 900;
	line-height: 1.1;
	color: var(--story-ouro);
	margin: 0 0 1.2em;
}

body.page .pagina-conteudo, body.single-post .post-corpo {
	font-size: 1.05rem;
	line-height: 1.7;
	color: #f4f4f4;
}

body.page .pagina-conteudo, body.single-post .post-corpo p {
	margin: 0 0 1.2em;
}

body.page .pagina-conteudo, body.single-post .post-corpo h2 {
	font-size: clamp(1.3rem, 2.6vw, 1.75rem);
	font-weight: 900;
	line-height: 1.25;
	color: #fff;
	margin: 2.4em 0 0.6em;
}

body.page .pagina-conteudo, body.single-post .post-corpo h3,
body.page .pagina-conteudo, body.single-post .post-corpo h4 {
	font-size: clamp(1.1rem, 2vw, 1.3rem);
	font-weight: 900;
	color: #fff;
	margin: 2em 0 0.5em;
}

body.page .pagina-conteudo, body.single-post .post-corpo ul,
body.page .pagina-conteudo, body.single-post .post-corpo ol {
	margin: 0 0 1.4em;
	padding-left: 1.4em;
}

body.page .pagina-conteudo, body.single-post .post-corpo li {
	margin: 0 0 0.5em;
}

body.page .pagina-conteudo, body.single-post .post-corpo a {
	color: var(--story-ouro);
}

body.page .pagina-conteudo, body.single-post .post-corpo img,
body.page .pagina-conteudo, body.single-post .post-corpo figure {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.6em auto;
}

body.page .pagina-conteudo, body.single-post .post-corpo figcaption {
	font-size: 0.9rem;
	color: #bdbdbd;
	text-align: center;
	margin-top: 0.5em;
}

/* ===== CARROSSEL DE NOTÍCIAS (v1.2.5) ===== */
.stories--carrossel {
	position: fixed;
	inset: 0;
	overflow: hidden;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
}

.stories--carrossel .story-pista {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
	will-change: transform;
}

.stories--carrossel .story {
	flex: 0 0 100%;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
	.stories--carrossel .story-pista {
		transition: none;
	}
}

/* ===== NOTÍCIAS E PÁGINAS ESCURAS, TOPO FIXO E RODAPÉ (v1.2.6) ===== */
body.single-post {
	background: #000;
	color: #fff;
}

body.single-post .post-linha {
	color: #fff;
}

body.single-post .post-meta {
	color: #bdbdbd;
}

body.single-post .post-voltar {
	color: var(--story-ouro);
}

/* Topo fixo: nome do site à esquerda e botão Home à direita */
body.single-post .post-topo,
body.page .post-topo {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 6vw;
	background: rgba(0, 0, 0, 0.92);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid #222;
}

body.admin-bar.single-post .post-topo,
body.admin-bar.page .post-topo {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar.single-post .post-topo,
	body.admin-bar.page .post-topo {
		top: 46px;
	}
}

.post-topo-marca {
	font-weight: 900;
	color: #fff;
	text-decoration: none;
}

.post-topo-home {
	font-weight: 900;
	color: var(--story-ouro);
	text-decoration: none;
	border: 2px solid var(--story-ouro);
	border-radius: 999px;
	padding: 0.4em 1.1em;
}

.post-topo-home:focus-visible,
.post-topo-marca:focus-visible {
	outline: 3px solid var(--story-ouro);
	outline-offset: 3px;
}

/* Largura de leitura maior, para não ficar uma coluna estreita no centro */
body.page main.pagina-especial,
body.single-post main.post-normal {
	max-width: 960px !important;
	width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
}

body.page .pagina-conteudo,
body.single-post .post-corpo,
body.single-post .post-cabeca,
body.page .pagina-titulo {
	max-width: none !important;
}

/* Rodapé editável */
.site-rodape {
	background: #0b0b0b;
	color: #d6d6d6;
	border-top: 1px solid #222;
	padding: 3rem 6vw 4rem;
	font-size: 0.95rem;
	line-height: 1.6;
}

.site-rodape a {
	color: var(--story-ouro);
}

.site-rodape .rodape-bloco {
	max-width: 960px;
	margin: 0 auto 2rem;
}

.rodape-titulo {
	font-size: 1rem;
	font-weight: 900;
	color: #fff;
	margin: 0 0 0.6em;
}

/* ===== FOTO CENTRALIZADA NA HORIZONTAL (v1.2.7) ===== */
@media (orientation: landscape) and (min-width: 560px) {
	.story-media img {
		object-position: 50% 50%;
	}
}

/* ===== RODAPÉ ALINHADO À ESQUERDA (v1.2.8) ===== */
.site-rodape,
.site-rodape .rodape-bloco,
.site-rodape .wp-block-group,
.site-rodape .wp-block-columns {
	margin-left: 0 !important;
	margin-right: auto !important;
	text-align: left;
	align-items: flex-start;
}

.site-rodape table {
	margin-left: 0 !important;
	margin-right: auto !important;
}

.site-rodape .rodape-bloco {
	max-width: 100%;
}

/* ===== PÁGINAS E NOTÍCIAS SEMPRE ALINHADAS À ESQUERDA (v1.3.1) =====
   Impede que alinhamento central vindo de outro CSS do site ou plugin
   afaste o conteúdo. Blocos marcados como centralizados no Gutenberg continuam centralizados. */
body.page,
body.single-post,
body.page .pagina-especial,
body.single-post .post-normal,
body.page .pagina-conteudo,
body.single-post .post-corpo,
body.page .pagina-titulo,
body.single-post .post-cabeca,
body.single-post .post-titulo,
body.single-post .post-linha,
body.single-post .post-meta {
	text-align: left !important;
}

body.page .pagina-conteudo p,
body.page .pagina-conteudo h1,
body.page .pagina-conteudo h2,
body.page .pagina-conteudo h3,
body.page .pagina-conteudo h4,
body.page .pagina-conteudo li,
body.single-post .post-corpo p,
body.single-post .post-corpo h2,
body.single-post .post-corpo h3,
body.single-post .post-corpo h4,
body.single-post .post-corpo li {
	text-align: left;
}

body.page .has-text-align-center,
body.single-post .has-text-align-center {
	text-align: center !important;
}

body.page .has-text-align-right,
body.single-post .has-text-align-right {
	text-align: right !important;
}
