/*
Theme Name: bspice-v27
Description: The BollySpice.com theme. A post list, a single post page, and review stars.
Version: 1.0.0
Author: Magic Beans Agency
Author URI: https://magicbeans.agency
Requires at least: 6.3
Requires PHP: 8.0
Text Domain: bspice-v27
*/

/* ---------------------------------------------------------------------------
   Contents
   1. Settings      5. Post list       9. Sidebar
   2. Base          6. Single post    10. Footer
   3. Layout        7. Review stars   11. Image popup
   4. Header + nav  8. Galleries
   ------------------------------------------------------------------------ */


/* 1. Settings ------------------------------------------------------------- */

:root {
	--red: #d43a28;
	--ink: #303030;
	--text: #444;
	--muted: #808080;
	--line: #dbdbdb;
	--line-soft: #eaeaea;
	--panel: #f2f2f2;
	--star: #f5b301;
	--star-empty: #d2d2d2;
	--font: 'Open Sans', Arial, sans-serif;
	--font-nav: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
}


/* 2. Base ----------------------------------------------------------------- */

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

body {
	margin: 0;
	background: #fff;
	color: var(--text);
	font: 16px/25px var(--font);
	-webkit-text-size-adjust: 100%;
}

a {
	color: var(--red);
	text-decoration: none;
	transition: color 0.1s linear, background-color 0.1s linear;
}

a:hover {
	color: #666;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 2px;
}

img,
video,
iframe,
embed,
object {
	max-width: 100%;
}

img {
	height: auto;
}

a > img {
	vertical-align: bottom;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 20px;
	line-height: 1.5;
}

p {
	margin: 0 0 20px;
}

blockquote {
	margin: 0 0 20px;
	padding-left: 20px;
	border-left: 3px solid var(--line-soft);
	font: italic 16px/1.6 Georgia, serif;
	color: #777;
}

table {
	width: 100%;
	margin-bottom: 20px;
	border-collapse: collapse;
}

th {
	text-align: left;
}

th,
td {
	padding: 5px 0;
	border-bottom: 1px solid #eee;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 8px 14px;
	background: #fff;
}

.skip-link:focus {
	left: 0;
}


/* 3. Layout --------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: 1170px;
	margin: 0 auto;
	padding: 0 15px;
}

.site-main {
	margin-bottom: 35px;
}

.site-main > .container {
	margin-top: 35px;
}

/* Content on the left, sidebar on the right. Stacked on small screens. */
@media (min-width: 992px) {
	.layout {
		display: grid;
		grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
		column-gap: 30px;
	}

	.content {
		padding-right: 30px;
		border-right: 1px solid var(--line);
	}
}

@media (max-width: 991px) {
	.sidebar {
		margin-top: 30px;
	}
}


/* 4. Header + nav --------------------------------------------------------- */

.site-header {
	padding: 34px 0 15px;
}

.logo {
	margin: 0;
	line-height: 0;
	text-align: center;
}

.logo img {
	width: auto;
	max-width: 300px;
	max-height: 120px;
}

.main-nav {
	padding: 10px 0;
	background: var(--red);
}

.main-menu {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
	font: 600 16px var(--font-nav);
	text-transform: uppercase;
}

.main-menu a {
	display: block;
	height: 34px;
	padding: 0 14px;
	line-height: 34px;
	color: #fff;
	white-space: nowrap;
}

.main-menu a:hover {
	color: #fff;
	background: #262626;
}

.main-menu .current-menu-item > a {
	color: #fff;
	background: #1f1f1f;
}

@media (min-width: 1200px) {
	.main-menu a {
		padding: 0 26px;
	}
}

.menu-toggle {
	display: none;
}

/* Phones: logo smaller, and the menu folds into a "Menu" button that
   opens the full list of sections. */
@media (max-width: 767px) {
	.site-header {
		padding: 20px 0 12px;
	}

	.logo img {
		max-width: 220px;
	}

	.main-nav {
		padding: 0;
	}

	.main-nav .container {
		padding: 0;
	}

	.menu-toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		width: 100%;
		padding: 0 15px;
		border: 0;
		background: none;
		color: #fff;
		font: 600 16px/48px var(--font-nav);
		text-transform: uppercase;
		cursor: pointer;
	}

	/* Three-line icon, drawn with CSS. */
	.menu-toggle__icon {
		width: 20px;
		height: 14px;
		border-top: 2px solid #fff;
		border-bottom: 2px solid #fff;
		background: linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
	}

	.main-menu {
		display: none;
		padding-bottom: 6px;
	}

	.main-nav.is-open .main-menu {
		display: block;
	}

	.main-menu a {
		height: auto;
		padding: 0 15px;
		border-top: 1px solid rgba(255, 255, 255, 0.25);
		line-height: 44px;
	}
}


