/*
Theme Name: Glans Magazine
Description: A glossy lifestyle-magazine theme: gold masthead, dark category bar, one large lead story over a two-column card grid, and a sidebar with tabbed most-read list and promo boxes.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glans
*/

:root {
	--accent: #af8b29;
	--nav-bg: #323232;
	--text: #212121;
	--muted: #909090;
	--line: #e9e9e9;
	--page: #f5f5f5;
	--card-shadow: 0 2px 2px 2px rgba(0, 0, 0, 0.06);
	--body-font: "Raleway", Helvetica, Arial, sans-serif;
	--logo-font: "Playfair Display", Didot, "Bodoni MT", Georgia, serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	padding-top: 48px;
	background: var(--page);
	color: #000;
	font-family: var(--body-font);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	font-variant-numeric: lining-nums;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1,
h2,
h3,
h4,
p,
figure {
	margin: 0;
}

button,
input,
textarea,
select {
	font: inherit;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 8px 12px;
	background: #fff;
	color: #000;
}

.wrapper {
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
}

/* Top bar */

.brandbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	height: 48px;
	display: flex;
	background: #000;
}

.admin-bar .brandbar {
	top: 32px;
}

.brandbar .wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 8px;
}

.brandbar__links {
	display: flex;
	align-items: center;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.brandbar__links::-webkit-scrollbar {
	display: none;
}

.brandbar__links a {
	display: block;
	padding: 0 10px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 48px;
	white-space: nowrap;
}

.brandbar__links li:first-child a {
	padding-left: 0;
}

.brandbar__links a:hover {
	color: var(--accent);
}

.auth {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-left: 16px;
}

.auth a {
	display: block;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 6px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 24px;
	white-space: nowrap;
}

.auth .auth__subscribe {
	border-color: var(--accent);
	background: var(--accent);
}

.auth .auth__login {
	margin-left: 8px;
}

.auth .auth__login:hover {
	border-color: #fff;
}

/* Page shell */

.site {
	max-width: 996px;
	margin: 17px auto 0;
	padding: 8px;
}

/* Masthead */

.header {
	margin-bottom: 8px;
	box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.06);
}

.header__main {
	display: flex;
	align-items: center;
	min-height: 100px;
	padding: 24px 16px;
	background: var(--accent);
	box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.header__logo {
	flex-shrink: 0;
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1;
}

.header__logo img {
	width: auto;
	max-width: 220px;
	max-height: 52px;
}

.header__logo .site-title {
	color: #fff;
	font-family: var(--logo-font);
	font-size: 46px;
	font-weight: 400;
	letter-spacing: 0.14em;
	line-height: 40px;
	text-transform: uppercase;
	white-space: nowrap;
}

.header__tools {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 1;
	min-width: 0;
	margin-left: 16px;
}

.search-form {
	position: relative;
	width: 280px;
	max-width: 100%;
}

.search-form__input {
	width: 100%;
	height: 40px;
	padding: 0 12px 0 41px;
	border: 1px solid var(--muted);
	border-radius: 6px;
	background: #fff;
	color: var(--text);
	font-size: 16px;
	font-weight: 500;
}

.search-form__input::placeholder {
	color: var(--muted);
	opacity: 1;
}

.search-form__btn {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--text);
	cursor: pointer;
}

.social {
	display: flex;
	align-items: center;
	gap: 4px;
}

.social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 1.5px solid currentColor;
	border-radius: 50%;
}

.social svg {
	width: 12px;
	height: 12px;
}

.header .social {
	margin-left: 12px;
	color: #fff;
}

.header .social a:hover {
	background: #fff;
	color: var(--accent);
}

.header__date {
	flex-shrink: 0;
	margin-left: 12px;
	padding-left: 12px;
	border-left: 1px solid rgba(255, 255, 255, 0.6);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 14px;
}

.header__date span {
	display: block;
	font-weight: 500;
}

/* Category bar */

.header__nav {
	position: relative;
	background: var(--nav-bg);
	border-top: 1px solid var(--nav-bg);
}

.header__nav > ul {
	display: flex;
}

.header__nav li {
	position: relative;
	display: flex;
}

.header__nav a {
	position: relative;
	display: flex;
	align-items: center;
	height: 40px;
	padding: 0 16px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: uppercase;
	white-space: nowrap;
}

