/*
 * TechSoftCenter look, layered over the Roadster theme to bring it closer to
 * the original WordPress site: dark charcoal surfaces, red accent, light
 * Quicksand headings, a plain horizontal menu and a two-column card grid on
 * the front page.
 */

/* Quicksand, self-hosted (variable font, weights 300-700; SIL OFL, see
   fonts/quicksand-OFL.txt). Subsets and ranges as served by Google Fonts. */
@font-face {
	font-family: "Quicksand";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("../fonts/quicksand-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Quicksand";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("../fonts/quicksand-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--tsc-accent: #c62f39;
	--tsc-accent-hover: #a8242d;
	--color-card-bg: #f5f5f5;
}

html[data-theme="dark"] {
	--color-bg-body: #a9a9a9;
	--color-surface: #1b1b1b;
	--color-surface-alt: #222;
	--color-card-bg: #181818;
	--color-text: #e8e8e8;
	--color-text-muted: #a3a3a3;
	--color-text-subtle: #8c8c8c;
	--color-border: #2e2e2e;
	--color-border-strong: #3a3a3a;
	--color-menu-bg: #222;
	--color-footer-bg: #1b1b1b;
}

.container {
	max-width: 1600px;
}

/* Articles: a centered panel at a readable line length within the wide layout */
.primary > .main:not(.list),
.primary > .pager {
	max-width: 1040px;
	margin-right: auto;
	margin-left: auto;
}

.primary > .main:not(.list) {
	padding: 40px 50px;
	background: var(--color-card-bg);
}

.primary > .pager {
	margin-top: 30px;
}

body {
	font-size: 1rem;
	font-weight: 500;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 500;
}

/* Header */
.logo {
	padding: 45px 35px 30px;
}

.logo__text {
	text-transform: none;
}

.logo__title {
	font-size: 3rem;
	font-weight: 400;
	letter-spacing: .01em;
}

.logo__tagline {
	padding-top: 0;
	margin-top: 12px;
	font-weight: 500;
	color: var(--color-text);
	border-top: 0;
}

/* Menu: plain text on a slightly lighter bar, red only for hover/active text */
.menu {
	background: var(--color-surface-alt);
	border-bottom: 0;
}

.menu__list {
	padding: 0 20px;
	background: var(--color-surface-alt);
}

.menu__item,
.menu__item:hover,
.menu__item--active {
	background: transparent;
	border-left: 0;
}

.menu__link {
	padding: 1.1rem 1rem;
	font-size: 1.05rem;
	font-weight: 500;
	color: var(--color-text);
	text-transform: none;
}

.menu__link:hover,
.menu__item:hover > .menu__link,
.menu__item--active > .menu__link {
	color: var(--tsc-accent);
}

.menu__btn-title {
	color: var(--color-text);
}

.has-submenu::after {
	margin-left: 8px;
}

span.menu__link {
	cursor: default;
}

/* Open dropdowns for keyboard users too, not only on hover */
.menu__item:focus-within > .submenu {
	display: block;
}

.submenu {
	background: var(--color-surface-alt);
}

.submenu__link {
	font-weight: 500;
	color: var(--color-text);
	text-transform: none;
}

/* Content area sits on the lighter bar colour; cards and widgets are darker blocks on it */
.wrapper {
	padding: 30px;
	background: var(--color-surface-alt);
}

.sidebar .widget {
	padding: 25px 30px;
	background: var(--color-card-bg);
}

.widget-search__form {
	padding: 0;
	background: transparent;
}

.widget-search__field {
	padding: 10px 12px;
	font-size: 1rem;
	background: var(--color-surface-alt);
}

.btn,
.list__footer-readmore {
	display: inline-block;
	padding: 12px 18px;
	font-weight: 500;
	color: #fff;
	background: var(--tsc-accent);
}

.btn:hover {
	color: #fff;
	background: var(--tsc-accent-hover);
}

/* Card grid on the front page and category pages */
.cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 30px;
	background: var(--color-card-bg);
}

.card__thumbnail {
	display: block;
	width: 100%;
	margin-bottom: 25px;
}

.card__image {
	display: block;
	width: 100%;
	height: auto;
}

.card__title {
	margin: 0 0 12px;
	font-size: 1.75rem;
	font-weight: 400;
	line-height: 1.35;
}

.card__title a {
	color: var(--color-text);
}

.card__title a:hover,
.card:hover .card__title a {
	color: var(--tsc-accent);
}

/* The title link covers the whole card, so the image and empty space are clickable too */
.card__title a::after {
	position: absolute;
	inset: 0;
	content: "";
}

.card__meta {
	font-size: .95rem;
	color: var(--color-text-subtle);
}

.card__excerpt {
	margin: 20px 0 25px;
	font-size: 1.1rem;
	line-height: 1.85;
}

.card__more {
	position: relative;
	z-index: 1;
	margin-top: auto;
}

/* Categories index */
.terms {
	columns: 4 220px;
	column-gap: 30px;
	list-style: none;
}

.terms__item {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--color-border);
	break-inside: avoid;
}

.terms__link {
	color: var(--color-text);
}

.terms__link:hover {
	color: var(--tsc-accent);
}

.terms__count {
	color: var(--color-text-subtle);
}

@media screen and (max-width: 1150px) {
	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.menu__list {
		padding: 0 10px;
	}

	.menu__link {
		padding-right: .7rem;
		padding-left: .7rem;
	}
}

@media screen and (max-width: 720px) {
	.cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media screen and (max-width: 767px) {
	.logo {
		padding: 30px 20px 20px;
	}

	.logo__title {
		font-size: 2rem;
	}

	.wrapper,
	.card,
	.primary > .main:not(.list) {
		padding: 20px;
	}

	.card__title {
		font-size: 1.4rem;
	}
}
