/*
Theme Name: Community Conversations: Pandemic Perspectives
Author: Amber Leigh Turner of January Creative
Author URI: januarycreative.com
Description: Custom theme for Community Conversations: Pandemic Perspectives, project by NJ YMCA State Alliance
Version: 0.1 (February 2024)
*/

/**
 * DEV  - Dev Grid
 * CH01 - Resets
 * CH02 - Typography
 * CH03 - Repeatable Design Classes
 * CH04 - Page Structure
 * CH05 - Header & Navigation
 * CH06 - Content & Media
 * CH07 - Footer
 * CH08 - Special Page Styles
 * CH09 - Print Styles
 * CH10 - Responsive Media Queries
**/

/* ============================ DEV - DEV GRID ============================ */

#devwrapper {
	width: 100%;
	position: fixed;
}

#devgrid {
	display: grid;
	grid-template-columns: repeat(12, [col-start] 1fr);
	grid-column-gap: 2%;
	width: 90%;
	max-width: 1604px;									/* 1540 site width + 32 padding L & R */
	margin: 0 auto;
}

#devgrid div {
	background-color: rgba(0,0,0,0.04);
	height: 1000000000px;
	color: black;
}


/* ============================ CH01 - RESETS ============================ */
/* Basic CSS resets so that all browsers start on a mostly level playing field */

/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

body { line-height: 1; }

ol, 
ul { 
	list-style: none;
}

blockquote, 
q { 
	quotes: none;
}

blockquote:before, 
blockquote:after,
q:before, 
q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}


/* ===== CUSTOM RESET ===== */

/* apply a natural box layout model to all elements - allows for proper use of padding and margins relative to width and height */
* {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;  
	box-sizing: border-box;
}

/* ============================ CH02 - TYPOGRAPHY ============================ */

:root {
	--ymca-lightestgray: #F0F0F0;
	--ymca-lightgray: #999999;
	--ymca-darkgray: #7A7974;
	--ymca-lightpurple: #C6168D;
	--ymca-darkpurple: #5C2E91;
	--ymca-lightblue: #00AEFF;
	--ymca-darkblue: #0060AF;
}

