/* 1. NORMALIZATION */
/* 2. STANDARD ELEMENTS */
/* 3. GENERAL SITE SETTINGS */
/* 4. SITE ELEMENTS */
/* 5. GENERAL CLASSES */
/* 6. SINGLE/GROUP OF PAGES */


/* 1. NORMALIZATION */
/* use border-box for all elements, see: https://css-tricks.com/box-sizing/#article-header-id-3 */
html {
	box-sizing: border-box;
}
*, *::before, *::after {
	box-sizing: inherit;
}

/* remove the system font-families */
button,
input,
optgroup,
select,
textarea {
	font-family: inherit;
}

img {
	height: auto; /* Make sure images are scaled correctly. */
	max-width: 100%; /* Adhere to container width. */
}


/* 2. STANDARD ELEMENTS */
a {
	color: var(--link-color);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:visited {
	color: var(--link-color-visited);
}

/* format input elements */
input[type="text"],
input[type="search"],
input[type="submit"] {
	font-size: 1.1rem;
}


/* 3. GENERAL SITE SETTINGS */
html {
	color: var(--html-color);
	font-family: Verdana, Arial, Helvetica, sans-serif;
	/* optimize font smoothing and ligatures for better readability */
	text-rendering: optimizeLegibility;
}
/* beautifully center the site */
body {
	background-color: var(--body-bg-color);
	max-width: 1020px;
	margin: 0 auto;
	text-align: center;
}
main {
	margin-bottom: 20px;
}


/* 4. SITE ELEMENTS */
/* site navigation */
#site-navigation {
	font-size: 0;
	margin-bottom: 50px;
	padding: 2px;
}
#site-navigation a {
	display: inline-block;
	height: 65px;
	margin: 2px;
	text-decoration: none;
	width: 100px;
}
#site-navigation img {
	border-radius: 3px 3px 0 0;
	display: block;
	height: 50px;
	width: 100px;
}
#site-navigation span {
	background-color: var(--blue);
	color: var(--white);
	display: block;
	font-size: 12px;
	font-weight: bold;
	line-height: 15px;
	text-shadow: -1px 0 var(--black), 0 1px var(--black), 1px 0 var(--black), 0 -1px var(--black);
}
#site-navigation a:hover span {
	background-color: var(--green);
	transition: background-color 500ms linear 0s;
}
#site-navigation .current-menu-item span {
	background-color: var(--red);
}

/* pagination */
#pagination-wrapper {
	font-size: 1.1rem;
	margin: 20px 0;
}
#pagination-wrapper a {
	color: var(--green);
	display: inline-block;
	font-size: 60px;
	margin-top: -6px;
	text-decoration: none;
	text-shadow: -1px 0 var(--black), 0 1px var(--black), 1px 0 var(--black), 0 -1px var(--black);
	vertical-align: middle;
}
#pagination-wrapper input {
	text-align: center;
	width: 3em;
}

/* grid of quote tiles: as many 320px columns as fit (row by row in reading order), one narrower column on small screens */
#quote-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, min(100%, 320px));
	justify-content: center;
	gap: 30px;
}

/* single quote tile: all tiles of a row have the same height, the author stays at the bottom */
#quote-grid article {
	display: flex;
	flex-direction: column;
	/* allow the single line attribution to shrink instead of widening the column */
	min-width: 0;
	border-radius: 8px;
	padding: 15px;
	box-shadow: 0 0 5px var(--box-shadow-color), inset 0 0 50px var(--box-shadow-inset-color);
}
#quote-grid .quote-link {
	text-decoration: none;
	text-align: justify;
}
#quote-grid .author {
	margin-top: auto;
}

/* table of contents in columns (top to bottom like a dictionary) */
#toc {
	columns: 3 320px;
	column-gap: 30px;
	margin: 0 auto;
}
/* including scrollbar width 3x320 + 2x30px + 21px - 1px */
@media (max-width: 1040px) {
	#toc {
		width: 670px;
	}
}
@media (max-width: 690px) {
	#toc {
		width: 320px;
	}
}
/* don't break inside a column */
#toc section {
	display: inline-block;
	width: 320px;
}

/* photo attribution */
.attribution,
.attribution a {
	color: var(--grey);
	font-size: .8rem;
}

