/**
 * Theme Name:  The Weganda Review
 * Description: Child theme for The Weganda Review — a Ugandan literary journal of culture, art & ideas. Built on Blocksy.
 * Author:      Chris Ocen
 * Author URI:  https://chrxdigital.com
 * Template:    blocksy
 * Version:     2.0.0
 * Text Domain: the-weganda-review
 * License:     GPL-2.0+
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

/* Import parent theme styles */
@import url("../blocksy/style.css");

/** === Archive List === */

/* -----------------------------------------------------------------------
   Archive page heading
   blocksy_output_hero_section( ['type' => 'type-2'] ) renders the archive
   title inside a .ct-archive-header wrapper. These rules ensure the heading
   matches the editorial type-specimen: Georgia Pro, 1.6 rem, 0.05 em tracking.
   ----------------------------------------------------------------------- */
.ct-archive-header .entry-title,
.ct-archive-header .page-title {
	font-family: var(--twr-font-serif, "Georgia Pro", Georgia, "Times New Roman", serif);
	font-size: 1.6rem;
	font-weight: 400;
	letter-spacing: 0.05em;
	text-align: center;
}

/* -----------------------------------------------------------------------
   Archive list wrapper
   Constrains all .twr-archive-entry cards to the content width and centres
   the list on wide viewports.
   ----------------------------------------------------------------------- */
.twr-archive-list {
	max-width: var(--twr-content-width, 740px);
	margin-inline: auto;
}

/* -----------------------------------------------------------------------
   Archive entry card — two-column horizontal layout
   40 % image | 1fr text. A 1 px border-top acts as the visual separator.
   align-items: center keeps the text column vertically centred against the
   image regardless of how many lines the title wraps to.
   ----------------------------------------------------------------------- */
.twr-archive-entry {
	display: grid;
	grid-template-columns: 40% 1fr;
	align-items: center;
	gap: 1.5rem;
	padding-block: 1.75rem;
	border-top: 1px solid #e5e5e5;
}

/* -----------------------------------------------------------------------
   Image column
   The wrapper enforces a 4:3 crop; the <img> fills it with object-fit.
   ----------------------------------------------------------------------- */
.twr-archive-entry__image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.twr-archive-entry__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Placeholder div — same dimensions as the image slot, neutral background.
   Keeps the two-column grid consistent when no featured image is set. */
.twr-archive-entry__image-placeholder {
	width: 100%;
	height: 100%;
	background-color: #f2f2f2;
}

/* -----------------------------------------------------------------------
   Text column
   flex column so title and author stack naturally; justify-content: center
   vertically centres the text block within the grid cell.
   ----------------------------------------------------------------------- */
.twr-archive-entry__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

/* Title — teal, Georgia Pro, normal weight, no underline by default */
.twr-archive-entry__title {
	font-family: var(--twr-font-serif, "Georgia Pro", Georgia, "Times New Roman", serif);
	font-size: 1.2rem;
	font-weight: 400;
	line-height: 1.4;
	margin: 0 0 0.35rem;
}

.twr-archive-entry__title a {
	color: var(--theme-palette-color-1, #26BDB4);
	text-decoration: none;
}

.twr-archive-entry__title a:hover,
.twr-archive-entry__title a:focus-visible {
	text-decoration: underline;
}

/* Author — muted, italic, small */
.twr-archive-entry__author {
	font-style: italic;
	font-size: 0.85rem;
	color: var(--twr-muted-color, #888888);
	margin: 0;
}

/* -----------------------------------------------------------------------
   Responsive — stack to single column below 640 px
   ----------------------------------------------------------------------- */
@media (max-width: 640px) {
	.twr-archive-entry {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	/* When no featured image exists, hide the placeholder on mobile so
	   the text content fills the full width without dead whitespace. */
	.twr-no-thumbnail .twr-archive-entry__image {
		display: none;
	}
}