@font-face {
    font-family: 'Cachet Medium';
    src: url('_fonts/cachet_std_medium-webfont.woff2') format('woff2'),
         url('_fonts/cachet_std_medium-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cachet Book';
    src: url('_fonts/cachet_std_book-webfont.woff2') format('woff2'),
         url('_fonts/cachet_std_book-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Cachet Bold';
    src: url('_fonts/cachet_std_bold-webfont.woff2') format('woff2'),
         url('_fonts/cachet_std_bold-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
	background-color: white;
	color: var(--ymca-darkgray);
	font-family: 'Cachet Book', Verdana, Arial, sans-serif; 
	font-size: 18px;
	line-height: 1.5;
	/* Support for all WebKit browsers. */
	-webkit-font-smoothing: antialiased;
	/* Support for Safari and Chrome. */
	text-rendering: optimizeLegibility;
	/* Support for Firefox. */
	-moz-osx-font-smoothing: grayscale;
	/* Support for IE. */
	font-feature-settings: 'liga';
	margin-top: -14px;							/* Unsure why I have to do this but it puts everything to the top without margin */
	background-image: url(_img/bubblebgtop.png);
	background-repeat: repeat-x;
	background-size: 50%;
	background-position: top center;
	background-color: rgba(255, 255, 255, 0.5);					/* These two lines are background opacity hack */
    background-blend-mode: lighten;
}

h1 {
	font-size: 3em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif;
	color: var(--ymca-lightpurple);
	margin-bottom: 0.75em;
}

h2 {
	font-size: 2.5em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif;
	color: var(--ymca-darkpurple);
	margin-bottom: 0.75em;
}

h3 {
	font-size: 2em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif; 
	color: var(--ymca-lightblue);
	margin-bottom: 0.75em;
}

h4 {
	font-size: 1.5em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif; 
	color: var(--ymca-darkblue);
	margin-bottom: 0.75em;
}

h5 {
	font-size: 1.25em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif;
	color: var(--ymca-darkgray);
	margin-bottom: 0.75em;
}

h6 {
	font-size: 1em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif;
	color: var(--ymca-darkgray);
	margin-bottom: 0.75em; 
}

p {
	/* Mostly in body tag */
	margin-bottom: 1em;
}

p:last-child {
	margin-bottom: 0;
}

p.small {
	font-size: 0.7em;
	margin-bottom: 0;
}

strong {
	font-weight: 800;
}

em {
	font-style: italic;
}

a {
	text-decoration: underline;
	font-weight: 700;
	cursor: pointer;
	color: var(--ymca-lightpurple);
	transition-duration: 0.4s;
}

a:hover,
a:focus {
}

blockquote {
}

blockquote p {
	text-align: center;
}

/* === Fluid Typography === */

/* Pulled this out of the media queries so that it's easier to find and change */
/* From https://css-tricks.com/snippets/css/fluid-typography/ */

@media screen and (max-width: 420px) {
		
	body {
		/* Font size will be 10px at viewports 420px wide or smaller */
		font-size: 12px;
	}
}

@media screen and (min-width: 420px) {
		
	body {
		/* Font size will flex between 420px wide viewport and 1280px wide in between 21px and 14px */
		font-size: calc(12px + (18 - 12) * ((100vw - 420px) / ( 1280 - 420 ) )); 
	}
}

@media screen and (min-width: 1280px) {
		
	body {
		/* Font size will be 21px at viewpoirts 1280px or wider */
		font-size: 18px;
	}
}

/* === Buttons === */

a.button,
button,
input[type="submit"] {
	display: inline-block;
	background-color: var(--ymca-lightblue);
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    padding: 8px 32px;
    border-radius: 16px;
    font-size: 1.5em;
    font-family: 'Cachet Bold', Verdana, Arial, sans-serif;
    margin-top: 16px;
    margin-bottom: 16px;
}

a.button:hover,
a.button:focus,
button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
	opacity: 0.8;
	cursor: pointer;
}

/* === Lists === */

ul, ol {
	list-style-type: circle;
	margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 2em;
    padding-right: 2em;
}

li {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

/* === Forms === */

/* Site Wide Form Styles */

input,
textarea {
}

label,
legend {
}



/* ============================ CH03 - REPEATABLE DESIGN CLASSES ============================ */

.contentgrid {
	position: relative;									/* For absolute positioned elements */
	display: grid;
	grid-template-columns: repeat(12, [col-start] 1fr);
	grid-column-gap: 2%;
	width: 90%;
	max-width: 1604px;									/* 1540 site width + 32 padding L & R */
	margin: 0 auto;
	z-index: 1;
	padding: 40px 0px;
	/*border: 1px solid red;*/
}

.contentgrid > * {
	/*border: 1px solid teal;*/
}

/* === Images === */

img,
figure img,
.wp-block-image figure img {
}

.alignleft,
.wp-block-image .alignleft {
	float: left;
    margin-right: 40px !important;
}

.alignright,
.wp-block-image .alignright {
	float: left;
    margin-left: 40px !important;
}

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


/* ============================ CH04 - PAGE STRUCTURE ============================ */


#maincontentwrapper {
	background-image: url(_img/bubblebgbottom.png);
	background-repeat: repeat-x;
	background-size: 50%;
	background-position: bottom center;
	padding-bottom: 120px;
	background-color: rgba(255, 255, 255, 0.5);					/* These two lines are background opacity hack */
    background-blend-mode: lighten;
}

.pagecontent {
	grid-column: span 8;
}

/* === Sidebar === */

.sidebar {
}


/* ============================ CH05 - HEADER & NAVIGATION ============================ */

header {
}

header a#headerlogo {
	grid-column: 1 / 3;
	display: flex;
	align-items: center;
}

header h3 {
	grid-column: 3 / 12;
	text-transform: uppercase;
	color: var(--ymca-lightblue);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-top: 20px;
}

header #secondheaderlogo {
	grid-column: 12 / 13;
	display: flex;
	align-items: center;
	margin-top: 24px;			/* because I don't know why display:flex isn't working */
}




