/*
 * galerie.css – fotky pod jednotlivými dny expedic
 *  - při najetí myší se fotka jemně přiblíží a objeví se lupa
 *  - popisek je na tmavém poloprůhledném pruhu dole (na mobilu vidět pořád)
 *  - velké zobrazení po kliknutí (Magnific Popup) s popiskem a počítadlem
 *
 * Patří do složky css, načítá se ZA style.css.
 */

/* ---- Rámeček fotky ------------------------------------------------------- */
#gallery2 .description {
	position: relative;
	overflow: hidden;          /* přiblížená fotka nepřeteče přes okraj */
	cursor: zoom-in;
}

#gallery2 .description img.hover {
	display: block;
	width: 100%;
	height: auto;
	opacity: 1;
	transition: transform .6s ease, filter .6s ease;
	will-change: transform;
}

#gallery2 .description:hover img.hover,
#gallery2 .description:focus-within img.hover {
	transform: scale(1.05);
	filter: brightness(1.05);
	opacity: 1;
}

/* ---- Popisek na tmavém pruhu --------------------------------------------- */
#gallery2 .description .info-text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: auto;
	margin: 0;
	padding: 48px 18px 14px;
	background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .45) 55%, rgba(0, 0, 0, 0) 100%);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
	pointer-events: none;
	transform: translateY(8px);
	opacity: 0;
	visibility: visible;
	transition: opacity .35s ease, transform .35s ease;
}

#gallery2 .description:hover .info-text,
#gallery2 .description:focus-within .info-text {
	opacity: 1;
	transform: translateY(0);
}

/* ---- Lupa v rohu --------------------------------------------------------- */
#gallery2 .description .galerie-lupa {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	opacity: 0;
	transform: scale(.85);
	transition: opacity .35s ease, transform .35s ease;
	pointer-events: none;
}
#gallery2 .description .galerie-lupa::before {   /* sklo */
	content: "";
	position: absolute;
	left: 10px;
	top: 10px;
	width: 15px;
	height: 15px;
	border: 2px solid #fff;
	border-radius: 50%;
}
#gallery2 .description .galerie-lupa::after {    /* rukojeť */
	content: "";
	position: absolute;
	left: 24px;
	top: 25px;
	width: 8px;
	height: 2px;
	background: #fff;
	transform: rotate(45deg);
	transform-origin: left center;
}
#gallery2 .description:hover .galerie-lupa,
#gallery2 .description:focus-within .galerie-lupa {
	opacity: 1;
	transform: scale(1);
}

/* Odkaz kolem fotky – v něm je fotka, popisek i lupa, takže se drží přesně
   okrajů fotky (ne okrajů rámečku, který má v šabloně odsazení) */
#gallery2 .description a.galerie-odkaz {
	display: block;
	position: relative;
	overflow: hidden;
	line-height: 0;            /* žádná mezera pod fotkou */
	outline: none;
}
#gallery2 .description a.galerie-odkaz .info-text {
	line-height: 1.35;
}
#gallery2 .description a.galerie-odkaz:focus-visible {
	outline: 3px solid #f85a16;
	outline-offset: -3px;
}

/* Na dotykových zařízeních (mobil, tablet) není najetí myší – popisek je vidět pořád */
@media (hover: none) {
	#gallery2 .description .info-text {
		opacity: 1;
		transform: none;
		font-size: 14px;
		padding: 36px 14px 10px;
	}
}

/* ---- Velké zobrazení (Magnific Popup) ------------------------------------ */
/* pozadí úplně neprůhledné – jinak pod ním prosvítá stránka */
.mfp-galerie.mfp-bg {
	background: #111;
	opacity: 1;
}
.mfp-galerie .mfp-figure:after {
	box-shadow: none;
	background: transparent;
}
/* písmo popisku a počítadla se přebírá z popisků na stránce (viz galerie.js) */
.mfp-galerie .mfp-title {
	color: #fff;
	padding-right: 70px;
	line-height: 1.4;
}
.mfp-galerie .mfp-counter {
	color: #bbb;
	line-height: 1.4;
}
.mfp-galerie .mfp-arrow {
	opacity: .75;
}
.mfp-galerie .mfp-arrow:hover {
	opacity: 1;
}
/* jemné prolnutí při otevírání a listování */
.mfp-galerie.mfp-fade.mfp-bg,
.mfp-galerie.mfp-fade.mfp-wrap .mfp-content {
	opacity: 0;
	transition: opacity .25s ease;
}
.mfp-galerie.mfp-fade.mfp-bg.mfp-ready { opacity: 1; }
.mfp-galerie.mfp-fade.mfp-wrap.mfp-ready .mfp-content { opacity: 1; }
.mfp-galerie.mfp-fade.mfp-bg.mfp-removing,
.mfp-galerie.mfp-fade.mfp-wrap.mfp-removing .mfp-content { opacity: 0; }

/* ---- Videa s trasou (sekce "Absolvované trasy") -------------------------- */
.trasa-video-box {
	display: block;
	margin: 0 auto 30px;
	max-width: 260px;
}
a.trasa-video {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 6px;
	aspect-ratio: 16 / 9;
	background: #222;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
	cursor: pointer;
}
a.trasa-video img,
a.trasa-video video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease, filter .6s ease;
	filter: brightness(.85);
}
a.trasa-video:hover img,
a.trasa-video:hover video,
a.trasa-video:focus-visible img,
a.trasa-video:focus-visible video {
	transform: scale(1.06);
	filter: brightness(1);
}
a.trasa-video:focus-visible {
	outline: 3px solid #f85a16;
	outline-offset: 3px;
}
/* tlačítko přehrát – bílé kolečko s oranžovým trojúhelníkem */
.trasa-video-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 54px;
	height: 54px;
	margin: -27px 0 0 -27px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
	transition: transform .3s ease, background .3s ease;
	pointer-events: none;
}
.trasa-video-play::after {
	content: "";
	position: absolute;
	left: 21px;
	top: 16px;
	border-style: solid;
	border-width: 11px 0 11px 18px;
	border-color: transparent transparent transparent #f85a16;
}
a.trasa-video:hover .trasa-video-play {
	transform: scale(1.1);
	background: #fff;
}

/* velké přehrávání */
.mfp-trasa .mfp-iframe-holder .mfp-content {
	max-width: 1100px;
}
.trasa-video-okno {
	position: relative;
	width: auto;
	max-width: 1100px;
	margin: 0 auto;
}
.trasa-video-okno video {
	display: block;
	width: 100%;
	max-height: calc(100vh - 120px);
	background: #000;
}
.trasa-video-titulek {
	padding-top: 10px;
	color: #fff;
	font-family: "Raleway", Arial, sans-serif;
	font-weight: 600;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 1px;
}
.mfp-trasa .mfp-close {
	color: #fff;
	opacity: .8;
}