/* 5. Post list ------------------------------------------------------------ */

.archive-header .page-title {
	margin: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ink);
}

.archive-header + .container {
	margin-top: 25px;
}

.archive-meta {
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line-soft);
	font-size: 14px;
	color: #666;
}

.archive-meta p:last-child {
	margin-bottom: 0;
}

.author-summary {
	display: flex;
	gap: 15px;
	align-items: flex-start;
}

.post-row {
	display: flex;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid var(--line-soft);
}

.post-row:first-child {
	padding-top: 0;
}

.post-row__image {
	flex: 0 0 270px;
	max-width: 40%;
	align-self: flex-start;
	overflow: hidden;
}

.post-row__image img {
	display: block;
	width: 100%;
	transition: opacity 0.3s ease;
}

.post-row__image:hover img {
	opacity: 0.8;
}

.post-row__main {
	flex: 1;
	min-width: 0;
}

.post-row .entry-title {
	margin: 0 0 4px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.post-row .entry-title a {
	color: var(--ink);
}

.post-row .entry-title a:hover {
	color: var(--red);
}

.entry-meta {
	font-size: 13px;
	line-height: 1.4;
	color: var(--muted);
}

.entry-meta a {
	color: var(--muted);
}

.entry-meta a:hover,
.entry-meta .entry-category a {
	color: var(--red);
}

.entry-summary {
	margin-top: 12px;
	font-size: 13px;
	line-height: 1.7;
}

@media (max-width: 479px) {
	.post-row {
		display: block;
	}

	.post-row__image {
		display: block;
		max-width: none;
		margin-bottom: 12px;
	}
}

.pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 5px;
	margin-top: 20px;
}

.pagination .page-numbers {
	padding: 3px 9px;
	color: #555;
	background: #f3f3f3;
}

.pagination .current,
.pagination a.page-numbers:hover {
	color: #fff;
	background: var(--red);
}

.pagination .dots {
	background: none;
}

.search-form {
	display: flex;
	max-width: 420px;
}

.search-form input {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-right: 0;
	font: 14px var(--font);
	color: #444;
}

.search-form button {
	padding: 8px 16px;
	border: 0;
	background: var(--red);
	color: #fff;
	font: 600 14px var(--font);
	cursor: pointer;
}

.not-found {
	padding: 60px 15px;
	text-align: center;
}

.not-found h1 {
	margin-bottom: 10px;
	font-size: 90px;
	line-height: 1;
	color: var(--red);
}

.not-found .search-form {
	margin: 0 auto;
}


/* 6. Single post ---------------------------------------------------------- */

.entry-header .entry-title,
.no-results .entry-title {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ink);
	overflow-wrap: anywhere;
}

.entry-edit {
	margin-top: 6px;
	font-size: 13px;
}

.entry-content {
	margin-top: 30px;
	overflow-wrap: break-word;
}

.entry-content::after {
	content: '';
	display: block;
	clear: both;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--ink);
	line-height: 1.3;
}

.entry-content iframe {
	display: block;
	margin-bottom: 20px;
}

/* Images placed by the editor */
.alignleft {
	float: left;
	margin: 5px 20px 15px 0;
}

.alignright {
	float: right;
	margin: 5px 0 15px 20px;
}

.aligncenter {
	display: block;
	margin: 0 auto 20px;
}

.wp-caption {
	max-width: 100%;
	margin-bottom: 20px;
}

.wp-caption-text,
.gallery-caption {
	margin: 5px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #999;
}

@media (max-width: 479px) {
	.alignleft,
	.alignright {
		float: none;
		display: block;
		margin: 0 auto 20px;
	}
}

.page-links {
	margin-top: 20px;
}

.article-ad {
	clear: both;
	margin: 24px 0;
	text-align: center;
}

.section-title {
	margin: 0 0 15px;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--red);
}

.author-box {
	margin-top: 40px;
}

.author-box__body {
	display: flex;
	gap: 15px;
	align-items: flex-start;
}