/* Navigation */

header nav {
	grid-column: span 12;
	margin-top: 24px;
	border-top: 1px solid var(--ymca-lightgray);
	border-bottom: 1px solid var(--ymca-lightgray);
}

header nav ul {
	margin: 0;
	padding: 0;
}

header nav ul li {
	display: inline-block;
}

header nav ul li a {
	text-transform: uppercase;
	text-decoration: none;
    padding: 12px 24px;
    font-size: 1.2em;
    font-family: 'Cachet Bold', Verdana, Arial, sans-serif;
    color: var(--ymca-darkgray);
    transition-duration: 0.4s;
}

header nav ul li a:hover {
	background-color: var(--ymca-darkblue);
	color: #FFFFFF;
}

header nav ul li.current-menu-item a {
	background-color: var(--ymca-lightblue);
	color: #FFFFFF;
}


/* ============================ CH06 - CONTENT & MEDIA ============================ */

#page-title {
	grid-column: span 12;
}

#page-title h1 {
	text-transform: uppercase;
	text-align: center;
}

#page-title h4 {
	color: var(--ymca-darkpurple);
	width: 82%;
	margin: 0 auto;
}

#page-title > * {
	text-align: center;
}


/* ============================ CH07 - FOOTER ============================ */

footer {
	background-color: var(--ymca-lightestgray);
}

footer .footerlogo {
	grid-column: 1 / 3;
}

footer .footernav {
	grid-column: 4 / 6;
}

footer .footercollab {
	grid-column: 7 / 13;
}

footer p.copyright {
	grid-column: span 12;
    text-align: center;
    font-size: 0.75em;
}


/* ============================ CH08 - SPECIAL PAGE STYLES ============================ */

/* === Home === */

#home_intro_video {
	grid-column: 3 / 11;
	margin-bottom: 40px;
}

#home_intro_video div {
	position: relative; 
    padding-bottom: 56.25%;
    overflow: hidden;
    max-width: 100%;
    height: auto;
}

#home_intro_video div iframe {
	position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#home_intro {
	grid-column: 3 / 11;
	margin-bottom: 40px;
}

#home_intro h1 {
	text-align: center;
	font-size: 1.75em;
	color: var(--ymca-darkpurple);
}

#home_intro p {
	text-align: center;	
	color: var(--ymca-darkgray);
	font-family: 'Cachet Book', Verdana, Arial, sans-serif;
	font-size: 1.25em;
}

#home_featured_stories {
	grid-column: 3 / 11;
	margin-bottom: 40px;
	text-align: center;			/* Strictly just to center button */
}

#home_featured_stories h2 {
	color: var(--ymca-lightpurple);
	text-align: center;
	text-transform: uppercase;
}

#home_featured_stories h3 {
	text-align: center;
	color: var(--ymca-darkpurple);
	font-size: 1.5em;
}

/* === Community Themes === */

body.page-community-themes .pagecontent {
	grid-column: span 12;
}

body.page-community-themes .pagecontent > * {
	text-align: center;
}

body.page-community-themes .pagecontent > h2 {
	color: var(--ymca-lightpurple);
	text-transform: uppercase;
	width: 83%;
	margin: 0 auto;
	margin-bottom: 0.75em;
}

body.page-community-themes .pagecontent > h4 {
	color: var(--ymca-darkpurple);
	width: 83%;
	margin: 0 auto; 
	margin-bottom: 0.75em;
}

.themes {
	width: 100%;
	margin-bottom: 80px;
}

