/*
Theme Name: Tolka 2025
Theme URI: https://tolkajournal.org
Author: Ian Maleney
Author URI: https://ianmaleney.com
Description: Tolka Theme.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tolka-2025
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

@import url("assets/css/theme.css") layer(theme);

:root {
	--sans: "Rubik", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--serif: "adobe-caslon-pro", Georgia, Cambria, "Times New Roman", Times, serif;
	--primary-blue: #005366;
	--primary-red: #822653;
	--warm-grey: #E5E1DE;
	--dark-grey: #707070;
	--secondary-blue-dark: #5A849D;
	--secondary-blue-light: #BCD8EA;
	--secondary-green-dark: #79AFA9;
	--secondary-green-light: #C0D5D2;
}

html {
	font-family: var(--sans);
	line-height: 1.5;
	background-color: var(--warm-grey);
}

a {
	color: var(--primary-blue);
	text-decoration: none;
	&:hover {
		text-decoration: underline;
	}
}

.site-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	position: fixed;
	top: 30px;
	width: 80px;
	padding: 10px;
	height: calc(100vh - 60px);
	border-right: 1px solid var(--dark-grey);
	background-color: var(--warm-grey);
}

body {
	margin: 0;
	padding: 0;
	max-width: 100vw;
	overflow-x: hidden;
}

.site-title {
	margin: 0;
	height: 170px;
}

.site-title a {
	text-decoration: none;
	display: flex;
	align-items: center;
}

.site-main {
	margin: 10vh 0;
}

.tolka-logomark {
	--size: 50px;
	fill: black;
	width: var(--size);
}

.site-header .header-buttons-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-evenly;
}

.site-header .tolka-logomark {
	margin-left: 0;
}

.tolka-wordmark {
	height: 30px;
	fill: black;
	padding: 5px 10px 5px;
	border-radius: 4px;
}

.tolka-wordmark:hover {
	background-color: var(--secondary-blue-light);
}

.site-header .tolka-wordmark {
	transform: rotate(-90deg);
}

.site-header .site-navigation {
	position: absolute;
    top: 0;
    left: -50vw;
    border-right: 1px solid var(--dark-grey);
    background-color: var(--warm-grey);
    width: 33vw;
    height: calc(100vh - 60px);
    padding: 10px;
	transition: all 0.3s ease-in-out;
}

.site-header .site-navigation.visible {
	transform: translateX(calc(101px + 50vw));
}

.site-header:has(.site-navigation.visible) + #primary {
	transform: translatex(calc(33vw + 80px));
}

.menu {
	list-style: none;
    display: flex;
    flex-direction: column;
    font-family: var(--sans);
    color: black;
	padding-left: 0;
}

.menu li {
	margin-right: 25px;
	margin-bottom: 30px;
}

.menu li a {
	text-decoration: none;
	font-size: 2rem;
	color: white;
	&:hover {
		text-decoration: underline;
	}
}

#site-footer-menu li a {
	color: black;
}

.site-footer {
	background-color: var(--warm-grey);
	margin-bottom: -25px;
	padding: 50px 0 100px;
	margin-left: calc(100px + 2rem);
	border-top: 1px solid var(--dark-grey);
	display: flex;
    justify-content: space-between;
    width: calc(100vw - 100px - 4rem);
    align-items: flex-end;
}

footer #site-header-menu {
	padding-left: 0;
}

.site-footer__logo {
	width: 15vw;
	margin-bottom: 1rem;
}

.page-wrapper {
	margin: 10vh 0;
}

#primary {
	transition: all 0.3s ease-in-out;
	position: relative;
	top: -33px;
    left: calc(100px + 2rem);
    width: calc(100vw - 100px - 2rem);
}

.home, .search-results {
	position: relative;
	top: -33px;
	left: calc(100px + 2rem);
    width: calc(100vw - 100px - 2rem);
	& .page-wrapper {
		margin: 0;
	}
}

.home .hp-component {
	margin-top: 4rem;
	padding: 0;
	width: calc(100% - 2vw);
}

.hp-component__heading{
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.single-article {
	@media (min-width: 1200px) {
		padding: 0 4vw;
	}
	h1, h2, h3, h4, h5, h6, figcaption, caption {
		font-family: var(--sans);
		line-height: 1.2;
		max-width: 70ch;
	}
}

.search-results .single-article {
	margin: 20vh 0;
}

.search-results li {
	margin-bottom: 1rem;
    font-size: 1.2rem;
    list-style: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    padding: 1rem 0;
    max-width: 768px;
}

.search-results li a {
	text-decoration: none;
	color: black;
	&:hover {
		color: var(--primary-blue);
	}
}

.article-header {
	text-align: center;
	margin-bottom: 10vh;
}

.article-body, .article-header {
	@media (min-width: 720px) {
		margin: 0 auto;
		width: 96%;
	}
	@media (min-width: 900px) {
		margin: 0 auto;
		width: 80%;
	}
	@media (min-width: 1050px) {
		margin: 0 auto;
		width: 56%;
	}
}

.single-article .article-header {
	margin-bottom: 6rem;
}

.article-image img {
	max-width: 100%;
	max-height: 50vh;
	object-fit: cover;
}

.article-title {
	font-size: 2.5rem;
	font-family: var(--sans);
	@media (min-width: 1000px) {
		font-size: calc(3 * 1.2vw + 1rem);
	}
}

.article-body {
	p, li, blockquote {
		line-height: 1.5;
		font-family: var(--serif);
		font-size: 1.3rem;
		font-weight: 400;
	}
	@media (max-width: 600px) {
		p, a, li, blockquote {
			font-size: 1.1rem;
		}
	}
}

.alignright {
	float: right;
	margin: 0 0 1rem 1rem;
	max-width: 50%;
}

.alignleft {
	float: left;
	margin: 0 1rem 1rem 0;
	max-width: 50%;
}

.alignright, .alignleft {
	@media (max-width: 960px) {
		float: none;
		display: block;
		margin: 0 auto 1rem auto;
		max-width: 100%;
	}
}

.marker-wrapper {
	height: 20px;
}

.archive-grid {
	display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 40vw));
    gap: 2rem;
    margin: 0 auto;
    max-width: calc(80vw + 2rem);
}

.archive-article {
	margin-bottom: 3rem;
}

.archive-article-title {
	font-family: var(--sans);
	font-size: 2.2rem;
	margin: 0.5rem 0;
	font-weight: 500;
}

.archive-article-title a {
	text-decoration: none;
	color: black;
	&:hover {
		text-decoration: underline;
	}
}

.archive-article p {
	font-family: var(--sans);
	font-size: 1.2rem;
	font-weight: 300;
	margin: 0;
}

.search-overlay, .menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	pointer-events: none;
}

.search-overlay.visible, .menu-overlay.visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.search-overlay__background, .menu-overlay__background {
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	position: absolute;
	top: 0;
	left: 0;
	z-index: -1;
}

.search-field {
	padding: 0.75rem;
	border: 1px solid var(--dark-grey);
	border-radius: 4px;
	margin-right: 1rem;
	width: 250px;
	max-width: 100%;
	font-family: inherit;
}

.search-submit {
	font-family: inherit;
	padding: 0.75rem 1.5rem;
	background-color: white;
	color: #000;
	border: 1px solid var(--dark-grey);
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}
.search-submit:hover {
	background-color: var(--secondary-blue-light);
}

.nav-links {
	font-size: 1.5rem;
}

.nav-links .prev {
	margin-right: 2rem;
}
.nav-links .next {
	margin-left: 2rem;
}

/* ==========================================================================
   Component Styles
   ========================================================================== */

