* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    z-index: auto;
}

a {
    color: blue;
    text-decoration: none;
}

a:hover {
    font-weight: bold;
}

/* ========== Container ========= */
#keret {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
}

/* ========== Header ========= */
#fejlec {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

#fejlec .fejlecBal,
#fejlec .fejlecJobb {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
    text-align: center;
}

#fejlec .fejlecBal img {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
}

#fejlec h1,
#fejlec pre,
#fejlec a {
    font-size: clamp(14px, 1.8vw, 26px);
    white-space: nowrap;
    overflow: hidden;
}

/* ========== Blocks ========= */
.blokk {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 255, 0.1);
    position: relative;
}

.blokk h1 {
    margin-bottom: 10px;
}

.blokk p {
    margin-bottom: 5px;
    padding: 0 15px;
}

.blokk table {
    width: 100%;
    margin: 10px auto;
    background: red;
}

.blokk table td {
    width: 20%;
}

/* ========== Product Grid ========= */
.blokk .center {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    width: 100%;
}

.blokk .termek {
    flex: 0 0 calc((100% - 30px) / 4);
    max-width: calc((100% - 30px) / 4);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(0, 0, 255, 0.2);
    background-color: rgba(0, 0, 255, 0.05);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.blokk .termek .kepkeret {
    width: 100%;
    padding-top: 100%;
    position: relative;
}
.blokk .termek .kepkeret > * {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.blokk .termek .kepkeret video,
.blokk .termek .kepkeret img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border: none;
}

.blokk .termek .kepkeret img:hover {
    cursor: zoom-in;
}

.blokk .termek figcaption {
    text-align: center;
    font-size: 18px;
    margin-top: 6px;
    padding: 4px 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* ========== Fullscreen Overlay ========= */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0 2vh;
    z-index: 1000;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fullscreen-overlay img {
	width: 100%;
    max-width: calc(100vw - 8vw);
    height: 70vh;
	padding: 5vh 0vw 1vh 0vw;
    object-fit: contain;
    image-rendering: auto;
    z-index: 1000;
}

/* Navigation arrows */
.fullscreen-overlay .arrow-left,
.fullscreen-overlay .arrow-right {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
	padding: 2vh 2vw;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    position: absolute;
    cursor: pointer;
    user-select: none;
    color: white;
    z-index: 1001;
    transition: background-color 0.2s ease;
}

.fullscreen-overlay .arrow-left:hover,
.fullscreen-overlay .arrow-right:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Left arrow: move content to the right (toward image) */
.fullscreen-overlay .arrow-left {
    left: 0;
}

/* Right arrow: move content to the left (toward image) */
.fullscreen-overlay .arrow-right {
    right: 0;
}

.fullscreen-overlay .image-caption {
    margin: 0 auto 10vh auto;
    color: white;
    font-size: 2.5rem;
    text-align: center;
    max-width: 90vw;
    padding: 2vh 2vw;
    line-height: 1.4;
}

/* ========== Media Queries ========= */
@media (max-width: 1024px) {
    .blokk .termek {
        flex: 0 0 calc((100% - 20px) / 3);
        max-width: calc((100% - 20px) / 3);
    }
}

@media (max-width: 768px) {
    #fejlec {
        flex-direction: column;
        flex-wrap: wrap;
    }

    #fejlec .fejlecBal,
    #fejlec .fejlecJobb {
        width: 100%;
        justify-content: flex-start;
    }

    #fejlec .fejlecBal img {
        max-width: 50%;
        height: auto;
        margin: 0 auto;
        display: block;
    }

    .blokk .termek {
        flex: 0 0 calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }
}