.themes a.theme {
	grid-column: span 4;
	padding: 16px;
    color: #FFFFFF;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 2em;
    border-radius: 16px;
    margin-bottom: 32px;
    display: flex;
	justify-content: center;
	align-items: center;
	background-size: cover;
	line-height: 1.25em;
	min-height: 200px;
	transition-duration: 0.4s;
	padding: 24px;
}

.themes a.theme:hover {
	opacity: 0.8;
}

.themes a.theme:last-child {
	grid-column: 5 / 9;
}

.storytagcloud {
	margin: 0 auto;
	width: 83%;
	margin-bottom: 80px;
	margin-top: 40px; 
}

.storytagcloud p {
	text-align: center;
	font-size: 1.25em;
}

.storytagcloud p a {
	color: var(--ymca-lightgray);
	margin: 8px 16px;
	white-space: nowrap;
	line-height: 2em;
	transition-duration: 0.4s;
}

.storytagcloud p a:nth-child(even) {
	opacity: 0.8;
	
}

.storytagcloud p a:hover {
	color: var(--ymca-darkpurple);
	
}

/* === Theme Page Title on Category.php and Single.php === */
	
body.category #page-title.themepagetitle,
body.single #page-title.themepagetitle {
	margin-top: -41px;
    background-size: cover;
}

body.mental_health #page-title.themepagetitle,
body.category-mental_health #page-title.themepagetitle {
	background-image: url(_img/mentalhealth-bg.png);
}

body.social_economic #page-title.themepagetitle,
body.category-social_economic #page-title.themepagetitle {
	background-image: url(_img/socialeconomic-bg.png);
}

body.clinical_health #page-title.themepagetitle,
body.category-clinical_health #page-title.themepagetitle {
	background-image: url(_img/clinical-bg.png);
}

body.socialization #page-title.themepagetitle,
body.category-socialization #page-title.themepagetitle {
	background-image: url(_img/socialization-bg.png);
}

body.perceptions_views #page-title.themepagetitle,
body.category-perceptions_views #page-title.themepagetitle {
	background-image: url(_img/perceptions-bg.png);
}

body.left_out #page-title.themepagetitle,
body.category-left_out #page-title.themepagetitle {
	background-image: url(_img/leftout-bg.png);
}

body.vaccine #page-title.themepagetitle,
body.category-vaccine #page-title.themepagetitle {
	background-image: url(_img/vaccine-bg.png);
}

body.category #page-title.themepagetitle .contentgrid > *,
body.single #page-title.themepagetitle .contentgrid > * {
	color: #FFFFFF;
	grid-column: 2 / 12;
}

body.category #page-title.themepagetitle .contentgrid h6,
body.single #page-title.themepagetitle .contentgrid h6  {
	margin-bottom: -8px;
}

body.category #page-title.themepagetitle .contentgrid h1,
body.single #page-title.themepagetitle .contentgrid h1 {
	margin-bottom: 0.25em;
}

body.category #page-title.themepagetitle .contentgrid p,
body.single #page-title.themepagetitle .contentgrid p {
	font-size: 1.5em;
	font-family: 'Cachet Bold', Verdana, Arial, sans-serif; 
	margin-bottom: 0.75em;
}

/* === Theme Main Pages === */

body.category .pagecontent {
	width: 100%;
	grid-column: span 12;
}

body.category .pagecontent .masonry {
	grid-column: span 12;
}

body.category .pagecontent .masonry:after {
	content: '';
	display: block;
	clear: both;
}

body.category .pagecontent .masonry article.masonrysizer,
body.category .pagecontent .masonry article.masonryitem {
	width: 31%;
    margin: 1%;
}

body.category .pagecontent .masonry article.masonryitem {
	float: left;
}

body.category .pagecontent .masonry article.masonryitem img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 16px;
	border: 1px solid var(--ymca-lightestgray);
}

/* === Stories Single Page === */

body.single-stories #maincontent .pagecontent {
	grid-column: span 12;	
}