.quote {
	color: var(--html-color);
	/* hyphenate long words (language from <html lang="de-DE">), otherwise justified text gets large gaps */
	hyphens: auto;
	/* only hyphenate words with at least 12 letters, keep at least 5 letters before and after the hyphen */
	hyphenate-limit-chars: 12 5 5;
	/* break words that cannot be hyphenated rather than overflowing the box */
	overflow-wrap: break-word;
}
.author {
	display: block;
	font-weight: bold;
	text-align: right;
}

/* table of contents */
#toc {
	text-align: left;
}
#toc h3 {
	border-bottom: 1px solid var(--html-color);
}
#toc ul {
	list-style-type: none;
}


/* 5. GENERAL CLASSES */
.invisible {
	visibility: hidden;
}

/* show text in a single line and cut it with an ellipsis */
.single-line {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}


/* 6. SINGLE/GROUP OF PAGES */
/* single quote */
#single-quote {
	margin-top: 75px;
}
#single-quote section {
	position: relative;
}
#single-quote .picture {
	border-radius: 10px 10px 0 0;
	vertical-align: bottom;
}
#single-quote .quote {
	background-color: var(--quote-bg-color);
	color: var(--white);
	font-size: 1.3rem;
	font-weight: bold;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	margin: 0;
	padding: .5em 1em;
	text-shadow: -1px 0 var(--black), 0 1px var(--black), 1px 0 var(--black), 0 -1px var(--black);
}
#single-quote .categories {
	float: left;
	text-align: left;
	width: 50%;
}

/* rating */
.rating-info {
	font-size: .8rem;
	margin-bottom: 1em;
}
#thank-you {
	color: var(--white);
	display: inline-block;
	margin: .3em 0 1em;
	padding: .25em .5em;
	visibility: hidden;
}
#thank-you.show {
	background-color: var(--success-bg-color);
	transition: background-color 1000ms linear 0s;
	visibility: visible;
}
#star-rating {
	display: inline-block;
	line-height: 1;
}
#star-rating input {
	position: absolute;
	left: -9999px;
}
#star-rating label {
	color: var(--rating-color);
	cursor: pointer;
	font-size: 40px;
	float: right;
	opacity: .1;
}
#star-rating label:hover,
#star-rating label:hover ~ label,
#star-rating input:checked ~ label {
	opacity: 1;
}

/* facebook share button */
.fb-share {
	background-color: var(--facebook-color);
	background-image: linear-gradient(var(--facebook-color-light), var(--facebook-color));
	border-radius: 2px;
	color: var(--white);
	cursor: pointer;
	display: inline-block;
	font-family: helvetica, arial, sans-serif;
	font-weight: bold;
	height: 25px;
	line-height: 25px;
	padding-right: 6px;
	text-shadow: 0 -1px 0 #354c8c;
}
.fb-share::before {
	content: '';
	background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB2aWV3Qm94PSIwIDAgMjE2IDIxNiI+PHBhdGggZD0iIE0yMDQuMSAwSDExLjlDNS4zIDAgMCA1LjMgMCAxMS45djE5Mi4yYzAgNi42IDUuMyAxMS45IDExLjkgMTEuOWgxMDMuNXYtODMuNkg4Ny4yVjk5LjhoMjguMXYtMjRjMC0yNy45IDE3LTQzLjEgNDEuOS00My4xIDExLjkgMCAyMi4yLjkgMjUuMiAxLjN2MjkuMmgtMTcuM2MtMTMuNSAwLTE2LjIgNi40LTE2LjIgMTUuOXYyMC44aDMyLjNsLTQuMiAzMi42aC0yOFYyMTZoNTVjNi42IDAgMTEuOS01LjMgMTEuOS0xMS45VjExLjlDMjE2IDUuMyAyMTAuNyAwIDIwNC4xIDB6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4=);
	display: inline-block;
	height: 16px;
	width: 16px;
	margin: -4px 5px;
}
.fb-share:hover {
	background-color: var(--facebook-hover-color);
	background-image: linear-gradient(var(--facebook-hover-color-light), var(--facebook-hover-color));
	color: var(--white);
	text-decoration: none;
}
.fb-share:visited {
	color: var(--white);
}

/* contact */
.\/dynamic\/contact h2 {
	margin: 4em 0 1em;
}
