/*
Theme Name:		Ceny Paměti národa
Theme URI:		https://www.cenypametinaroda.cz
Author:			Petr Šabach
Author URI:		https://sabach.studio
Version:		2026
*/

html {
	scroll-behavior: smooth;
}
html, body {
	height: 100%;
}

body {
	font-family: abril-text, serif;
	font-weight: 400;
	font-size: 1em;
	line-height: 1.5;
	color: #1D1D1B;
}

a {
	color: inherit;
	text-decoration: none;
}
img {
	display: block;
	max-width: 100%;
	height: auto !important;
}
ul, li, dl, dd, dt, figure, figcaption {
	margin: 0;
	padding: 0;
}
button {
	background: none;
	color: inherit;
	border: none;
	padding: 0;
	font: inherit;
	cursor: pointer;
	outline: inherit;
	display: inline-block;
}
em, strong {
	font: inherit;
	font-weight: inherit;
}

.wrap {
	margin: auto;
	max-width: 75rem;
	padding: 0 1rem;
}
.body .wrap {
	max-width: 53.25rem;
}

.hl {
	font-family: abril-text, serif;
	font-weight: 400;
	font-size: clamp(2rem, 6vw, 4rem);
	color: #263238;
	line-height: 1.125;
}
.hs {
	font-size: clamp(.9375rem, 2vw, 1.5rem);
}
.it {
	font-family: abril-text, serif;
    font-weight: 600;
    font-style: italic;
}
.menu, .btn, .sc, .body h5 {
	font-family: tablet-gothic, sans-serif;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
	font-size: clamp(.8125rem, 1.25vw, 1rem);
}
.cap {
    font-family: tablet-gothic, sans-serif;
    font-weight: 700;
    font-size: clamp(.625rem, 1.25vw, 1rem);
	color: #263238;
}
.btn {
    display: inline-block;
    background: #F02;
    color: #F5F7F8;
    padding: 20px 24px;
    line-height: 1;
}
.menu a {
	position: relative;
}
.menu a:hover {
	color: #263238;
}
.menu a:hover::after, 
.menu .active a::after {
	content: '';
	position: absolute;
	background: #FF0022;
	height: 1px;
	left: 0;
	right: 0;
	bottom: -3px;
}

#head {
	/*
	position: fixed;
	left: 0;
	right: 0;
	z-index: 1000;
	*/
	position: relative;
	z-index: 1000;
	background: #fff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
	align-items: center;
}
#head::after {
	content: '';
	background: #fff;;
	position: absolute;
	z-index: -1;
	inset: 0 0 0 0;
}
#head * {
	margin: 0;
	padding: 0;
}
#nav {
	background-color: #F5F7F8;
	position: fixed;
	z-index: -1;
	inset: 0 0 0 0;
	height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 5vw;
	transform: translateY(-100%);
	transition: transform .5s ease-in-out;
}
#nav .menu {
	font-family: abril-text, serif;
	font-weight: 400;
	font-size: clamp(2rem, 6vw, 4rem);
	color: #263238;
	text-transform: none;
	letter-spacing: normal;
	list-style: none;
}
#more {
	display: none;
}
#home {
	flex: 0 1 75%;
}
#open {
	width: 32px;
	height: 32px;
	background: none;
	padding: 0;
	position: relative;
}
#open span {
    text-indent: -100em;
    position: absolute;
    height: 2px;
    background: #1D1D1B;
    overflow: hidden;
    width: 100%;
    left: 0;
    top: 50%;
}
#open::before, #open::after {
	content: '';
	height: 2px;
	background: #1D1D1B;
	position: absolute;
	width: 100%;
	left: 0;
	top: calc(50% - 10px);
}
#open::after {
    top: calc(50% + 10px);
}

body.open {
	overflow: hidden;
}
body.open #nav {
	transform: translateY(0);
}

body.open #open span {
    display: none;
}
body.open #open::before {
    transform: rotate(-45deg);
    top: 50%;
}
body.open #open::after {
    transform: rotate(45deg);
    top: 50%;
}

#main .head {
	text-align: center;
	padding: 6vh 0 0;
}

