* {
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
body {
    margin: 0;
    background: #222;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../images/bg.jpg") center/cover no-repeat;
    z-index: -2;
}
html {
	font-family: 'IBM Plex Mono', monospace;
	-ms-text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
}
label[for] {
	cursor: pointer;
}
input[type="checkbox"] {
	display: none;
}

.lightbox {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	min-height: 100%;
	z-index: 1;
	overflow: auto;
	-webkit-transform: scale(0);
	-ms-transform: scale(0);
	transform: scale(0);
	-webkit-transition: -webkit-transform .75s ease-out;
	transition: transform .75s ease-out;
}
.lightbox img {
	position: fixed;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	-ms-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	max-width: 96%;
	max-height: 96%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
input[type="checkbox"]:checked + .lightbox {
	-webkit-transform: scale(1);
	-ms-transform: scale(1);
	transform: scale(1);
}
input[type="checkbox"]:checked ~ .grid {
	opacity: .125;
}
.grid {
	width: 100%;
	
	top: 0;
	left: 0;
	position: relative;
height: auto;
	z-index: 0;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
	-webkit-flex-wrap: wrap;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	-webkit-align-items: flex-start;
	-ms-flex-align: start;
	align-items: flex-start;
	-webkit-align-content: flex-start;
	-ms-flex-line-pack: start;
	align-content: flex-start;
	padding: 0;
	
	text-align: center;
	-webkit-transition: opacity .75s;
	transition: opacity .75s;
}
.grid .grid-item {
	cursor: crosshair;
	width: 25%;
	display: inline-block;
	padding: 0;
	opacity: .75;
	-webkit-transition: opacity 0.5s;
	transition: opacity 0.5s;
}
.grid .grid-item:hover {
	opacity: 0.55;
}
@media screen and (max-width: 1024px) {
.grid .grid-item {
	width: 50%;
}
}
@media screen and (max-width: 480px) {
.grid .grid-item {
	width: 100%;
}
}
.grid img {
	max-width: 100%;
	max-height: 100%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
[hidden], template {
	display: none;
}
a {
	background: transparent;
}
a:active, a:hover {
	outline: 0;
}
sub, sup {
	font-size: 75%;
	line-height: 0;
	position: relative;
	vertical-align: baseline;
}
sup {
	top: -0.5em;
}
sub {
	bottom: -0.25em;
}
img {
	border: 0;
}
button, input, optgroup, select, textarea {
	color: inherit;
	font: inherit;
	margin: 0;
}
button {
	overflow: visible;
}
button, select {
	text-transform: none;
}
button, html input[type="button"], input[type="reset"], input[type="submit"] {
	-webkit-appearance: button;
	cursor: pointer;
}
button[disabled], html input[disabled] {
	cursor: default;
}
button::-moz-focus-inner, input::-moz-focus-inner {
	border: 0;
	padding: 0;
}
input {
	line-height: normal;
}

.flip-card {
	width: 100%;
	aspect-ratio: 4/3;
	perspective: 1000px;
	position: relative;
  }
  
  .flip-card-inner {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transition: transform 0.8s;
	transform-style: preserve-3d;
  }
  
  .flip-card:hover .flip-card-inner {
	transform: rotateY(180deg);
  }
  
  .flip-card-front,
  .flip-card-back {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	border-radius: 10px;
	overflow: hidden;
  }

  .flip-card-front img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
  }

  .flip-card-back {
	background: #111;
	color: #fff;
	transform: rotateY(180deg);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 20px;
	text-align: center;
	font-size: 16px;
	line-height: 1.35;
  }
  
  .flip-card-back p {
    position: relative;
}

.flip-card-back h3 {
    margin: 0 0 8px 0;   /* nebo 4px, podle chuti */
    font-weight: 600;
}

/* základ kurzoru – blok vedle textu */
.cursor {
    display: inline-block;
    width: 0.6em;          /* šířka „obdélníku“ */
    height: 1em;           /* výška podle řádku */
	margin-left: 4px;   /* místo 2px */
    background: #e6e6e6;   /* barva kurzoru (světle šedá / bílá) */
    vertical-align: -0.15em;
    opacity: 0;            /* defaultně schovaný */
}

/* kurzor se „aktivuje“ jen když je karta otočená (hover) */
.flip-card:hover .cursor {
    animation: cursor-blink 1s steps(2, start) infinite;
    opacity: 1;
}

/* samotná animace blikání */
@keyframes cursor-blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}