
:root {
	--color-1-font: #333;
	--color-1-background: #FFFFFF;

    --color-2-font: #FFFFFF;
	--color-2-background: #FFFFFF;

    --color-3-font: #FFFFFF;
	--color-3-background: #FFFFFF;

    --color-4-font: #FFFFFF;
	--color-4-background: #FFFFFF;

    --color-5-font: #FFFFFF;
	--color-5-background: #FFFFFF;

	--body-font-family: Arial, sans-serif;
	--body-font-color: #333;
	--body-background-color: #fff;

	--content-font-color: #333;
	--content-background-color: #FFFFFF;

    --tile-font-family: Garamond, serif;
	--title-font-color: #003399;
    --title-font-size: 1.5rem;
	
	--site-padding-top: 20px;
	--site-padding-bottom: 20px;
	--site-padding-left: 1rem;
	--site-padding-right: 1rem;

	--content-margin-top-bottom: 0px;
	--content-margin-left-right: 0px;

	--content-padding-top: 15px;
	--content-padding-bottom: 15px;
	--content-padding-left: max(30px, 2vw);
	--content-padding-right: max(30px, 2vw);
	--content-padding-bottom-last-item: minmax(30px, 2vw);

	--content-font-size: 1rem;
	--content-line-height: 1.4;
	--content-max-width: 980px;
	--content-width: calc(100% - var(--content-margin-left-right) - var(--content-margin-left-right) - var(--content-padding-left) - var(--content-padding-right));

	--content-box-shadow: 0px 2px 5px -1px rgba(0,0,0,0.05);

	--featured-image-figcaption-font-size: 0.9rem;

	--header-title-font-size: 1.4rem;
	--header-tagline-font-size: 0.9rem;
	--header-height: 3.125rem;
	--header-width: 320px;

	--search-height: 3.125rem;
	--search-input-width: calc(1ch * 60);

	--aside-wrapper-width: 260px;
	--aside-font-size: max(0.6vw, 1.2rem);

    --title: ;
    --content: ;
	--excerpt: ;
    --archive-desc: ;
	--image: ;
	--date: ;
	--author: ;
	--category: ;
	--tag: ;
	--comments: ;
	--comments-n: ;
	--breadcrumbs: ;
	--loop: ;
	--pagination: ;

	--title-loop: ;
    --content-loop: ;
	--excerpt-loop: ;
	--image-loop: ;
	--date-loop: ;
	--author-loop: ;
	--category-loop: ;
	--tag-loop: ;
	--comments-loop: ;
	--comments-n-loop: ;

    --widget-front-page: ;
}

html, body {
    height: 100%; /* "height: 100%" required for scroll lock of main content when responsive menu is open. */
}

body {
	font-family: var(--body-font-family);
	color: var(--body-font-color);
	background: var(--body-background-color);	
	font-size: 1rem;
}

/* Still required? */
input[type=text],
input[type=search] {
	border: none;
}

body.single {
	--title: "title title title" auto;
    --content: "content content content" auto;
	--date: "date date date" auto;
	--author: "author author author" auto;
	--comments: "comments comments comments" auto;
	--comments-n: "comments-n comments-n comments-n" auto;
}

body.page {
	--title: "title title title" auto;
    --content: "content content content" auto;
}

body.has-breadcrumbs {
	--breadcrumbs: "breadcrumbs breadcrumbs breadcrumbs" auto;
}

body.has-post-thumbnail {
	--image: "image image image" auto;
}

body.has-tag {
	--tag: "tag tag tag" auto;
}

body.has-category {
	--category: "category category category" auto;
}

body.error404 {
	--title: "title title title" auto;
}

body.archive {
	--title: "title title title" auto;
	--loop: "loop loop loop" auto;
	--pagination: "pagination pagination pagination" auto;
}

body.search {
	--title: "title title title" auto;
	--loop: "loop loop loop" auto;
	--pagination: "pagination pagination pagination" auto;
}

body.has-archive-description {
	--archive-desc: "archive-desc archive-desc archive-desc" auto;
}

body.blog {
	--loop: "loop loop loop" auto;
	--pagination: "pagination pagination pagination" auto;
}

body.no-pagination {
	--pagination: ;
}

body.has-front-page-widget {
	--widget-front-page: "widget-front-page widget-front-page widget-front-page" auto;
}

/*
 * Set second last row to 1fr to avoid content getting streched when sidebar is longer than article.
  * Other fix: include 2 rows for "content" and set 2nd "content" row to "1fr" height 
 */