.head .hl {
	margin: 0;
}
.head .hs {
	margin: 1rem 0 0;
}
.head .menu {
	margin: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: center;
	list-style: none;
}

.body {
	color: #263238;
    font-size: clamp(.9375rem, 2vw, 1.25rem);
}
.body h3 {
	font-family: abril-text, serif;
    font-weight: 600;
    font-style: italic;
	font-size: clamp(.9375rem, 2vw, 1.5rem);
}
.body h5 {
    background-image: url(img/bg_dot.svg);
    background-position: left top;
    background-repeat: repeat-x;
	padding: 1.5em 0 0 0;
	margin: 3em 0 0;
	text-align: center;
}
.body h5:first-child {
	margin: 0;
}
.body blockquote {
    background-image: url(img/bg_dot.svg);
    background-position: left bottom;
    background-repeat: repeat-x;
    font-family: abril-text, serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 3rem);
    line-height: 1.125;
    margin: 0 0 1em;
    padding: .75em 2em .75em 0;
}
.body blockquote p:first-child::before {
	content: open-quote;
	display: inline;
}
.body blockquote p:last-child::after {
	content: close-quote;
	display: inline;
}
.copy blockquote p {
	margin: 0;
}
.body blockquote p {
    margin: 0;
}
.body p {
    margin: 1.5em 0;
}
.body .more {
    padding: 4.5rem 0 0;
    text-align: center;
}

.body, .list,
.archive, .gallery {
	margin: 6vh 0 12vh;
}
.list .hl {
	line-height: 1;
	margin: 2em 0 .5em;
}
.list ul {
	background-image: url(img/bg_dot.svg), url(img/bg_dot.svg);
	background-position: left top, left bottom;
    background-repeat: repeat-x, repeat-x;
	padding: 1em 0;
	font-family: abril-text, serif;
	font-weight: 600;
	font-style: italic;
	font-size: clamp(1.25rem, 4vw, 1.875rem);
	list-style: none;
}
.list a:hover {
	color: #FF0022;
}

.gallery {
    display: grid;
    gap: 1rem;
}
.archive {
    display: grid;
    gap: 1.5rem;
}
.archive .item .hl {
    font-size: clamp(1.25rem, 3vw, 2.25rem);
    margin: 1rem 0;
}

.archive .item {
	position: relative;
}
.gallery .item,
.archive .item .img {
	position: relative;
	overflow: hidden;
	padding-bottom: 75%;
}
.gallery img,
.archive img {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .5s;
	will-change: transform;
	transform: scale(108%);
}
.archive .item a::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
}
.archive .item:hover a {
	color: #FF0022;
}

#main .half {
	display: grid;
}
#main .half .txt {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 5vw;
	font-size: clamp(1.25rem, 2.5vw, 1.875rem);
	color: #263238;
	background: #CDEAED;
	min-height: 100vw;
	box-sizing: border-box;
}
#main .half .txt p {
	margin: 0;
}
#main .half + .half .txt {
	background: #004499;
	color: #F5F7F8;
}
#main .half + .half + .half .txt {
	background: #FF0022;
	color: #F5F7F8;
}
#main .half + .half + .half + .half .txt {
	background: #F5F7F8;
	color: #263238;
}
#main .half .img {
	background: #1D1D1B;
	height: 100vw;
}
#main .half .img > * {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	object-position: center;
}

#main .full {
	text-align: center;
	padding: 6vh 0 2vh;
}
#main .full:first-child {
	padding: 6vh 0;	
}
.full .hl {
	margin: 0 0 .5em;
}
.full .it {
	font-size: clamp(.9375rem, 2vw, 1.875rem);
}
.full .more {
    padding: 2.5rem 0 0;
}

#intro {
	position: relative;
	overflow: hidden;
	padding-bottom: 100%;
	background-color: #F5F7F8;
}

#intro .back {
	position: absolute;
	inset: 0 0 0 0;
	width: 100%;
	height: 100%;
}
#intro .back img {
	position: absolute;
	inset: 0 0 0 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	opacity: 0;
	animation: crossfade 25s ease-in-out infinite;
}
#intro .back img:nth-of-type(2) {
	animation-delay: 5s;
}
#intro .back img:nth-of-type(3) {
	animation-delay: 10s;
}
#intro .back img:nth-of-type(4) {
	animation-delay: 15s;
}
#intro .back img:nth-of-type(5) {
	animation-delay: 20s;
}