/* Socials Component
   ========================================================================== */
.social-icons-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: absolute;
    left: 25vw;
    top: 30px;
    z-index: 1000;
}
.social-icons-wrapper a {
    padding: 6px 8px 0 8px;
    transition: background-color 0.3s ease;
    border-radius: 8px;
}
.social-icons-wrapper a:hover {
    background-color: var(--secondary-blue-light);
}

/* Headline Component
   ========================================================================== */
.headline-wrapper {
    position: relative;
    top: 0;
    width: 100%;
    height: 80vh;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(7, 1fr);
}

.headline-text-wrapper {
    grid-column: 1 / span 3;
    grid-row: 5 / span 2;
}

.headline-categories {
    max-width: 62%;
    border-top: 1px solid var(--dark-grey);
    padding-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    & h2 {
        font-size: 1.2rem;
        font-weight: normal;
        color: var(--dark-grey);
        margin: 0;
        line-height: 1;
    }
}

.headline {
    width: 80%;
    font-size: 5.5rem;
    line-height: 1;
    color: #000;
    margin-top: 1rem;
}

.headline a {
    color: inherit;
    text-decoration: none;
    &:hover {
        text-decoration: underline;
    }
}

.headline-image-wrapper {
    grid-column: 3 / -1;
    grid-row: 1 / span 5;
    max-height: calc(80vh / 7 * 5);
    & img {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
}

/* Big Subscribe Button Component
   ========================================================================== */
.big-subscribe-button {
    grid-column: 4 / span 2;
    grid-row: 5 / span 2;
    justify-self: center;
    align-self: center;
    background-color: var(--secondary-blue-light);
    color: white;
    font-weight: bold;
    font-size: 1.8rem;
    border-radius: 50% 50%;
    padding: 20px;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.big-subscribe-button:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    background-color: var(--primary-red);
}

/* Recent Issues Component
   ========================================================================== */
.recent-issues__grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--dark-grey);
    padding-top: 1.5rem;
}

