/*
Theme Name: ColorMag Muralha
Description: Tema filho do ColorMag para o Jornal A Muralha — scaffolded by Studio Code. Identidade editorial vermelha inspirada em jornais como Brasil de Fato e Jornal da Cidade Online.
Template: colormag
Author: Studio Code
Version: 1.0.0
Text Domain: colormag-muralha
*/

/* === fonts === */
:root {
	--muralha-display: "Playfair Display", Georgia, serif;
	--muralha-headline: "Archivo", "Open Sans", sans-serif;
}

/* === masthead === */
.cm-site-title,
.cm-site-title a {
	font-family: var( --muralha-display );
	font-weight: 900;
	letter-spacing: -0.5px;
}

.cm-site-description {
	font-family: var( --muralha-headline );
	text-transform: uppercase;
	letter-spacing: 1.5px;
	font-size: 12px;
}

/* === utility-bar === */
.muralha-utility-bar {
	background: var( --cm-color-5, #140d0d );
	color: #ffffff;
}

.muralha-utility-bar__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 6px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: var( --muralha-headline );
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.8px;
}

.muralha-utility-bar__tagline {
	color: var( --cm-color-1, #c81e1e );
	font-weight: 700;
}

@media ( max-width: 600px ) {
	.muralha-utility-bar__inner {
		flex-direction: column;
		gap: 2px;
		text-align: center;
		padding: 6px 12px;
	}
}

/* === navigation === */
.main-navigation a {
	font-family: var( --muralha-headline );
	font-weight: 700;
	letter-spacing: 0.5px;
}

/* === headlines === */
.cm-entry-title,
.cm-entry-title a,
h1.cm-entry-title,
h2.cm-entry-title,
h3.cm-entry-title,
.cm-widget-title {
	font-family: var( --muralha-headline );
	font-weight: 800;
	letter-spacing: -0.2px;
}

/* === category-labels === */

/* === columnist-byline === */
.cm-author .cm-icon--user {
	display: none;
}

.cm-author a {
	font-family: var( --muralha-headline );
	font-weight: 700;
}

/* === columnist-archive-header === */
.muralha-columnist-header {
	display: flex;
	align-items: center;
	gap: 28px;
	background-color: var( --cm-color-5, #140d0d );
	color: #ffffff;
	padding: 32px;
	border-radius: 4px;
	margin-bottom: 32px;
}

.muralha-columnist-header__photo img {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var( --cm-color-1, #c81e1e );
}

.muralha-columnist-header__label {
	color: var( --cm-color-1, #c81e1e );
	font-family: var( --muralha-headline );
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 4px;
}

.muralha-columnist-header .cm-page-title {
	color: #ffffff;
	margin: 0 0 8px;
}

.muralha-columnist-header__bio {
	color: #e0d3d1;
	margin: 0;
	max-width: 60ch;
}

/* Editorial line shown on every columnist archive, linking to the
   "Quem Somos" page that states the paper's editorial principles.
   Sizes are in px on purpose: ColorMag sets html { font-size: 62.5% },
   so 1rem is 10px here, not 16px. */
.muralha-columnist-header__editorial {
	margin: 10px 0 0;
	font-size: 13px;
	color: var( --cm-color-9, #dccbbb );
}

.muralha-columnist-header__editorial a {
	color: #ffffff;
	text-decoration: underline;
	text-transform: none;
}

.muralha-columnist-header__editorial a:hover {
	text-decoration: none;
}

@media ( max-width: 600px ) {
	.muralha-columnist-header {
		flex-direction: column;
		text-align: center;
	}
}

/* === site-logo === */
/* The source file (1774x887) has the wordmark centered on a white canvas
   with vertical breathing room above/below. Crop visually to a header-sized
   window so only the mark shows, at a size proportioned for the header. */
.cm-site-branding .custom-logo-link {
	display: block;
	width: 280px;
	height: 64px;
	overflow: hidden;
}

/* SEO: the logo is wrapped in an <h1> on the front page for a real page
   heading; strip default heading margin so it doesn't shift the layout. */
.muralha-logo-heading {
	margin: 0;
	display: block;
	line-height: 0;
}

.cm-site-branding .custom-logo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

@media screen and ( max-width: 48em ) {
	.cm-site-branding .custom-logo-link {
		width: 230px;
		height: 53px;
	}
}

/* === front-page-featured-section === */
.cm-front-page-featured-section {
	margin-bottom: 30px;
}

.muralha-featured-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.muralha-featured-main,
.muralha-featured-side__item {
	display: block;
	color: inherit;
	text-decoration: none;
}

.muralha-featured-main__media {
	margin-bottom: 16px;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 4px;
}

.muralha-featured-main__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.muralha-featured-main:hover .muralha-featured-main__media img {
	transform: scale( 1.04 );
}

.muralha-featured-category {
	display: inline-block;
	background-color: var( --cm-color-1, #c81e1e );
	color: #ffffff;
	font-family: var( --muralha-headline );
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 3px 10px;
	border-radius: 3px;
	margin-bottom: 10px;
}

.muralha-featured-title {
	font-family: var( --muralha-headline );
	font-size: 30px;
	line-height: 1.2;
	margin: 0 0 12px;
}

.muralha-featured-main:hover .muralha-featured-title {
	color: var( --cm-color-1, #c81e1e );
}

.muralha-featured-excerpt {
	color: var( --cm-color-7, #6e6e6e );
	margin: 0;
}

.muralha-featured-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.muralha-featured-side__item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding-bottom: 14px;
	border-bottom: 1px solid var( --cm-color-9, #e0d3d1 );
}

.muralha-featured-side__item:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.muralha-featured-side__media {
	flex: 0 0 90px;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 4px;
}

.muralha-featured-side__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.muralha-featured-side__item:hover .muralha-featured-side__media img {
	transform: scale( 1.04 );
}

.muralha-featured-side__title {
	font-family: var( --muralha-headline );
	font-size: 15px;
	line-height: 1.3;
	margin: 0;
}

.muralha-featured-side__item:hover .muralha-featured-side__title {
	color: var( --cm-color-1, #c81e1e );
}

@media screen and ( min-width: 62em ) {
	.muralha-featured-grid {
		flex-direction: row;
		align-items: stretch;
	}

	.muralha-featured-main {
		flex: 0 0 63%;
	}

	.muralha-featured-side {
		flex: 1;
	}

	.muralha-featured-title {
		font-size: 34px;
	}
}

/* === front-page-top-section === */
@media screen and ( min-width: 62em ) {
	.cm-front-page-top-section--solo .cm-slider-area {
		width: 100%;
	}
}

.cm-front-page-slider-area > .widget + .widget,
.cm-slider-area > .widget + .widget {
	margin-top: 20px;
}

/* === flex-overflow-fix === */
/* Flex children default to min-width:auto and refuse to shrink below the
   width of a horizontally-scrolling child, which pushes the row past the
   viewport. Let them shrink so overflow-x:auto can clip instead. */
.cm-column-half > .cm-one-half {
	min-width: 0;
}

/* "Mais Lidas" (scrolling cards) needs far more room than "Editorias"
   (a short vertical list), so give them an uneven, deliberate split
   instead of the default 50/50. */
.cm-column-half > .cm-one-half {
	flex: 3 1 0;
}

.cm-column-half > .cm-one-half-last {
	flex: 1 1 0;
}

/* Editorias on the homepage goes back to a plain vertical list; the
   horizontal chip treatment stays for the footer instance. */
#categories-1 ul {
	display: block;
	overflow-x: visible;
	margin: 0;
	padding: 0;
}

#categories-1 ul li {
	display: list-item;
	flex: none;
	white-space: normal;
	border-bottom: 1px solid var( --cm-color-9, #e0d3d1 );
	padding: 10px 0;
}

#categories-1 ul li:last-child {
	border-bottom: 0;
}

#categories-1 ul li a {
	display: inline;
	background: none;
	border: 0;
	border-radius: 0;
	padding: 0;
	font-weight: 700;
}

/* === horizontal-list-widgets === */
.widget_categories ul,
.widget_archive ul {
	display: flex;
	overflow-x: auto;
	flex-wrap: nowrap;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0 0 10px;
	-webkit-overflow-scrolling: touch;
}

.widget_categories ul li,
.widget_archive ul li {
	flex: 0 0 auto;
	white-space: nowrap;
	padding: 0;
	border: 0;
}

.widget_categories ul li a,
.widget_archive ul li a {
	display: inline-block;
	background-color: var( --cm-color-4, #fcf5f4 );
	color: var( --cm-color-6, #1a1a1a );
	border: 1px solid var( --cm-color-9, #e0d3d1 );
	border-radius: 20px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 700;
}

.widget_categories ul li .cm-post-counts,
.widget_archive ul li .cm-post-counts {
	margin-left: 4px;
	opacity: 0.7;
}

/* === news-ticker === */
.muralha-news-ticker.wp-block-latest-posts {
	display: flex;
	overflow-x: auto;
	flex-wrap: nowrap;
	gap: 20px;
	list-style: none;
	margin: 8px 0 0;
	padding: 0 0 12px;
	-webkit-overflow-scrolling: touch;
}

.muralha-news-ticker.wp-block-latest-posts li {
	flex: 0 0 240px;
	border-left: 3px solid var( --cm-color-1, #c81e1e );
	padding-left: 12px;
	margin: 0;
}

.muralha-news-ticker.wp-block-latest-posts li a {
	font-family: var( --muralha-headline );
	font-weight: 700;
	line-height: 1.3;
}

.muralha-news-ticker.wp-block-latest-posts .wp-block-latest-posts__post-date {
	display: block;
	color: var( --cm-color-7, #6e6e6e );
	font-size: 12px;
	margin-top: 4px;
}

/* === widget-panels === */
.has-muralha-dark-bg,
.has-muralha-red-bg {
	padding: 28px 32px;
	border-radius: 4px;
	color: #ffffff;
}

.has-muralha-dark-bg {
	background-color: var( --cm-color-5, #140d0d );
}

.has-muralha-red-bg {
	background-color: var( --cm-color-1, #c81e1e );
}

.has-muralha-dark-bg h3,
.has-muralha-red-bg h3,
.has-muralha-dark-bg p,
.has-muralha-red-bg p {
	color: #ffffff;
}

.has-muralha-dark-bg .wp-element-button,
.has-muralha-red-bg .wp-element-button {
	background-color: #ffffff;
	color: var( --cm-color-1, #c81e1e );
}

.muralha-live-badge {
	display: inline-block;
	background-color: var( --cm-color-1, #c81e1e );
	color: #ffffff;
	font-family: var( --muralha-headline );
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 1px;
	padding: 3px 10px;
	border-radius: 3px;
	margin-bottom: 8px;
}

.muralha-columnists-scroll {
	display: flex;
	flex-wrap: nowrap;
	gap: 20px;
	overflow-x: auto;
	padding-bottom: 6px;
	-webkit-overflow-scrolling: touch;
}

.muralha-columnist-card {
	flex: 0 0 130px;
	text-align: center;
}

.muralha-columnist-card img {
	width: 100px;
	height: 100px;
	object-fit: cover;
	border-radius: 50%;
}

.muralha-columnist-card .muralha-columnist-photo {
	display: inline-block;
}

.muralha-columnist-card p {
	font-size: 13px;
	line-height: 1.35;
	margin-top: 8px;
}

.muralha-columnist-name {
	display: inline-block;
	font-family: var( --muralha-headline );
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var( --cm-color-1, #c81e1e );
	margin-bottom: 4px;
}

.muralha-columnist-card .muralha-columnist-latest {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: inherit;
	font-weight: 600;
}

.muralha-columnist-card .muralha-columnist-latest:hover {
	color: var( --cm-color-1, #c81e1e );
}

/* === section-headers === */

/* === footer === */
#cm-footer.cm-footer {
	background-color: var( --cm-color-5, #140d0d );
	border-top: 4px solid var( --cm-color-1, #c81e1e );
}

#cm-footer.cm-footer .cm-copyright,
#cm-footer.cm-footer .cm-copyright a {
	color: #d9d0d0;
}

#cm-footer.cm-footer .cm-copyright a:hover {
	color: #ffffff;
}

/* === responsive === */