.error404 #attn-wrapper {
	display: grid;
	grid-template:
	"header header burger" var(--header-height)
    var(--title)
	"footer footer footer" auto
	/ 1fr auto 50px;
    gap: 0; /* gap can cause white space gap when a element is not available */
}

#attn-wrapper {
	display: grid;
	grid-template:
	"header header burger" var(--header-height)
	var(--breadcrumbs)
    var(--image)
    var(--category)
    var(--title)
    var(--archive-desc)
    var(--date)
    var(--tag)
    var(--content)
    var(--author)

    var(--comments)
    var(--comments-n)
    var(--widget-front-page)
    var(--loop)
    var(--pagination)
	"footer footer footer" auto
	/ 1fr auto 50px;
    gap: 0; /* gap can cause white space gap when a element is not available */
}

#attn-wrapper > * {
    /* background: #364963; */
    /* color:#FFFFFF; */
}

#attn-burger-label {
    grid-area: burger;
    user-select: none; /* Prevents being highlighted when clicked multiple times */
    display: block;

    height: var(--header-height);
    position: -webkit-sticky;
    position: sticky;
	top: 0;
	z-index: 9999;
}

#attn-aside-wrapper {
	grid-area: aside-wrapper;
    display: block;

    color: #333;
	background: #fff;
	font-size: var(--aside-font-size);
	position: fixed;
    top: calc(var(--header-height) + var(--search-height)); /* Offset: header-height plus search-menu height */
	right: calc(0px - var(--aside-wrapper-width));
	transition: right 0.3s;
    height: calc(100% - var(--header-height) - var(--search-height));
	width: var(--aside-wrapper-width);
	z-index: 9999;
	overflow: scroll;
}

#attn-burger:checked ~ #attn-wrapper > #attn-aside-wrapper {
	right: 0;
	transition: right 0.3s;
	white-space: normal;
	overflow: scroll;
	-webkit-overflow-scrolling: touch;
}

#attn-aside-wrapper > aside {
    color: #333;
	background: #fff;
}

#attn-aside-wrapper h4 {
    padding-left: var(--site-padding-left);
    padding-right: var(--site-padding-right);
    margin-top: 30px;
    margin-bottom: 5px;
}

#attn-aside-wrapper ul {
	list-style-type: none;
	margin: 0;
	padding: 0;
}

#attn-aside-wrapper ul li {
	padding-top: 10px;
	padding-bottom: 10px;
	padding-left: var(--site-padding-left);
	padding-right: var(--site-padding-right);
}

#attn-aside-wrapper > aside ul li a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f3f3f3;
    padding: 5px 5px;
    display: block;
}

.attn-title {
    display: block;
    padding-left: var(--content-padding-left);
    padding-right: var(--content-padding-right);
}

.attn-title h1 {
    font-size: 2.6rem;
    font-family: var(--tile-font-family);
    font-weight: 700;
    margin-bottom: 0;
}

.attn-archive-description {
    display: block;
}

.attn-content {
    display: block;
    color: var(--body-font-color);
    padding-left: var(--content-padding-left);
    padding-right: var(--content-padding-right);
    line-height: var(--content-line-height);
}

.attn-featured-image {
    display: block;
    margin: 0;
    margin-top: 30px;
    padding-left: var(--content-padding-left);
    padding-right: var(--content-padding-right);
}

.attn-featured-image img {
	width: 100%;
	height: auto;
    border-radius: 10px;
}

.attn-category {
    display: block;
    margin-top: 20px;
    padding-left: var(--content-padding-left);
    padding-right: var(--content-padding-right);
}

.attn-category a {
    text-decoration: none;
    color: #000;
    background-color: #e4ebf1;
    border-radius: 3px;
    margin-bottom: 10px;
    margin-right: 10px;
    padding: 5px 10px;
    font-weight: 700;
}

.attn-tag {
    display: block;
}

.attn-date {
    display: none;
    font-size: 0.875rem;
}

.attn-author {
    display: none;
}

.attn-comments-n {
    display: none;
}

.attn-comments {
    display: none;
}

.attn-comments textarea {
    max-width: 100%;
}

.attn-wrapper > .attn-loop {
	display: block;
}

.attn-wrapper > .attn-breadcrumbs {
}

.attn-pagination {
	display: block;
}

.home .attn-widget-area-front-page {
	display: block;
}

