body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* Prevent horizontal scroll */
    /* background-color: #EAE7DC; */
    background-color: #f7f7f7;

}
header {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    position: relative;
}
header .back-button {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}
header .back-button img {
    height: 50px;
    width: auto;
}
header a h1 {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: grey;
}
header a:hover h1 {
    color: #fff;
    text-decoration-color:white;
}
.container {
    display: flex;
    flex-wrap: wrap;
}
.panel {
    flex: 1;
    min-width: 300px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s ease-in-out;
    position: relative /* prý pro nastavení toho textu */
}

.panel img {
    width: 100%;
    height: 600px;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
    position: relative; /* allows z-index to work on hover */
}

.panel img:hover {
    transform: scale(1.1);
    z-index: 2;
    filter: brightness(0.7);
}

.photos {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
  }
  

.photos .column {
width: 50%;
box-sizing: border-box;
} 


.photos img {
    width: calc(100% - 36px);
    height: auto; /* maintain aspect ratio */
    display: block;
    transition: transform 0.5s ease-in-out;
    position: relative; /* allows z-index to work on hover */
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 8px;
    margin: 10px;
}
.photos img:hover {
    transform: scale(1.05);
    z-index: 2;
}  



.contacts {
    text-align: center;
    padding: 20px;
}
.contacts a {
    color: #333;
    text-decoration: underline;
}
.text-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: rgb(187, 187, 187);
font-size: 2.8rem;
pointer-events: none; /* prevents interfering with hover */
transition: transform 0.5s ease, color 0.5s ease, font-size 0.5s ease;
z-index: 3;
font-weight: bold;
}
.panel:hover .text-overlay {
    transform: translate(-50%, -50%) scale(1.2);
    color: #ffffff; /* pick any color you like */
    font-size: 3.1rem; /* increase the font size */
    z-index: 3; /* bring the text to the front */
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0; /* Start invisible */
    animation: fadeIn 0.3s forwards; /* Fade-in animation */
}

.overlay img {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8); /* Start smaller */
    animation: scaleUp 0.3s forwards; /* Scale-up animation */
}

.overlay .close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

.overlay .close-btn:hover {
    transform: scale(1.2);
}

/* Fade-in animation */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Scale-up animation */
@keyframes scaleUp {
    to {
        transform: scale(1);
    }
}

@media (max-width: 600px) {
    .photos .column {
        width: 100%;
    }
  }