.header__nav > ul > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: #fff;
	opacity: 0;
	transition: opacity 0.15s;
}

.header__nav > ul > li:hover > a::after,
.header__nav > ul > li.current-menu-item > a::after,
.header__nav > ul > li.current-menu-ancestor > a::after,
.header__nav > ul > li.current-menu-parent > a::after,
.header__nav > ul > li.current-cat > a::after {
	opacity: 1;
}

.header__nav > ul > li.menu-item-has-children > a {
	padding-right: 30px;
}

.header__nav > ul > li.menu-item-has-children::after {
	content: "";
	position: absolute;
	top: 15px;
	right: 14px;
	width: 6px;
	height: 6px;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
	pointer-events: none;
}

.header__nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 50;
	display: none;
	min-width: 180px;
	padding: 4px 0;
	background: var(--nav-bg);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.header__nav li:hover > .sub-menu,
.header__nav li:focus-within > .sub-menu {
	display: block;
}

.header__nav .sub-menu li {
	display: block;
}

.header__nav .sub-menu a:hover,
.header__nav .sub-menu .current-menu-item > a {
	background: rgba(255, 255, 255, 0.12);
}

/* Ad slots */

.ad-leaderboard {
	display: flex;
	justify-content: center;
	margin-bottom: 8px;
}

.ad-slot {
	margin-bottom: 16px;
}

.ad-slot__label {
	margin-bottom: 8px;
	color: var(--muted);
	font-size: 10px;
	line-height: 14px;
	text-align: center;
	text-transform: uppercase;
}

/* Two-column layout */

.container {
	display: flex;
	align-items: flex-start;
}

.lhs {
	flex: 1;
	min-width: 0;
	margin-right: 16px;
}

.rhs {
	flex: 0 0 300px;
	width: 300px;
}

/* Category chip + date */

.chip {
	display: inline-block;
	padding: 1px 8px 0;
	border-radius: 2px;
	background: var(--accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 15px;
	text-transform: uppercase;
	vertical-align: top;
}

.chip:hover {
	background: #000;
}

.date {
	color: var(--text);
	font-size: 10px;
	font-weight: 500;
	line-height: 14px;
}

/* Lead story */

.featured {
	margin-bottom: 8px;
	padding: 16px;
	border-radius: 2px;
	background: #fff;
	box-shadow: var(--card-shadow);
}

.featured__image {
	display: block;
	aspect-ratio: 650 / 430;
	overflow: hidden;
	border-radius: 6px;
	background: var(--page);
}

.featured__image img,
.card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.featured__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 16px;
	margin: 12px 0 8px;
}

.featured__title {
	margin: 0 0 8px;
	color: var(--text);
	font-size: 24px;
	font-weight: 700;
	line-height: 30px;
}

.featured__title a:hover,
.card__title a:hover,
.most-read a:hover {
	text-decoration: underline;
}

/* Card grid */

.card-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -4px;
}

.card,
.card-grid__ad {
	width: 50%;
	padding: 0 4px 8px;
}

.card-grid__ad {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 6px 6px 2px 2px;
	background: #fff;
	box-shadow: var(--card-shadow);
}

.card__image {
	display: block;
	aspect-ratio: 216 / 155;
	overflow: hidden;
	border-radius: 6px 6px 0 0;
	background: var(--page);
}

.card__body {
	padding: 14px 16px 0;
}

.card__body .chip {
	margin-bottom: 10px;
}

.card__title {
	color: var(--text);
	font-size: 16px;
	font-weight: 700;
	line-height: 21px;
}

.card__title a {
	display: block;
}

.card .date {
	margin: auto 16px 16px;
	padding-top: 16px;
}

/* Archive heading */

.page-head {
	margin-bottom: 8px;
	padding: 16px;
	border-radius: 2px;
	background: #fff;
	box-shadow: var(--card-shadow);
}

.page-head__title {
	color: var(--text);
	font-size: 24px;
	font-weight: 700;
	line-height: 30px;
}

.page-head__desc {
	margin-top: 8px;
	font-size: 14px;
}

/* Pagination */