body.single-stories #maincontent .pagecontent article {
	width: 100%;
}

body.single-stories #maincontent .pagecontent article > img {
	grid-column: span 6;
	border-radius: 16px;
	width: 100%;
	height: auto;
	border: 1px solid var(--ymca-lightestgray);
}

body.single-stories #maincontent .pagecontent article .storydetails {
	grid-column: span 6;
	margin-top: 80px;
}

body.single-stories #maincontent .pagecontent article .storydetails p {
	margin-bottom: 0.25em;
}

body.single-stories #maincontent .pagecontent article .videostory {
	width: 100%;
	grid-column: span 12;
	margin-top: 40px;
	margin-bottom: 40px;
}

body.single-stories #maincontent .pagecontent article .embed-container { 
	grid-column: 2 / 12;
    position: relative; 
    padding-bottom: 56.25%;
    overflow: hidden;
    max-width: 100%;
    height: auto;
} 

body.single-stories #maincontent .pagecontent article .embed-container iframe,
body.single-stories #maincontent .pagecontent article .embed-container object,
body.single-stories #maincontent .pagecontent article .embed-container embed { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

body.single-stories #maincontent .pagecontent article .storydescription {
	grid-column: span 12;
	width: 100%;
	margin-top: 40px;
}

body.single-stories #maincontent .pagecontent article .storydescription .storylocation {
	grid-column: 2/4;
	text-align: center;
}

body.single-stories #maincontent .pagecontent article .storydescription .storylocation img {
	width: 100%;
    height: auto;	
}

body.single-stories #maincontent .pagecontent article .storydescription .storydescript {
	grid-column: 5/12;
	display: flex;
    height: 100%;
    align-items: center;
}

body.single-stories #maincontent .pagecontent article .storydescription .storydescript .description {
	font-size: 1.1em;
}

body.single-stories #maincontent .pagecontent article .storydescription .storydescript .tags {
	margin-top: 40px;
}

body.single-stories #maincontent .pagecontent article .link {
	grid-column: span 12;
	text-align: center;
}

/* === Animations === */

body.page-animations .pagecontent{
	grid-column: span 12;
}

#animations {
	display: grid;
	grid-template-columns: repeat(12, [col-start] 1fr);
	grid-column-gap: 2%;

}

#animations .animation {
	grid-column: span 6;
	margin-bottom: 40px;
}

#animations .animation .animationcontainer {
	position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
}

#animations .animation .animationcontainer iframe {
	position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================ CH09 - PRINT STYLES ============================ */



/* ============================ CH10 - RESPONSIVE MEDIA QUERIES ============================ */



@media screen and ( max-width: 1280px ) {
	
	/* 12 Columns -> 8 Columns */
	
	#devgrid {
		grid-template-columns: repeat(8, [col-start] 1fr);
		grid-column-gap: 3%;
	}

	/* Content Grid */

	.contentgrid {
		grid-template-columns: repeat(8, [col-start] 1fr);
		grid-column-gap: 3%;
		padding: 32px 0px;
	}
	
}

@media screen and ( max-width: 960px ) {
	
	/* 8 Columns -> 4 Columns */
	
	#devgrid {
		grid-template-columns: repeat(4, [col-start] 1fr);
		grid-column-gap: 4%;
	}

	/* Content Grid */

	.contentgrid {
		grid-template-columns: repeat(4, [col-start] 1fr);
		grid-column-gap: 4%;
		padding: 24px 0px;
	}	
	
}

@media screen and ( max-width: 420px ) {
	
	/* 4 Columns -> 2 Columns */
	
	#devgrid {
		grid-template-columns: repeat(2, [col-start] 1fr);
		grid-column-gap: 5%;
	}

	/* Content Grid */

	.contentgrid {
		grid-template-columns: repeat(2, [col-start] 1fr);
		grid-column-gap: 5%;
		padding: 16px 0px;
	}
	
}