/*
Theme Name: FPB Blank
Theme URI: https://example.com
Author: Tvoje meno
Description: Minimalistická prázdna téma pre full-screen galériu
Version: 1.1
*/

/* ───────────────────────────────────────────
   BASE
─────────────────────────────────────────── */
html, body {
    margin: 0 !important;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    background: #fff;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

main {
    padding-bottom: 80px;
}


/* ───────────────────────────────────────────
   LOGO / CIRCLE
─────────────────────────────────────────── */
#logo {
    position: fixed;
    top: 90%;
    left: 15%;
    z-index: 100;
    width: 120px;
    height: auto;
    transform: translate(-50%, -50%);
    color: #000;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 2rem;
}

#fpb-circle {
    position: fixed;
    top: 40%;
    left: 50%;
    z-index: 1000;
    width: 320px;
    height: 320px;
    background-color: rgba(141, 22, 165, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}


/* ───────────────────────────────────────────
   LOGO TEXT BAR
─────────────────────────────────────────── */
.fpb-logo-text {
    display: flex;
    background-color: #fff;
    color: #000;
    justify-content: space-between;
    cursor: pointer;
}

.fpb-logo-text div {
    margin: 10px;
    padding: 10px;
    font-size: 24px;
}


/* ───────────────────────────────────────────
   GALLERY SCROLL WRAPPER
─────────────────────────────────────────── */
#fpb-scroll-wrap {
    overflow: hidden;
    width: 100%;
}

#fpb-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    width: 100%;
    max-width: 100%;
    justify-content: center;
    will-change: transform;
}

#fpb-gallery::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,0), #fff);
}


/* ───────────────────────────────────────────
   GALLERY ITEM
─────────────────────────────────────────── */
.fpb-item {
    position: relative;
    width: 100%;
    padding-top: 20vw;
    overflow: hidden;
}

.fpb-item img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.fpb-item:hover img {
    transform: scale(1.05);
}

.fpb-term {
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 5px;
}

.anim {
    cursor: pointer;
}


/* ───────────────────────────────────────────
   LIGHTBOX
─────────────────────────────────────────── */
#fpb-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    max-width: 100% !important;
}

#fpb-lightbox.active {
    display: flex;
}

#fpb-lightbox img {
    max-width: 90%;
    max-height: 70%;
    object-fit: contain;
    border: 100px solid #fff;
}


/* ───────────────────────────────────────────
   LIGHTBOX CONTROLS (NEXT / PREV)
─────────────────────────────────────────── */
#fpb-next, #fpb-prev {
    position: fixed;
    top: calc(50% - 24px);
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

#fpb-next { left: calc(50% + 650px); }
#fpb-prev { left: calc(50% - 650px); }

#fpb-next:hover { transform: translateX(-50%) scale(1.1); }
#fpb-prev:hover { transform: translateX(-50%) scale(1.1); }
#fpb-next:active, #fpb-prev:active { transform: translateX(-50%) scale(0.92); }

#fpb-next::before, #fpb-prev::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #000;
    border-right: 3px solid #000;
}
#fpb-next::before { transform: rotate(45deg); }
#fpb-prev::before { transform: rotate(-135deg); }


/* ───────────────────────────────────────────
   BACK BUTTON
─────────────────────────────────────────── */
#fpb-back {
    position: fixed;
    top: calc(100% - 105px);
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

#fpb-back:hover  { transform: translateX(-50%) scale(1.1); }
#fpb-back:active { transform: translateX(-50%) scale(0.92); }

#fpb-back::before {
    content: '';
    width: 12px;
    height: 12px;
    border-left: 3px solid #000;
    border-bottom: 3px solid #000;
    transform: rotate(45deg);
    margin-left: 4px;
}


/* ───────────────────────────────────────────
   CLOSE BUTTON
─────────────────────────────────────────── */
#fpb-close {
    position: fixed;
    top: calc(100% - 105px);
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

#fpb-close:hover  { transform: translateX(-50%) scale(1.1); }
#fpb-close:active { transform: translateX(-50%) scale(0.92); }

#fpb-close::before {
    content: '\00d7';
    color: #000;
    font-size: 30px;
    text-align: center;
}


/* ───────────────────────────────────────────
   FOOTER
─────────────────────────────────────────── */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 50px 0 20px 0;
    font-size: 12px;
    color: #888;
    background: #fff;
    /*border-top: 1px solid #eee;*/
    z-index: 1000;
}

#copy {
    background-color: #fff;
    color: #000;
    font-size: 12px;
    text-align: center;
    padding-top: 80px;
    padding-bottom: 20px;
    margin: 0 auto;
}


/* ───────────────────────────────────────────
   ANIMATIONS
─────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes moveLeft {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}


/* ───────────────────────────────────────────
   MOBILE  (≤ 768px)
─────────────────────────────────────────── */
@media (max-width: 768px) {
    #fpb-gallery {
        grid-template-columns: 1fr;
        min-height: 75vh;
    }

    .fpb-item         { padding-top: 10%; }
    .fpb-item-cat     { padding-top: 20%; }
    .fpb-item-subcat  { padding-top: 40%; }

    .fpb-copy { vertical-align: bottom; }
}


/* ───────────────────────────────────────────
   DESKTOP  (≥ 1024px)
─────────────────────────────────────────── */
@media (min-width: 1024px) {
    #fpb-gallery {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: 80vh;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        align-items: center;
        cursor: grab;
    }

    #fpb-gallery::-webkit-scrollbar { display: none; }
    #fpb-gallery:active { cursor: grabbing; }

    .fpb-item        { flex: 0 0 auto; width: 60px;  height: 100%; scroll-snap-align: start; }
    .fpb-item-cat    { width: 120px; }
    .fpb-item-subcat { width: 240px; }
}