.pagination {
	margin: 8px 0 16px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.pagination .page-numbers {
	min-width: 40px;
	padding: 0 12px;
	border-radius: 6px;
	background: #fff;
	box-shadow: var(--card-shadow);
	color: var(--text);
	font-size: 14px;
	font-weight: 700;
	line-height: 40px;
	text-align: center;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
	background: #000;
	color: #fff;
}

/* Sidebar: most read */

.most-read {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 16px;
	background: #fff;
	box-shadow: var(--card-shadow);
}

.most-read input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.most-read label {
	width: 50%;
	padding: 11px 13px;
	border-bottom: 3px solid transparent;
	color: var(--muted);
	font-size: 10px;
	font-weight: 700;
	line-height: 14px;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
}

.most-read input:checked + label {
	border-bottom-color: var(--accent);
	color: var(--text);
}

.most-read input:focus-visible + label {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}

.most-read__tab {
	display: none;
	width: 100%;
	padding: 4px 0 8px;
	counter-reset: most-read;
}

#most-read-0:checked ~ #most-read-tab-0,
#most-read-1:checked ~ #most-read-tab-1 {
	display: block;
}

.most-read li {
	display: flex;
	align-items: flex-start;
	padding: 8px 0;
	counter-increment: most-read;
}

.most-read li::before {
	content: counter(most-read);
	flex: 0 0 49px;
	align-self: center;
	color: var(--text);
	font-size: 24px;
	font-weight: 700;
	line-height: 30px;
	text-align: center;
}

.most-read a {
	padding: 0 16px 0 12px;
	color: var(--text);
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

/* Sidebar: promo boxes and generic widgets */

.widget {
	margin-bottom: 16px;
	padding: 16px;
	border-radius: 2px;
	background: #fff;
	box-shadow: var(--card-shadow);
}

.widget__title,
.widget .wp-block-heading {
	margin: 0 -16px 16px;
	padding: 0 16px 16px;
	border-bottom: 1px solid var(--line);
	color: var(--text);
	font-size: 20px;
	font-weight: 700;
	line-height: 22px;
}

.widget ul li {
	padding: 6px 0;
	font-size: 14px;
	font-weight: 700;
}

.widget a:hover {
	text-decoration: underline;
}

.promo__text {
	margin-bottom: 24px;
	font-weight: 700;
	line-height: 21px;
}

.promo--image .widget__title {
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.promo--image .promo__text {
	margin-bottom: 16px;
	font-weight: 500;
}

.promo__image {
	margin: 0 -16px;
}

.promo__image img {
	width: 100%;
}

.btn,
.widget .btn {
	display: block;
	margin-top: 16px;
	padding: 12px;
	border: 1px solid #000;
	border-radius: 6px;
	background: #000;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
	cursor: pointer;
}

.btn:hover,
.widget .btn:hover {
	background: #fff;
	color: #000;
	text-decoration: none;
}

/* Footer (sits at the bottom of the sidebar) */

.footer {
	margin: 16px 0 24px;
	color: var(--text);
	font-size: 12px;
	line-height: 20px;
}

.footer__nav li {
	display: inline-block;
	margin-right: 8px;
}

.footer__nav a {
	font-weight: 700;
	border-bottom: 1px solid transparent;
}

.footer__nav a:hover {
	border-bottom-color: currentColor;
}

.footer__copyright {
	margin: 16px 0;
}

.footer__social-title {
	margin-bottom: 8px;
	font-size: 12px;
	text-transform: uppercase;
}

.footer .social a:hover {
	background: var(--text);
	color: #fff;
}

/* Single article + pages */

.article {
	padding: 16px;
	background: #fff;
	box-shadow: var(--card-shadow);
}

.article__top-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 24px;
}

.article__top-bar .date {
	display: flex;
	align-items: center;
	gap: 6px;
}

.share {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 10px;
}

.share .social a:hover {
	background: var(--text);
	color: #fff;
}

.article__title {
	margin: 16px 0;
	color: var(--text);
	font-size: 32px;
	font-weight: 700;
	line-height: 36px;
}

.article__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 12px;
}

.article__image {
	margin: 0 -16px 16px;
}

.article__image img {
	width: 100%;
}

.article__image figcaption {
	padding: 8px 16px;
	background: #000;
	color: #fff;
	font-size: 12px;
	line-height: 18px;
}

.entry-content {
	color: var(--text);
	font-size: 16px;
	line-height: 24px;
	overflow-wrap: break-word;
}

