/*
 Theme Name:   Via Media
 Theme URI:    https://github.com/wronys-alt/blog-rev-w-ronys-teo
 Description:  Child theme do Divi 5 para o blog Via Media — teologia pública, esperança e formação.
 Author:       W. Ronys
 Template:     Divi
 Version:      0.1.0
 Requires PHP: 8.1
 License:      GPL-2.0-or-later
 Text Domain:  via-media
*/

/* ==========================================================================
   Tokens (spec §7) — espelhados nas Design Variables do Divi na Fase 2
   ========================================================================== */
:root {
	--vm-bg: #ffffff;
	--vm-soft: #fafaf9;
	--vm-ink: #111111;
	--vm-text: #5c5c5c;
	--vm-muted: #6b6b6b; /* 5,1:1 sobre --vm-soft */
	--vm-line: #e8e6e3;
	--vm-amber: #d97757;      /* ícones, fios, detalhes — nunca texto pequeno */
	--vm-amber-text: #b4532a; /* links (5,0:1) */
	--vm-amber-soft: #fbefe9;

	--vm-font-title: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--vm-font-read: "Source Serif 4", Georgia, "Times New Roman", serif;
	--vm-font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	--vm-read: 680px;
	--vm-wide: 1120px;
	--vm-radius: 14px;
	--vm-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
	background: var(--vm-bg);
	color: var(--vm-text);
	font-family: var(--vm-font-ui);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

#page-container,
#main-content,
#et-main-area {
	background: var(--vm-bg);
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.et_pb_post .entry-title {
	font-family: var(--vm-font-title);
	font-weight: 600;
	color: var(--vm-ink);
	letter-spacing: -0.02em;
	line-height: 1.15;
}

a {
	color: var(--vm-amber-text);
	text-underline-offset: 3px;
	transition: color .2s var(--vm-ease);
}

a:hover {
	color: var(--vm-ink);
}

::selection {
	background: var(--vm-amber-soft);
	color: var(--vm-ink);
}

:focus-visible {
	outline: 2px solid var(--vm-amber);
	outline-offset: 3px;
}

/* Remove a linha vertical padrão entre conteúdo e sidebar do Divi */
#main-content .container::before {
	display: none;
}

/* ==========================================================================
   Leitura: conteúdo dos posts em serifa, coluna de 680px
   ========================================================================== */
.entry-content,
.et_pb_post_content {
	font-family: var(--vm-font-read);
	font-size: 19px;
	line-height: 1.75;
	color: var(--vm-text);
}

.single .entry-content,
.single .et_post_meta_wrapper {
	max-width: var(--vm-read);
	margin-inline: auto;
}

.entry-content p {
	margin-bottom: 1.35em;
}

.entry-content h2 {
	font-size: 30px;
	margin-top: 1.6em;
}

.entry-content h3 {
	font-size: 23px;
	margin-top: 1.4em;
}

.entry-content blockquote {
	margin: 2em 0;
	padding: .1em 0 .1em 1.25em;
	border-left: 2px solid var(--vm-amber);
	font-style: italic;
	font-size: 22px;
	line-height: 1.5;
	color: var(--vm-ink);
}

.entry-content img {
	border-radius: var(--vm-radius);
}

.entry-content hr {
	border: 0;
	height: 1px;
	background: var(--vm-line);
	margin: 3em 0;
}

.post-meta,
.et_pb_post .post-meta {
	font-family: var(--vm-font-ui);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--vm-muted);
}

.post-meta a {
	color: var(--vm-muted);
	text-decoration: none;
}

/* ==========================================================================
   Cabeçalho e rodapé padrão do Divi (até os modelos da Fase 2)
   ========================================================================== */
#main-header {
	background: rgba(255, 255, 255, .92);
	box-shadow: none;
	border-bottom: 1px solid var(--vm-line);
}

#top-menu li a {
	font-family: var(--vm-font-ui);
	font-weight: 500;
	font-size: 14px;
	color: var(--vm-text);
}

#top-menu li.current-menu-item > a,
#top-menu li a:hover {
	color: var(--vm-ink) !important;
	opacity: 1 !important;
}

#main-footer {
	background: var(--vm-soft);
	border-top: 1px solid var(--vm-line);
}

#footer-bottom {
	background: transparent;
	color: var(--vm-muted);
}

#main-footer .footer-widget,
#main-footer .footer-widget li a,
#footer-info,
#footer-info a {
	color: var(--vm-text) !important;
}

#main-footer .footer-widget h4,
#main-footer .footer-widget .title {
	color: var(--vm-ink) !important;
	font-family: var(--vm-font-title);
}

#footer-bottom .et-social-icon a {
	color: var(--vm-muted);
}

/* Grade de posts do Divi */
.et_pb_post {
	margin-bottom: 56px;
}

.et_pb_post .entry-featured-image-url,
.et_pb_post .et_pb_image_container {
	display: block;
	border-radius: var(--vm-radius);
	overflow: hidden;
	margin-bottom: 20px;
}

.et_pb_post h2.entry-title a {
	color: var(--vm-ink);
	text-decoration: none;
}

.et_pb_post h2.entry-title a:hover {
	color: var(--vm-amber-text);
}

.et_pb_post .more-link {
	font-family: var(--vm-font-ui);
	font-weight: 600;
	font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}