@keyframes crossfade {
	0% {
	  opacity: 0;
	}
	10% {
	  opacity: 1;
	}
	25% {
	  opacity: 1;
	}
	35% {
	  opacity: 0;
	}
}

#intro .grid {
	position: absolute;
	inset: auto 0 0 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 33.334vw;
}
#intro .grid img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}
#intro #grid-logo {
	background: none;
	grid-area: 3 / 1 / auto / 3;
}
#intro #grid-date {
	background: #004499;
	grid-area: 3 / 3;
}

#grid-1 {
	background: rgba(255,255,255,.8);
	opacity: 0;
	grid-area: 1 / 1;
	animation: fadein 12s ease-in-out infinite;
}
#grid-2 {
	background: #FF0022;
	opacity: 0;
	grid-area: 1 / 6;
	animation: fadein 12s ease-in-out 2s infinite;
}
#grid-3 {
	background: rgba(255,255,255,.8);
	opacity: 0;
	grid-area: 2 / 3;
	animation: fadein 12s ease-in-out 4s infinite;
}
#grid-4 {
	background: rgba(255,255,255,.4);
	opacity: 0;
	grid-area: 1 / 3;
	animation: fadein 12s ease-in-out 6s infinite;
}
#grid-5 {
	opacity: 0;
	background: #FF0022;
	grid-area: 2 / 1;
	animation: fadein 12s ease-in-out 8s infinite;
}
#grid-6 {
	background: rgba(255,255,255,.6);
	opacity: 0;
	grid-area: 3 / 5;
	animation: fadein 12s ease-in-out 10s infinite;
}

@keyframes fadein {
	0% {
	  opacity: 0;
	}
	10% {
	  opacity: 1;
	}
	50% {
	  opacity: 1;
	}
	60% {
	  opacity: 0;
	}
}

.flickity-button:focus {
	outline: none !important;
	box-shadow: none !important;
}
.flickity-button {
	outline: none !important;
	color: #fff;
	border-radius: inherit;
	background: none !important;
}
.flickity-prev-next-button {
	width: 66px;
	height: 100%;
	max-height: 60vw;
	top: 0;
	transform: none;
}
.flickity-prev-next-button.previous {
    left: 0;
}
.flickity-prev-next-button.next {
    right: 0;
}
.flickity-button:disabled {
    opacity: 0;
}
.flickity-page-dots .dot {
	background: #263238;
	opacity: .15;
	width: 8px;
	height: 8px;
}

#reel {
	visibility: hidden;
}
#reel.flickity-enabled {
	visibility: visible;
}
#reel .cell {
	display: inline-block;
	margin-right: 10px;
}
#reel .cell img {
	max-height: 60vw;
}
#reel .cell img {
	width: auto;
	height: 100% !important;
}

#reel .cell figcaption {
	width: 0;
	min-width: 80%;
	padding: 1em 0;
	opacity: 0;
	transition: opacity .5s ease-in-out;
}
.home #reel .cell figcaption {
	text-align: center;
	width: auto;
}
#reel .cell.is-selected figcaption {
	opacity: 1;
	transform: none;
}

#main.home {
	margin-bottom: 12vh;
}

@media only screen and (min-width: 960px) {
	.flickity-prev-next-button {
		max-height: 568px;
	}
	#reel .cell .img {
		max-width: 852px;
		/*
		max-height: 568px;
		*/
	}
	#reel .cell img {
		max-height: 568px;
	}
}

#thanks {
	background: #CDEAED;
	padding: 10vh 0;
}
#thanks .wrap {
	text-align: center;
	list-style: none;
}
#thanks .logo {
	padding: 1vh;
	display: inline-block;
}
#thanks .logo img {
	max-height: 10vw !important;
}

