/**
 * Component Styles
 *
 * All UI component styles including header, navigation, search, categories,
 * subscribe form, homepage components, and post page components.
 *
 * @package    Fresh_Stack
 * @author     Woracious
 * @since      1.0.0
 */

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.header .left {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.logo img {
	width: 50px;
	height: 50px;
}

.logo a {
	display: block;
	cursor: pointer;
}

.logo .logo-blob {
	transition: fill var(--transition-fast);
}

.logo a:hover .logo-blob {
	fill: var(--color-theme);
}

/*--------------------------------------------------------------
# Hamburger Menu
--------------------------------------------------------------*/

.whamburger {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

.wtoggle {
	cursor: pointer;
	outline: none;
	width: 35px;
	height: 21px;
	border: none;
	border-top: 3px solid var(--color-primary);
	border-bottom: 3px solid var(--color-primary);
	text-decoration: none;
	background: none;
}

.wtoggle:before,
.wtoggle:after {
	position: absolute;
	top: 6px;
	left: 0;
	content: "";
	display: block;
	width: 35px;
	height: 3px;
	background: var(--color-primary);
}

.wtoggle,
.wtoggle:before,
.wtoggle:after {
	transition: all var(--transition-fast);
	transform: rotate(0deg);
}

body.clicked .wtoggle {
	border-color: transparent;
}

body.clicked .wtoggle:before {
	transform: rotate(45deg);
}

body.clicked .wtoggle:after {
	transform: rotate(-45deg);
}

/*--------------------------------------------------------------
# Sidebar (Shamburger)
--------------------------------------------------------------*/

.shamburger {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	background-color: var(--color-surface);
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	max-width: 350px;
	height: 100vh;
	overflow-y: scroll;
	padding: var(--space-lg) var(--space-md);
	transition: transform 1s linear 0.3s;
	transform: translateX(-100vw);
	z-index: 99999;
	opacity: 1;
}

body.clicked .shamburger {
	transform: translateX(0);
}

body.clicked .wrapper {
	opacity: 0.3;
}

body.clicked .shamburger,
body.clicked .shamburger * {
	opacity: 1 !important;
}

/* Shamburger Logo */
.sham-logo {
	text-align: center;
}

.sham-logo a {
	display: inline-block;
}

.sham-logo .logo-blob {
	transition: fill var(--transition-fast);
}

.sham-logo a:hover .logo-blob {
	fill: var(--color-theme);
}

/* Shamburger Search */
.sham-search {
	position: relative;
	width: 100%;
}

.sham-search input:first-child {
	border: 2px solid var(--color-primary);
	border-radius: var(--radius-sm);
	padding: 10px 40px 10px 15px;
	width: 100%;
	font-size: var(--font-size-body);
}

.sham-search input:last-child {
	background: transparent url(../images/svg/search.svg) 0 0 no-repeat;
	background-size: contain;
	border: none;
	width: 25px;
	height: 25px;
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
}

/* Shamburger Nav */
.sham-nav h6 {
	font-size: var(--font-size-footer-heading);
	font-weight: 600;
	color: var(--color-primary);
	margin-bottom: var(--space-sm);
}

.sham-nav ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.sham-nav a {
	display: block;
	color: var(--color-secondary);
	text-decoration: none;
	font-size: var(--font-size-body);
	transition: color var(--transition-fast);
}

.sham-nav a:hover {
	color: var(--color-theme);
}

/* Shamburger Bottom */
.sham-bottom {
	margin-top: auto;
}

.sham-bottom p {
	font-size: 0.9rem;
	color: var(--color-secondary);
	margin-bottom: var(--space-sm);
}

.sham-social {
	display: flex;
	gap: var(--space-sm);
}

.sham-social a {
	display: flex;
	align-items: center;
}

.sham-social svg,
.sham-social img {
	width: 36px;
	height: 36px;
}

/*--------------------------------------------------------------
# Search
--------------------------------------------------------------*/

.simplesearch {
	position: relative;
}

.simplesearch input:first-child {
	border: 2px solid var(--color-primary);
	color: var(--color-primary);
	max-width: 200px;
	padding: var(--space-xs) 12px;
	font-size: 1rem;
	width: 100%;
	outline: none;
	transition: min-width var(--transition-fast);
	border-radius: var(--radius-sm);
}

.simplesearch input:last-child {
	background: var(--color-surface) url(../images/svg/search.svg) 0 0 no-repeat;
	border: none;
	outline: none;
	height: 21px;
	padding: 12px;
	position: absolute;
	right: var(--space-xs);
	top: var(--space-xs);
	width: 21px;
}

/*--------------------------------------------------------------
# Main Layout (Two-Column)
--------------------------------------------------------------*/

.mainsalute {
	display: flex;
	gap: var(--space-lg);
}

.mainsalute .left,
.mainsalute .right {
	flex-basis: calc(50% - 20px);
	flex-shrink: 1;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
	padding: var(--space-md) 0;
}

/*--------------------------------------------------------------
# Categories
--------------------------------------------------------------*/

section.tcategory {
	margin: auto;
	text-align: center;
}

.browcateg {
	max-width: 900px;
	margin: var(--space-lg) auto;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	justify-content: center;
}

.right .browcateg {
	margin: auto;
	justify-content: center;
}

.browcateg article {
	background-color: var(--color-surface);
	color: var(--color-primary);
	font-weight: bold;
	padding: 7px var(--space-md);
	font-size: 1.3rem;
	border: 2px solid var(--color-primary);
	border-radius: var(--radius-sm);
	max-width: 200px;
	text-align: center;
}

.browcateg article:hover {
	background-color: var(--color-muted);
}

.browcateg a {
	text-decoration: none;
	color: var(--color-primary);
}

/*--------------------------------------------------------------
# Author Box
--------------------------------------------------------------*/

.author-box {
	background-color: color-mix(in srgb, var(--color-theme) 5%, white);
	border: 1px solid color-mix(in srgb, var(--color-theme) 15%, white);
	border-radius: var(--radius-sm);
	padding: var(--space-lg);
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
	width: auto !important;
	max-width: 820px;
	margin: var(--space-lg) auto 0;
}

.author-info {
	display: flex;
	gap: var(--space-md);
	align-items: center;
}

.author-avatar {
	width: 70px !important;
	max-width: 70px !important;
	height: 70px !important;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.author-details h4 {
	font-size: 1.3rem;
	color: var(--color-primary);
	margin-bottom: 5px;
}

.author-details p {
	font-size: var(--font-size-body);
	color: var(--color-secondary);
	line-height: 1.6;
	margin-bottom: var(--space-sm);
}

.author-details a {
	color: var(--color-theme);
	text-decoration: none;
}

.author-details a:hover {
	color: var(--color-primary);
}

.author-social {
	display: flex;
	gap: var(--space-xs);
}

.author-social img {
	width: 32px;
	height: 32px;
}

.author-subscribe {
	border-top: 1px solid color-mix(in srgb, var(--color-theme) 15%, white);
	padding-top: var(--space-lg);
	text-align: center;
}

.author-subscribe p {
	font-size: var(--font-size-body);
	color: var(--color-secondary);
	line-height: 1.6;
	margin-bottom: var(--space-md);
	width: auto !important;
	max-width: 600px !important;
	margin-left: auto;
	margin-right: auto;
}

.author-subscribe .wsubscribe {
	margin: 0 auto;
}

/*--------------------------------------------------------------
# Subscribe Form
--------------------------------------------------------------*/

.wsubscribe {
	display: flex;
	max-width: 500px;
}

.wsubscribe input {
	padding: var(--space-xs) var(--space-sm);
	border: 2px solid var(--color-primary);
	font-size: 1.2rem;
	outline: none;
}

.wsubscribe input:first-child {
	flex: 1 1 70%;
	padding: 7px;
	border-radius: var(--radius-sm) 0 0 var(--radius-sm);
	width: 160px;
}

.wsubscribe input:nth-child(2) {
	flex: 1 1 30%;
	background: var(--color-primary);
	color: var(--color-surface);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	font-weight: bold;
	cursor: pointer;
	transition: background-color var(--transition-fast);
}

.wsubscribe input:nth-child(2):hover {
	background: var(--color-theme);
}

/*--------------------------------------------------------------
# Homepage - Top Header
--------------------------------------------------------------*/

.tphead {
	display: flex;
	justify-content: space-between;
	padding: var(--space-sm) 0;
	border-bottom: 2px solid var(--color-border);
}

.pnarrows {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pnarrows div svg {
	width: 40px;
	outline: none;
	border: none;
	color: var(--color-primary);
}

.tpsearch {
	position: relative;
	align-self: center;
}

.tpsearch input:first-child {
	border: 2px solid var(--color-primary);
	color: var(--color-primary);
	width: 150px;
	padding: var(--space-xs) 12px;
	font-size: 1rem;
	outline: none;
	transition: width var(--transition-fast);
	border-radius: var(--radius-sm);
}

.tpsearch input:first-child:focus {
	width: 180px;
}

.tpsearch input:last-child {
	background: var(--color-surface) url(../images/svg/search.svg) 0 0 no-repeat;
	border: none;
	outline: none;
	height: 21px;
	padding: 12px;
	position: absolute;
	right: var(--space-xs);
	top: var(--space-xs);
	width: 21px;
}

/*--------------------------------------------------------------
# Homepage - Editor's Picks Carousel
--------------------------------------------------------------*/

.epick {
	display: flex;
	gap: var(--space-md);
	overflow-x: scroll;
	overflow-y: hidden;
	margin: var(--space-sm) auto;
	padding: var(--space-lg) 0;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
}

.epick::-webkit-scrollbar {
	height: 8px;
}

.epick::-webkit-scrollbar-track {
	background: var(--color-border);
	border-radius: 4px;
}

.epick::-webkit-scrollbar-thumb {
	background: var(--color-muted);
	border-radius: 4px;
}

/*--------------------------------------------------------------
# Homepage - Card Component (Recurse)
--------------------------------------------------------------*/

.recurse a,
.recurse-2 a {
	color: inherit;
	text-decoration: none;
}

.recurse {
	display: flex;
	flex-direction: column;
	flex: 0 0 25%;
	scroll-snap-align: start;
}

@media (max-width: 1024px) {
	.recurse {
		flex: 0 0 40%;
	}
}

@media (max-width: 576px) {
	.recurse {
		flex: 0 0 100%;
	}
}

.recurse .pic img {
	width: 100%;
	border-radius: var(--radius-lg);
}

/*--------------------------------------------------------------
# Homepage - Horizontal Card (Recurse-2)
--------------------------------------------------------------*/

.recurse-2 {
	display: flex;
	gap: var(--space-lg);
}

.recurse-2 picture {
	flex: 0 1 35%;
}

.recurse-2 img {
	width: 100%;
	border-radius: var(--radius-lg);
}

.headpara {
	display: flex;
	flex-direction: column;
	flex: 1 1 55%;
	align-items: flex-start;
	justify-content: center;
	gap: var(--space-xs);
}

@media (max-width: 768px) {
	.recurse-2 {
		flex-direction: column;
	}

	.recurse-2 picture {
		flex: 0 0 auto;
	}

	.mainsalute {
		flex-direction: column;
	}

	.mainsalute .left,
	.mainsalute .right {
		flex-basis: 100%;
	}

	.mainsalute .left {
		text-align: center;
		align-items: center;
	}
}

/*--------------------------------------------------------------
# Homepage - Stack Bottom Section
--------------------------------------------------------------*/

.stack .bottom {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

/*--------------------------------------------------------------
# Post Page
--------------------------------------------------------------*/

.stack.post h1 {
	text-align: center;
	line-height: 1.2;
	font-style: italic;
	font-size: 4.6rem;
}

.stack.post h2 {
	text-align: center;
	font-size: 3.6rem;
	line-height: 1.2;
}

.stack.post h3 {
	text-align: center;
	font-size: 2.8rem;
	line-height: 1.25;
}

.stack.post h4 {
	text-align: center;
	font-size: 2.2rem;
	line-height: 1.3;
}

.stack.post h5 {
	text-align: center;
	font-size: 2.2rem;
	line-height: 1.35;
}

.stack.post h6 {
	text-align: center;
	font-size: 1.8rem;
	line-height: 1.4;
}

.stack.post p {
	max-width: 900px;
	margin: var(--space-sm) auto;
	font-size: var(--font-size-body);
}

.stack.post picture {
	max-width: 1100px;
	margin: var(--space-lg) auto;
	display: block;
}

.stack.post picture img {
	width: 100%;
}

.stack.post p a {
	text-decoration: none;
	padding: 1px 5px;
	font-size: 1.3rem;
	color: var(--color-theme);
	border-bottom: 1px solid var(--color-theme);
	font-family: var(--font-primary);
}

.stack.post p a:hover {
	border-bottom: 2px solid var(--color-theme);
}

/*--------------------------------------------------------------
# Post Navigation
--------------------------------------------------------------*/

.post-nav {
	display: flex;
	justify-content: center;
	gap: var(--space-md);
	margin-top: var(--space-lg);
}

.post-nav-btn {
	padding: 12px 30px;
	border-radius: var(--radius-sm);
	font-size: 1.1rem;
	font-weight: 600;
	font-family: var(--font-primary);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 2px;
	transition: all var(--transition-fast);
}

.post-nav-btn.outline {
	border: 2px solid var(--color-primary);
	background-color: transparent;
	color: var(--color-primary);
}

.post-nav-btn.outline:hover {
	background-color: var(--color-primary);
	color: var(--color-surface);
}

.post-nav-btn.solid {
	border: 2px solid var(--color-primary);
	background-color: var(--color-primary);
	color: var(--color-surface);
}

.post-nav-btn.solid:hover {
	background-color: transparent;
	color: var(--color-primary);
}

/*--------------------------------------------------------------
# Single Page (Two-Column Layout)
--------------------------------------------------------------*/

.stack.single {
	gap: var(--space-lg);
}

.single-content {
	flex: 1 1 65%;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.single-content picture {
	display: block;
	margin: var(--space-sm) 0;
}

.single-content picture img {
	width: 100%;
}

.single-content p a {
	text-decoration: none;
	color: var(--color-theme);
	border-bottom: 1px solid var(--color-theme);
}

.single-content p a:hover {
	border-bottom: 2px solid var(--color-theme);
}

.single-sidebar {
	flex: 0 0 var(--sidebar-width);
	max-width: var(--sidebar-width);
}

/*--------------------------------------------------------------
# Trending Block
--------------------------------------------------------------*/

.trending-block {
	background-color: var(--color-background);
	padding: var(--space-sm);
}

.trending-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	margin-bottom: var(--space-sm);
}

.trending-header svg {
	color: var(--color-theme);
}

.trending-header h5 {
	font-size: 1.7rem;
	font-weight: 600;
	text-align: center;
}

.trending-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.trending-list li {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.trending-num {
	font-size: 2rem;
	color: var(--color-theme);
	line-height: 1.4;
	min-width: 25px;
}

.trending-list a {
	color: var(--color-primary);
	text-decoration: none;
	font-size: 1rem;
	line-height: 1.4;
}

.trending-list a:hover {
	color: var(--color-theme);
}

@media (max-width: 1100px) {
	.stack.single {
		flex-direction: column;
	}

	.single-sidebar {
		flex: 0 0 auto;
		max-width: 100%;
	}

	.trending-block {
		padding: var(--space-sm) var(--space-lg);
	}

	.trending-list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: var(--space-sm) 40px;
	}

	.trending-list a {
		font-size: 1.2rem;
	}
}

@media (max-width: 600px) {
	.trending-list {
		grid-template-columns: 1fr;
		gap: var(--space-sm);
	}

	.trending-list a {
		font-size: 1rem;
	}
}

/*--------------------------------------------------------------
# Comments Section
--------------------------------------------------------------*/

.postcomments {
	display: flex;
	gap: var(--space-lg);
	justify-content: space-between;
}

.comlist {
	flex: 1 1 60%;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.comlist h3 {
	position: relative;
	display: flex;
	gap: var(--space-xs);
	margin-right: auto;
}

.comlist .comcount {
	position: absolute;
	font-size: 2rem;
	right: -40px;
}

.load-more-comments {
	padding: 12px 30px;
	border: 2px solid var(--color-theme);
	border-radius: var(--radius-sm);
	background-color: transparent;
	color: var(--color-theme);
	font-size: 1.3em;
	font-weight: 600;
	font-family: var(--font-primary);
	text-decoration: none;
	text-align: center;
	margin: 0 auto;
	transition: all var(--transition-fast);
}

.load-more-comments:hover {
	background-color: var(--color-theme);
	color: var(--color-surface);
}

.load-more-posts {
	padding: 12px 30px;
	border: 2px solid var(--color-theme);
	border-radius: var(--radius-sm);
	background-color: transparent;
	color: var(--color-theme);
	font-size: 1.3em;
	font-weight: 600;
	font-family: var(--font-primary);
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: all var(--transition-fast);
}

.load-more-posts:hover {
	background-color: var(--color-theme);
	color: var(--color-surface);
}

.combox {
	display: flex;
	gap: 20px;
	padding: 20px;
	background-color: var(--color-background);
	border-radius: var(--radius-sm);
}

.com-avatar {
	flex: 0 0 50px;
}

.com-avatar img {
	width: 100%;
	border-radius: 50%;
}

.com-content {
	flex: 1;
}

.com-meta {
	display: flex;
	gap: var(--space-sm);
	margin-bottom: var(--space-xs);
}

.com-author {
	font-weight: normal;
}

.com-date {
	font-size: 0.9rem;
	color: var(--color-muted);
	margin-left: 10px;
}

.com-text {
	margin: 15px 0;
	font-size: var(--font-size-body);
}

.com-reply {
	padding: 5px 15px;
	font-weight: 600;
	background-color: transparent;
	border: 2px solid var(--color-primary);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition-fast);
}

.com-reply:hover {
	background-color: var(--color-primary);
	color: var(--color-surface);
}

.comform {
	flex: 0 0 auto;
	max-width: 350px;
	display: flex;
	flex-direction: column;
	gap: 40px;
	position: sticky;
	top: 0;
	align-self: flex-start;
	background-color: var(--color-cream);
	padding: var(--space-sm);
}

.comform h6 {
	letter-spacing: 2px;
	text-transform: uppercase;
	font-family: var(--font-primary);
	font-size: 1.5625rem;
}

.comform input,
.comform textarea {
	padding: var(--space-xs) var(--space-sm);
	border: 2px solid var(--color-border);
	background-color: var(--color-surface);
	font-size: 1.3em;
	font-family: var(--font-primary);
	outline: none;
}

.comform input:focus,
.comform textarea:focus {
	border-color: var(--color-primary);
}

.comform input[type="submit"] {
	background-color: var(--color-theme);
	border-color: var(--color-theme);
	color: var(--color-surface);
	max-width: 250px;
	margin: 0 auto;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-weight: 600;
	transition: all var(--transition-fast);
}

.comform input[type="submit"]:hover {
	background-color: var(--color-surface);
	color: var(--color-theme);
}

@media (max-width: 1000px) {
	.postcomments {
		flex-direction: column-reverse;
	}

	.comform {
		position: relative;
		align-self: auto;
		max-width: 100%;
	}
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/

.footer {
	display: flex;
	flex-direction: column;
	gap: 30px;
	padding: 40px;
}

.footer-row {
	display: flex;
	gap: var(--space-lg);
}

.footer-row.wrap {
	flex-wrap: wrap;
}

.footer-row.split {
	justify-content: space-between;
	align-items: center;
}

.footer-nav {
	justify-content: space-between;
}

.footer-nav h6 {
	font-size: var(--font-size-footer-heading);
	font-weight: 600;
	margin-bottom: var(--space-sm);
	color: var(--color-primary);
}

.footer-nav ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.footer-nav a {
	color: var(--color-secondary);
	text-decoration: none;
	font-size: var(--font-size-footer-link);
}

.footer-nav a:hover {
	color: var(--color-theme);
}

.footer-brand {
	justify-content: center;
	text-align: center;
}

.footer-brand a {
	display: inline-block;
}

.footer-brand .logo-blob {
	transition: fill var(--transition-fast);
}

.footer-brand a:hover .logo-blob {
	fill: var(--color-theme);
}

.footer-brand p {
	margin-top: var(--space-xs);
	color: var(--color-secondary);
}

.footer-legal p {
	font-size: 0.9rem;
	color: var(--color-secondary);
}

.footer-legal a {
	color: var(--color-secondary);
	text-decoration: underline;
}

.footer-legal a:hover {
	color: var(--color-theme);
}

.footer-social {
	display: flex;
	gap: var(--space-sm);
}

.footer-social a {
	display: flex;
	align-items: center;
}

.footer-social svg,
.footer-social img {
	width: 36px;
	height: 36px;
}

@media (max-width: 768px) {
	.footer-row.split {
		flex-direction: column;
		gap: var(--space-sm);
		text-align: center;
	}
}

/*--------------------------------------------------------------
# WordPress Neutralizer
--------------------------------------------------------------*/

.site-header,
.wp-block-template-part {
	display: contents;
}
