/*
==================================
RICHARDCARTER.COM-SPECIFIC STYLING
==================================
*/

/* REMEMBER: Plugins can also contain some CSS. */

/*
Amend variables to affect RC.com branding, etc
Note: Only include variables that need to change from default look, otherwise
you might end up reverting stuff to the default that the main CSS is trying to amend
*/
:root {
	/* Branding */
	--site--brand--color-main: rgb(65, 94, 119);
	--branding--title--font-size-mobile: var(--heading--font-size-h5);
}

/* Make header/branding area more compact */
#rix-template-section-header  {
	padding-top: 0;
	padding-bottom: 0;
}
.site-header {
	padding-top: 1em;
	padding-bottom: 1em;
	row-gap: 0px;
	align-items: baseline;
}
.menu-button-container {
	padding: .5em 0;
}

/* Homepage */
/* Put mugshot at a wonky angle on non-small screens */
@media (min-width: 482px) {
	.xxxxhomepage-mugshot {
		transform: rotate(3deg);
		margin-left: 4em;
	}
}


/* Disable next/previous page in Sidelines monthly/weekly archives
   ===============================================================
We force all posts for the month to be displayed, but the nav functions
don't know this and display the navbars. So hide them! (Kludge!)
*/
body.rix-sideline-archive-rewrite nav.navigation {
	display: none !important;
}


/* == I don't really use Categories, so hide them at the end of posts == */
.cat-links {
	display: none !important;
}



/* == NICER ARCHIVE PAGES == */
/* On tablets and large screens, display side-by side posts on archive pages. */
@media only screen and (min-width: 822px) {  /* Medium/large screens */
	.rix-archive-posts article {
		width: 45%;
	}
	.rix-archive-posts article .entry-title {
		font-size: calc(0.8 * var(--entry-header--font-size));
	}
	:root {
		--rix-archive-thumbnail-height: calc( 0.285 * var(--rix-content--width));
	}
}
@media only screen and (min-width: 1024px) {  /* Large screens */
	.rix-archive-posts article {
		width: 30%;
	}
	.rix-archive-posts article .entry-title {
		font-size: calc(0.7 * var(--entry-header--font-size));
	}
	:root {
		--rix-archive-thumbnail-height: calc(  0.19 * var(--rix-content--width));
	}
}
@media only screen and (min-width: 822px) { /* Medium/large */
	.rix-archive-posts {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-around;
		align-items: top;
		row-gap: calc( 2 * var(--global--spacing-vertical));
	}
	.rix-archive-posts article.review img {
		max-height: 350px;
		width: auto !important;
	}
	.rix-archive-posts article .post-taxonomies {
		display: none;
		visibility: hidden;
	}
	.rix-archive-posts article .entry-content {
		margin: 0.5em 0 0 0;
	}
	.rix-archive-posts article .entry-footer {
		margin-top: calc( 0.5 * var(--global--spacing-vertical) );
	}
}

/* Ensure that (on non-small archive screens) all thumbnail images are the same height (so they line up when displayed side-by-side). */
@media only screen and (min-width: 822px) { /* Medium/Large screens */
	.rix-archive-posts article.has-post-thumbnail header.entry-header figure.post-thumbnail {
		height: var(--rix-archive-thumbnail-height);
		display: flex; /* This centres the image vertically. */
		padding: 0;
		margin: 0;
	}
	.rix-archive-posts article.has-post-thumbnail header.entry-header figure.post-thumbnail figcaption {
		/* Hide image captions */
		display: none;
		visibility: hidden;
	}
	.rix-archive-posts article.has-post-thumbnail header.entry-header img:not(.wp-smiley, .emoji) {
		max-height: var(--rix-archive-thumbnail-height);
		height: var(--rix-archive-thumbnail-height) !important;
		width: auto;
		margin: 0;
		padding: 0;
		object-fit: cover; /* Trim image edges if necessary */
		object-position: 50% 50%; 
	}
}