/*----------------------------------------*/
:root {
    --main-bg-color: rgba(255, 0, 0, 0.6);
    --main-text-color: #204782;
    --main-accent-color: rgba(0, 0, 0, 0.6);
    --main-opacity: 0.8;
    --padding-base: 10px;
    --border-radius-base: 6px;
    --button-width: 30vw;
    --button-width-mobile: 45vw;
}
/*----------------------------------------*/
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}
body.index {
    overflow: hidden;
}
body.scrolling {
    /*background-image: url('/background.png');*/
    /*background-repeat: no-repeat;*/
    /*background-attachment: fixed;*/
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* === Layers === */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.webcam-layer {
    background-color: var(--main-bg-color);
    z-index: 0;
}
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
}
.video-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.78vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
    border: none;
}
.gradient-layer {
    z-index: 1;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 10%, rgba(255, 255, 255, 0) 50%);
}
.background-images-layer {
    z-index: 2;
    pointer-events: none;
}
.background-images-layer img {
    position: absolute;
}
.background-images-layer .left-pattern {
    bottom: 0;
    left: -2vw;
    height: 110vh;
    opacity: 0.8;
}
.background-images-layer .right-pattern {
    top: 20px;
    right: 20px;
    width: 130px;
    opacity: 0.8;
}
.bottom-pattern {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 100vw;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}
.vezha-pattern {
    position: absolute;
    bottom: 0;
    left: -2vw;
    height: 110vh;
    opacity: 0.8;
}

/* === Scroll === */
.scroll-wrapper {
    position: relative;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 2;
}

/* === Buttons & Title === */
.buttons-layer {
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 30px;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}
.buttons-layer button {
    position: relative;
    top: 10%;
    width: 50vw;
    max-width: 300px;
    border: 1px solid black;
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
    padding: 10px 20px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}
.buttons-layer button:hover {
    background-color: rgba(0, 0, 0, 0.2);
}
.next-video-button {
    position: fixed;
    bottom: 22px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--main-bg-color);
    font-size: 28px;
    cursor: pointer;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-title {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1));
    color: #204782;
    font-family: 'Arvo', serif;
    font-style: italic;
    font-weight: 700;
    text-align: center;
    z-index: 10;
    cursor: pointer;
    padding: 5px;
}
.video-title h1,
.video-title h2 {
    margin: 0;
    text-shadow: 2px 2px 2px rgba(255, 255, 255, 0.8);
}
.video-title h1 {
    font-size: 24px;
}
.video-title h2 {
    font-size: 16px;
    opacity: 0.8;
}

/* === Feedback Form === */
.feedback-form-layer {
    z-index: 3;
    position: relative;
    max-width: 600px;
    margin: auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
.feedback-form-layer h2 {
    text-align: center;
}
.feedback-form-layer label {
    display: block;
    margin: 15px 0 5px;
}
.feedback-form-layer input,
.feedback-form-layer textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.feedback-form-layer textarea {
    resize: vertical;
    min-height: 100px;
}
.feedback-form-layer .note {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}
.feedback-form-layer .submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    font-size: 18px;
    background-color: var(--main-bg-color);
    border: 1px solid black;
    color: black;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.feedback-form-layer .submit-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* === Back & Close Buttons === */
.back-button,
.close-button {
    position: fixed;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--main-bg-color);
    font-size: 28px;
    border-radius: 50%;
    border: 1px solid var(--main-bg-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}
.back-button {
    bottom: 22px;
    right: 10px;
}
.close-button {
    top: 10px;
    right: 10px;
}

/* === Tiles === */
.tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 50px;
    padding: 30px;
    max-width: 600px;
    margin: auto;
    z-index: 10;
}
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
.tile:hover {
    transform: scale(1.05);
}
.tile img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}
.tile-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* === Modal === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
}
.modal-content {
    position: relative;
    background-color: var(--main-bg-color);
    padding: 20px;
    border-radius: 10px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close,
.scroll-top-button {
    position: fixed;
    width: 50px;
    height: 50px;
    font-size: 28px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.modal-close {
    top: 10px;
    right: 10px;
    background-color: rgba(255, 0, 0, 0.5);
    color: var(--main-bg-color);
}
.scroll-top-button {
    background-color: rgba(0, 0, 100, 0.5);
    color: var(--main-bg-color);
}
.modal-content a:link {
    color: blue;
}
.modal-content a:visited {
    color: purple;
}
.modal-content a:hover {
    color: darkblue;
}
.modal-content a:active {
    color: red;
}

/* === Gallery & Media === */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.gallery img,
.gallery video {
    border: 2px solid #ccc;
    border-radius: 8px;
}
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 24px;
    max-width: 800px;
    margin: auto;
}
.album-card {
    /*background-color: transparent !important;*/
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    background-color: rgba(255, 255, 255, 0.5);
    overflow: hidden;
}
.slideshow-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    max-height: 300px;
    /*background-color: transparent !important;*/
}
.slideshow-track {
    display: flex;
    height: 100%;
    transition: transform 1s ease-in-out;
}
.slideshow-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}
.album-title {
    padding: 12px;
    text-align: center;
    font-size: 1.1rem;
}
a {
    color: inherit;
    text-decoration: none;
}
.thumb-image {
    max-width: 600px;
    width: 40%;
    height: auto;
    cursor: zoom-in;
    display: block;
    margin: 0 auto;
}
.media-block {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}
.media-block img,
.media-block video {
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}
.album-separator {
    font-size: 1.5rem;
    padding: 0.5rem;
    margin: 1rem 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
}

/* === Fullscreen overlay === */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: zoom-out;
}
.fullscreen-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 20px black;
}

/* === Click hint === */
.click-hint {
    position: absolute;
    bottom: 1%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    display: block !important;
    transition: opacity 0.3s ease;
}
.click-hint.animate {
    animation: clickPulse 1.2s ease-in-out 1 forwards;
}
@keyframes clickPulse {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) scale(1.1);
    }
    40% {
        transform: translateX(-50%) scale(0.9);
    }
    60% {
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0;
    }
}

/* === Mobile Adaptation === */
@media (max-width: 768px) {
    .video-bg iframe {
        left: var(--mobile-left, 50%);
    }
    .buttons-layer button {
        width: 45vw;
    }
    .gradient-layer {
        background: linear-gradient(to right, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 30%, rgba(255, 255, 255, 0.1) 100%);
    }
    .background-images-layer .left-pattern {
        bottom: -5%;
        left: -15%;
        opacity: 0.7;
    }
    .buttons-layer {
        top: 25%;
    }
    .video-title {
        position: relative;
        bottom: -15vh;
    }
    .feedback-form-layer {
        margin: 10px;
        padding: 15px;
        width: calc(100% - 20px);
        max-width: none;
        box-sizing: border-box;
    }
    .bottom-pattern {
        height: 15%;
    }
    .thumb-image {
        max-width: 100%;
        width: 90vw;
        cursor: default;
    }
    .fullscreen-overlay {
        display: none;
        flex-direction: column;
    }
    .fullscreen-overlay img {
        max-width: 100%;
        height: auto;
    }
}