.recent-issue {
    max-width: 30%;
    flex: 1 0 30%;
}

.recent-issue__link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.recent-issue__link:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}
.recent-issue__image img {
    width: 100%;
    height: auto;
    display: block;
}
.recent-issue__title {
    margin-top: 1rem;
    font-size: 1.2rem;
    text-align: center;
}
.recent-issue__title a {
    color: #000;
    text-decoration: none;
}
.recent-issue__title a:hover {
    text-decoration: underline;
}

/* Recent Podcast Episodes Component
   ========================================================================== */
.episode-grid {
	border-top: 1px solid var(--dark-grey);
	display: flex;
	align-items: center;
	padding-top: 1.5rem;
	flex-wrap: wrap;
}

.recent-episode--featured {
	width: 50%;
    padding-right: 2rem;
	min-width: 300px;
}

.recent-episode--secondary {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin: 1.5rem;
}

.recent-episode__title {
	margin: 0;
}

.recent-episode__title a {
	color: #000;
	text-decoration: none;
}
.recent-episode__title a:hover {
	background-color: var(--secondary-blue-light);
}

/* Recent Posts Component
   ========================================================================== */
.recent-posts__grid {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    border-top: 1px solid var(--dark-grey);
    padding-top: 1.5rem;
}

.recent-post {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 48%;
    margin-bottom: 3rem;
}

.recent-post__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

.recent-post__title {
    font-size: 2.5rem;
    margin-top: 0;
}

.recent-post__title a {
    color: #000;
    text-decoration: none;
}

.recent-post__title a:hover {
    text-decoration: underline;
}

.recent-post__writers {
    display: flex;
    gap: 0.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--dark-grey);
}
.post-meta .marker-wrapper {
    transform: scale(0.8);
}

/* Subscribe Component
   ========================================================================== */
.subscribe-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--dark-grey);
    padding-top: 1.5rem;
}

.subscribe-content .wp-post-image {
    width: 33vw;
    height: auto;
    border-radius: 8px;
}

.subscribe-content .right {
    text-align: center;
	font-size: 1.5rem;
	max-width: 45%;
}

.subscribe-button {
	display: inline-block;
	background-color: var(--primary-red);
	color: white;
	font-weight: bold;
	font-size: 1.2rem;
	border-radius: 4px;
	padding: 0.75rem 1.5rem;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease;
	box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
	margin: 1rem 0;
}

.subscribe-button:hover {
	background-color: var(--secondary-blue-light);
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}

/* Archive Posts Component
   ========================================================================== */
.archive-posts-wrapper {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--dark-grey);
    padding-top: 1.5rem;
    flex-wrap: wrap;
}
.archive-posts__grid {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    width: 48%;
}

.archive-post {
    display: flex;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.archive-post.active {
    background-color: var(--secondary-blue-light);
}

.post_extract {
    display: none;
}

.archive-extract-wrapper {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: 48%;
    box-sizing: border-box;
    padding: 2rem;
    font-size: 1.35rem;
}

.archive-extract-wrapper.active {
    opacity: 1;
    transform: translateY(0);
}

/* Newsletter Component
   ========================================================================== */
.newsletter-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    border-top: 1px solid var(--dark-grey);
    padding: 4.5rem 0;
}
.newsletter__form input {
    padding: 0.75rem;
    border: 1px solid var(--dark-grey);
    border-radius: 4px;
    margin-right: 1rem;
    width: 250px;
    max-width: 100%;
    font-family: inherit;
}
.newsletter__button {
    font-family: inherit;
    padding: 0.75rem 1.5rem;
    background-color: var(--warm-grey);
    color: #000;
    border: 1px solid var(--dark-grey);
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.newsletter__button:hover {
    background-color: var(--secondary-blue-light);
}

/* Search Button Component
   ========================================================================== */
.search-button {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 8px;
    margin: 1rem 0;
    cursor: pointer;
    &:hover {
        background-color: var(--secondary-blue-light);
    }
}

/* Menu Button Component
   ========================================================================== */
.menu-button {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    margin: 0;
    cursor: pointer;
    &:hover {
        background-color: var(--secondary-blue-light);
    }
}

/* ==========================================================================
   WooCommerce Styles
   ========================================================================== */


.woocommerce-cart .article-body, .woocommerce-cart .article-header {
	width: 100%;
}

.woocommerce-cart .article-header {
	margin-bottom: 1rem !important;
}
.woocommerce-cart .article-header h1 {
	text-align: left;
	font-size: 2.5rem;
}


.woocommerce-cart-wrapper {
	margin: 0 auto;
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}

.woocommerce-cart-wrapper .woocommerce-cart-form {
	width: 60%;
	flex: 1 0 60%;
} 

.woocommerce-cart-wrapper .cart-collaterals {
	width: 35%;
	flex: 1 0 35%;
}

.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals {
	width: 100%;
}

.woocommerce-cart-wrapper .cart-collaterals h2 {
	display: none;
}

.woocommerce-cart-form #coupon_code {
	width: 120px;
}