#attn-aside1 {
	grid-area: aside1;
}

#attn-cosmetic {
    grid-row: 1 / 1;
    grid-column: 1 / -1;
    display: block;
    border-bottom: 1px solid #d8d8d8;
    box-shadow: 0 1px 8px #536d7a4a;
    z-index: 9998;
    position: sticky;
    top: 0;
}

#attn-cosmetic,
#attn-burger-label,
#attn-header {
    /* border-bottom: 1px solid #d8d8d8; */
    /* box-shadow: 0 1px 8px #536d7a4a; */
    background: var(--color-1-background);
}

#attn-header {
    grid-area: header;
    display: flex;
    justify-self: center;

    height: var(--header-height);
    position: -webkit-sticky;
    position: sticky;
	top: 0;
	z-index: 9999;
    /* margin-left: calc(0rem - var(--header-height)); */
    margin-right: calc(0rem - var(--header-height));
	width: calc(100% + var(--header-height)); /* Adjusting for logo margin-right to keep content centered */
    /* width: 100%; */
	flex-wrap: wrap;
	flex-direction: column;
	justify-content: space-evenly;
	align-content: center;
	overflow: hidden;
	white-space: nowrap;
}

#attn-header a {
    text-decoration: none;
}

#attn-header .attn-site-logo {
	margin-right: 15px;
	height: 70%;
}

#attn-header img {
	width: auto;
	height: 100%;
}

#attn-header-title {
    color: var(--title-font-color);
	font-size: var(--header-title-font-size);
    margin: 0;
    padding: 0;
}

#attn-header-tagline {
	font-size: var(--header-tagline-font-size);
    margin: 0;
    padding: 0;
    display: none;
}

/* Search */
#attn-search {
	grid-area: search;
	display: flex;
	justify-content: center;
	align-items: center;
    background: var(--color-1-background);

    position: fixed;
    top: var(--header-height);
	right: calc(0px - var(--aside-wrapper-width));
	transition: right 0.3s;
    height: var(--search-height);
	width: var(--aside-wrapper-width);
	z-index: 9999;
}

#attn-burger:checked ~ #attn-wrapper > #attn-search {
	/* top: var(--header-height); */
	right: 0;
	transition: right 0.3s;
	white-space: normal;
	/* overflow: scroll; */
	-webkit-overflow-scrolling: touch;
}

#attn-search-input {
	width: calc(100% - var(--search-height));
	height: 60%;
	max-width: var(--search-input-width);
	padding: 10px;
	border: none;
	border-radius: 0;
	-webkit-appearance: none;
    background: #ebeaea;
    margin-left: var(--site-padding-left);
}

#attn-search-submit-label {
	height: 60%;
	width: var(--search-height);
	line-height: calc(var(--search-height) / 100 * 60);
	cursor: pointer;
	background: #364963;
	overflow: hidden;
    margin-right: var(--site-padding-right);
}

#attn-search-submit-label::before {
	content: '\26B2';
	font-size: calc(var(--search-height) / 100 * 40);
	color: #FFFFFF;
	display: grid;
	justify-content: center;
	align-items: center;
	transform: rotate(-45deg);
	cursor: pointer;
}

#attn-search-submit {
	display: none;
}





#attn-footer {
	grid-area: footer;
    display: block;
    padding-left: var(--content-padding-left);
    padding-right: var(--content-padding-right);
}

#attn-widget-area-footer {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	flex-direction: column;
}

.attn-widget-area-footer-item {
	flex: 1;
	max-width: max-content;
}
  
/*
 * Pseudo element to span across all inner content elements. Used for styling of background and border.
 */
 #attn-wrapper::before {
	grid-column: innerstart;
	grid-row: innerstart / innerend;
}

/* Unsure what this is for, but its for responsive menu */
#attn-wrapper::after {
	/* text-align: center;
	height: var(--header-height);
	background: var(--color-1-background); */
}

#attn-wrapper::after {
	content: '';
	display: block;
	position: fixed;
	background: rgba(0, 0, 0, 0.6);
	top:0;
	right: -9999px;
	width: 100%;
	height: 100%;
	transition: right 0.3s;
	z-index: 1;
	opacity: 0;
}










/*
 * Hide the actual checkbox, but still render it so it can be accessed via keyboard for accessibility purposes.
 * Set position fixed so page doesn't jump to top when toggle is clicked.
 * Stylying done via label #attn-burger-label.
 */
 #attn-burger {
	display: block;
	clip: rect(1px,1px,1px,1px);
	width: 1px;
	height: 1px;
	margin: -1px;
	border: 0;
	padding: 0;
	overflow: hidden;
	position: fixed;
}