.author-box__name {
	margin: 0 0 2px;
	font-size: 15px;
	font-weight: 700;
	line-height: 20px;
	text-transform: uppercase;
	color: #555;
}

.author-box__links {
	margin: 0 0 6px;
	font-size: 12px;
}

.author-box__bio {
	font-size: 14px;
	line-height: 1.6;
}

.author-box__more {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
}

.comments {
	margin-top: 40px;
}


/* 7. Review stars --------------------------------------------------------- */

/* Five stars, coloured from the left up to the score: --rating: 3.5 */
.stars {
	display: inline-block;
	font: 18px/1 Arial, sans-serif;
	vertical-align: middle;
}

.stars::before {
	content: '\2605\2605\2605\2605\2605';
	background: linear-gradient(
		90deg,
		var(--star) calc(var(--rating) / 5 * 100%),
		var(--star-empty) calc(var(--rating) / 5 * 100%)
	);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

.rating-bar {
	display: flex;
	align-items: stretch;
	margin: 20px 0;
	background: var(--panel);
}

.rating-bar__label {
	padding: 10px 15px;
	background: var(--red);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
}

.rating-bar__stars {
	display: flex;
	align-items: center;
	padding: 10px 15px;
}

.rating-bar .stars {
	font-size: 24px;
}


/* 8. Galleries ------------------------------------------------------------ */

.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: 0 0 20px;
}

.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }

.gallery-item {
	margin: 0;
	text-align: center;
}

.gallery-item img {
	display: block;
	width: 100%;
}

@media (max-width: 479px) {
	.gallery[class*='gallery-columns-'] {
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
	}

	.gallery.gallery-columns-1 { grid-template-columns: 1fr; }
	.gallery.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
}


/* 9. Sidebar -------------------------------------------------------------- */

.sidebar {
	font-size: 13px;
}

.widget {
	margin-bottom: 30px;
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Centred red heading with a line running out to both sides. */
.widget-title {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 20px;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--red);
}

.widget-title::before,
.widget-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--line);
}

.review-item {
	display: flex;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--line-soft);
}

.review-item:first-child {
	padding-top: 0;
}

.review-item__poster {
	flex: 0 0 70px;
}

.review-item__poster img {
	display: block;
	width: 100%;
}

.review-item__main {
	flex: 1;
	min-width: 0;
}

.review-item__stars {
	margin-bottom: 4px;
}

.review-item__title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.review-item__title a {
	color: #404040;
}

.review-item__title a:hover {
	color: var(--red);
}

.review-item__date {
	display: block;
	margin-top: 3px;
	line-height: 1.4;
	color: var(--muted);
}


/* 10. Footer -------------------------------------------------------------- */

.site-footer {
	padding: 15px 0;
	background: var(--red);
	color: #fff;
	font-size: 13px;
	text-align: center;
}

.site-footer a {
	color: #fff;
	text-decoration: underline;
}


/* 11. Image popup --------------------------------------------------------- */

.lightbox-open {
	overflow: hidden;
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px 60px;
	background: rgba(0, 0, 0, 0.88);
}

.lightbox.is-open {
	display: flex;
}

/* Logged-in editors: keep the popup clear of the WordPress admin bar. */
.admin-bar .lightbox {
	top: 32px;
}

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

.lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
}

.lightbox__image {
	max-width: 100%;
	max-height: calc(100% - 40px);
	object-fit: contain;
	background: #111;
}

.lightbox__footer {
	display: flex;
	gap: 15px;
	justify-content: center;
	max-width: 900px;
	padding-top: 10px;
	font-size: 13px;
	line-height: 1.4;
	color: #ddd;
}

.lightbox__counter {
	flex: none;
	color: #999;
}

.lightbox button {
	position: absolute;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font: 30px/44px Arial, sans-serif;
	cursor: pointer;
}

.lightbox button:hover {
	background: var(--red);
}

.lightbox__close {
	top: 12px;
	right: 12px;
}

.lightbox__prev {
	left: 8px;
	top: calc(50% - 22px);
}

.lightbox__next {
	right: 8px;
	top: calc(50% - 22px);
}

@media (max-width: 767px) {
	.lightbox {
		padding: 60px 8px 20px;
	}

	.lightbox__prev,
	.lightbox__next {
		top: auto;
		bottom: 12px;
	}
}