.wp-block-woocommerce-single-product .wp-block-columns-is-layout-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: start;
}

.wp-block-woocommerce-single-product .wp-block-columns-is-layout-flex .wp-block-column-is-layout-flow {
	flex: 1 0 45%;
}

.wp-block-woocommerce-single-product ul {
	list-style: none;
}

.wp-block-woocommerce-single-product .wp-block-add-to-cart-form form {
	display: flex;
	align-items: center;
}

.wp-block-add-to-cart-form form input.qty {
	font-size: 1.2rem;
	padding: 0.5rem;
	margin-right: 1rem;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */



@media (max-width: 900px) {
	.article-image {
		margin-bottom: 2rem;
	}
	.article-header {
		margin-bottom: 4rem;
	}
	#primary {
		width: calc(100vw - calc(65px + 5rem));
	}
}



@media (max-width: 600px) {
	.site-header {
		width: 45px;
	}
	.tolka-logomark {
		--size: 35px;
	}
	.tolka-wordmark {
		height: 25px;
	}
	#icon__search {
		transform: scale(0.75);
	}
	.search-button {
		margin: 0;
	}
	.social-icons-wrapper {
		flex-direction: column;
		position: fixed;
		left: 14px;
		top: 82vh;
		height: 33vh;
	}
	.home {
		left: calc(65px + 2.5rem);
        width: calc(100vw - calc(65px + 1.5rem));
	}

	.home, .search-results {
		& .page-wrapper {
			margin: 0;
			margin-left: 20px;
		}
	}
	#primary {
		/* top: -50px; */
		left: calc(65px + 1rem);
        width: calc(100vw - calc(65px + 2rem));
	}
	.site-footer {
		margin-left: calc(65px + 2.5rem);
        width: calc(100vw - calc(65px + 1.5rem));
		flex-direction: column;
        align-items: flex-start;
	}
	.site-footer__logo {
		width: 80%;
	}
	.home .hp-component {
		width: calc(100% - 4vw);
	}
	.headline-wrapper {
		display: flex;
		flex-direction: column;
	}
	.headline-text-wrapper {
		margin-top: 2rem;
	}
	.headline-categories {
		max-width: 100%;
		gap: 1rem;
	}
	.headline {
		font-size: 3.5rem;
		width: 100%;
		line-height: 1.2;
	}
	.big-subscribe-button {
		display: none;
	}
	.recent-issues__grid {
		flex-direction: column;
	}
	.recent-issue {
		max-width: 100%;
	}
	.recent-post {
		width: 100%;
		margin-bottom: 1rem;
	}
	.recent-posts .post-meta {
		margin-bottom: 0.75rem;
	}
	.recent-posts .recent-post__title {
		line-height: 1.2;
	}
	.archive-post .post-meta {
		gap: 0.5rem;
    	font-size: 1rem;
	}
	.archive-post .recent-post__writers {
		gap: 0.2rem;
	}
	.recent-news .recent-post__title, .archive-post .recent-post__title {
		font-size: 1.8rem;
	}
	.archive-posts__grid {
		width: 100%;
	}
	.archive-extract-wrapper {
		display: none;
	}
	.archive-post {
		padding: 0;
		gap: 0;
	}
	.newsletter-wrapper {
		padding: 1rem 0;
	}
	.newsletter__input {
		margin-bottom: 1rem;
	}
	.post-meta {
		display: flex;
        gap: 0.5rem;
        font-size: 1rem;
        color: var(--dark-grey);
        flex-wrap: wrap;
	}
	.subscribe-content {
		flex-direction: column;
	}
	.subscribe-content .right {
		font-size: 1.35rem;
	}
}

@media (max-width: 400px) {
	.article-title {
		font-size: 1.6rem;
	}
}