#attn-wrapper::after,
#attn-burger-label::before {
	content: '';
	transition: 0.3s;
}

#attn-burger:checked ~ #attn-wrapper::after {
	content: '';
	display: block;
	position: fixed;
	background: rgba(0, 0, 0, 0.6);
	top:0;
	left: 0;
	width: 100%;
	height: 100%;
	transition: opacity 0.3s;
	z-index: 1;
	opacity: 1;
}

#attn-burger:checked ~ #attn-wrapper #attn-burger-label::before {
	content: '';
	display: block;
	position: fixed;
	top: calc(var(--header-height) + var(--header-height));
	right: var(--aside-wrapper-width);
	width: 100%;
	height: 100%;
	transition: right 0.3s;
}

/*
 * Needs fixing. No real accessibility here. Element permanently hidden. Element only exists to avoid Chrome lighthouse accessibility warning as label element requires text content.
 */
#attn-burger-label-accessibility {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/*
 * Animated Hamburger item inspired by https://codepen.io/Bilal1909/pen/KKdrmRP
 */
#attn-burger-label-icon {
	width: var(--header-height);
	padding: 0 17px;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	/* background: var(--color-1-font); */
}

#attn-burger-label-icon::before,
#attn-burger-label-icon::after,
#attn-burger-label-icon > div {
	content: '';
	display: block;
	height: 2px;
	margin: 5px 0;
	border-radius: 3px;
	background: var(--color-1-font);
	transition: 0.5s;
}

#attn-burger:checked ~ #attn-wrapper #attn-burger-label-icon::before {
	transform: translateY(5px) rotate(135deg);
}

#attn-burger:checked ~ #attn-wrapper #attn-burger-label-icon::after {
	transform: translateY(-9px) rotate(-135deg);
}

#attn-burger:checked ~ #attn-wrapper #attn-burger-label-icon > div {
	transform: scale(0);
}

/*
 * "height: 100%" and "overflow: auto" required for scroll lock of main content when responsive menu is open.
 */
#attn-wrapper {
	height: 100%;
	overflow: auto;
}

/*
 * scroll lock of main content when responsive menu is open.
 */
#attn-burger:checked ~ #attn-wrapper {
	overflow: hidden;
}






.attn-author-image {
	margin-right: 0.938rem;
	width: 50px;
	height: 50px;
	display: none;
}

.attn-author-name {
	font-size: 0.75rem;
    margin: 0;
    padding: 0;
}


.attn-pagination {

}




.attn-front-page-logo-widget {
    background-color: #e3ebf1;
    border-radius: 10px;
    margin-top: 40px;
    padding: 15px;
    font-weight: bold;
    margin-left: var(--content-padding-left);
    margin-right: var(--content-padding-right);
    line-height: 1.4;
}


.attn-front-page-logo-widget h2 {
    font-size: 2.6rem;
    font-family: var(--tile-font-family);
    font-weight: 700;
    line-height: 1.2;
}


@media (min-width: 1024px) {
	#attn-widget-area-footer {
		display: flex;
		flex-direction: row;
		justify-content: space-evenly;
		align-items: flex-start;
		gap: 20px;
	}

}














.attn-loop > .has-post-thumbnail {
	--image-loop: "image-loop" auto;
}

.attn-loop > .has-category {
	--category-loop: "category-loop" auto;
}

.attn-loop > .has-tag {
	--tag-loop: "tag-loop" auto;
}



.attn-loop > article {
	display: grid;
	grid-template:
    "title-loop" auto
	var(--image-loop)
	var(--category-loop)
	"author-loop" auto
	"date-loop" auto
	/ 1fr;
    gap: 0; /* gap can cause white space gap when a element is not available */

}

.attn-loop > article > .attn-title-loop {
	display: block;
}

.attn-loop > article > .attn-content-loop {
	display: block;
}

.attn-loop > article > .attn-featured-image-loop {
	display: block;
}

.attn-loop > article > .attn-category-loop {
	display: block;
}

.attn-loop > article > .attn-tag-loop {
}

.attn-loop > article > .attn-date-loop {
	display: block;
}

.attn-loop > article > .attn-author-loop {
	display: block;
}

.attn-loop > article > .attn-comments-n-loop {
}