#footer {
	background: #263238;
	padding: 3rem 0 10vh;
	font-family: tablet-gothic, sans-serif;
	color: #F5F7F8;
	text-align: center;
	font-size: clamp(.75rem, 4vw, .875rem);
}
#footer .wrap:first-child {
	display: grid;
	gap: 5vh;
}
#footer .wrap + .wrap {
	position: relative;
	margin-top: 12vh;
	display: grid;
	padding-top: 3rem; 
}
#footer .wrap + .wrap::before {
	content: '';
	position: absolute;
	inset: auto 0;
	background: #CDEAED;
	height: 1px;
}
#footer ul {
	margin-top: 2rem;
	display: flex;
	justify-content: center;
	gap: 1.5rem;
}
#footer li {
	list-style: none;
}
#footer img {
	display: inline-block;
	max-width: 40vw;
}
#footer li img {
	max-width: 6vw;
	display: block;
}
#footer h4 {
	font-size: clamp(.9375rem, 2vw, 1.125rem);
	margin: 0;
}
#footer p {
	margin: .5em 0;
	line-height: 2.5;
}
#footer a {
	text-decoration: underline;
}

@media (hover: hover) {
	.gallery a:hover img,
	.archive .item:hover img {
		transform: scale(100%);
	}
}

@media only screen and (min-width: 480px) {
	.wrap {
		padding: 0 1.5rem;
	}
	.gallery {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}
	.archive {
		grid-template-columns: repeat(auto-fit, minmax(300px, 2fr));
	}
}

@media only screen and (min-width: 768px) {
	#intro {
		padding-bottom: 50%;
	}
	#intro .grid {
		grid-template-columns: repeat(6, 6fr);
		grid-auto-rows: 16.667vw;
	}
	#grid-1 {
		grid-area: 1 / 2;
	}
	#grid-3 {
		grid-area: 2 / 1;
	}
	#grid-4 {
		grid-area: 2 / 6;
	}
	#grid-5 {
		grid-area: 2 / 2;
	}
}

@media only screen and (min-width: 960px) {
	#head {
		padding: 0;
	}
	#open {
		display: none;
	}
	#home {
		margin-left: 3vw;
		flex: 0 1 25%;
	}
	#more {
		display: block;
	}
	#nav {
		background: transparent;
		display: block;
		position: static;
		z-index: auto;
		height: auto;
		padding: 0;
		transform: none;
		margin-left: auto;
		transition: none;
	}
	#nav .menu {
		font-family: tablet-gothic, sans-serif;
    	font-weight: 700;
    	letter-spacing: .05em;
    	text-transform: uppercase;
		font-size: clamp(.875rem, 1.25vw, 1rem);
	}
	#nav .menu li {
		display: inline;
		margin-right: 3vw;
	}
	
	.head .menu {
		margin: 4rem;
	}
	
	.body, .list,
	.archive, .gallery {
		margin: 12vh 0;
	}
	
	#main .head {
		padding: 12vh 0 0;
	}

	#main .half {
		grid-template-columns: 1fr 1fr;
		min-height: 65vh;
	}
	#main .half .img {
		height: auto;
		order: 1;
	}
	#main .half:nth-of-type(odd) .img,
	#main.home .half .img {
		order: 0;
	}
	#main .half .txt {
		min-height: auto;
	}
	
	.list .item {
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
		gap: 2.25rem;
	}
	.list .item:first-child ul {
		background-image: url(img/bg_dot.svg), url(img/bg_dot.svg);
		background-position: left top, left bottom;
    	background-repeat: repeat-x, repeat-x;
	}
	.list ul {
		background-image: url(img/bg_dot.svg);
		background-position: left bottom;
    	background-repeat: repeat-x;
		grid-column: span 2;
	}
	.list .hl {
		margin: 0;
	}
	
	#footer .wrap:first-child {
		grid-template-columns: 2fr 1fr 1fr 1fr;
		text-align: left;
	}
	#footer .wrap + .wrap {
		justify-content: space-between;
		grid-template-columns: auto auto;
	}
	#footer .wrap + .wrap :first-child {
		align-self: center;
	}
	#footer .wrap + .wrap::before {
		inset: auto 1.5rem;
	}
	#footer ul {
		margin: 0;
	}
}