.entry-content > * {
	margin-bottom: 16px;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2 {
	margin-top: 24px;
	font-size: 24px;
	line-height: 30px;
}

.entry-content h3 {
	margin-top: 24px;
	font-size: 20px;
	line-height: 26px;
}

.entry-content h4 {
	font-size: 16px;
}

.entry-content a {
	color: var(--accent);
	font-weight: 700;
	text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
	padding-left: 24px;
}

.entry-content ul {
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

.entry-content li {
	margin-bottom: 6px;
}

.entry-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 4px 0 4px 16px;
	border-left: 3px solid var(--accent);
	font-size: 20px;
	font-weight: 700;
	line-height: 28px;
}

.entry-content blockquote cite {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
}

.entry-content img {
	border-radius: 2px;
}

.entry-content figcaption,
.wp-caption-text {
	margin-top: 6px;
	color: var(--muted);
	font-size: 12px;
	line-height: 18px;
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.entry-content th,
.entry-content td {
	padding: 8px;
	border: 1px solid var(--line);
	text-align: left;
}

.alignleft {
	float: left;
	margin: 0 16px 16px 0;
}

.alignright {
	float: right;
	margin: 0 0 16px 16px;
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.article__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 24px;
}

.section-title {
	margin: 24px 0 8px;
	color: var(--text);
	font-size: 20px;
	font-weight: 700;
	line-height: 22px;
}

/* Comments */

.comments {
	margin-top: 16px;
	padding: 16px;
	background: #fff;
	box-shadow: var(--card-shadow);
	font-size: 14px;
}

.comments .section-title {
	margin-top: 0;
}

.comment-list .comment {
	padding: 12px 0;
	border-top: 1px solid var(--line);
}

.comment-list .children {
	padding-left: 24px;
}

.comment-author {
	font-weight: 700;
}

.comment-author .avatar {
	display: inline-block;
	margin-right: 8px;
	border-radius: 50%;
	vertical-align: middle;
}

.comment-metadata {
	margin: 4px 0 8px;
	color: var(--muted);
	font-size: 10px;
}

.comment-form label {
	display: block;
	margin-bottom: 4px;
	font-weight: 700;
}

.comment-form p {
	margin-bottom: 12px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--muted);
	border-radius: 6px;
}

.comment-form .submit {
	display: inline-block;
	padding: 12px 24px;
	border: 1px solid #000;
	border-radius: 6px;
	background: #000;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}

/* Responsive */

@media (max-width: 1011px) {
	.site {
		margin-top: 0;
	}

	.header__nav > ul {
		overflow-x: auto;
		scrollbar-width: none;
	}

	.header__nav > ul::-webkit-scrollbar {
		display: none;
	}

	/* Sub-menus can't escape a scrolling bar; parent items stay tappable. */
	.header__nav .sub-menu {
		display: none !important;
	}

	.header__nav > ul > li.menu-item-has-children > a {
		padding-right: 16px;
	}

	.header__nav > ul > li.menu-item-has-children::after {
		display: none;
	}
}

@media (max-width: 899px) {
	.container {
		display: block;
	}

	.lhs {
		margin-right: 0;
	}

	.rhs {
		width: auto;
		max-width: 480px;
		margin: 16px auto 0;
	}

	.header__date {
		display: none;
	}
}

@media (max-width: 782px) {
	.admin-bar .brandbar {
		top: 46px;
	}
}

@media (max-width: 640px) {
	.header__main {
		flex-wrap: wrap;
		min-height: 0;
		padding: 16px;
	}

	.header__logo .site-title {
		font-size: 34px;
		letter-spacing: 0.1em;
		line-height: 32px;
	}

	/* Let search drop to its own full-width row under logo + social icons. */
	.header__tools {
		display: contents;
	}

	.header .social {
		margin-left: auto;
	}

	.header__main .search-form {
		order: 3;
		flex: 1 1 100%;
		width: 100%;
		margin-top: 12px;
	}

	.featured__title {
		font-size: 20px;
		line-height: 26px;
	}

	.article__title {
		font-size: 24px;
		line-height: 30px;
	}
}

@media (max-width: 480px) {
	.card,
	.card-grid__ad {
		width: 100%;
	}
}
