* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

/* ===== HERO ===== */

.hero {
    height: 100vh;
    background-image: url("Fotky/hero.jpeg");
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    text-align: center;
}

.hero h1 {
    font-size: 60px;
    margin: 0;
}

.hero p {
    font-size: 24px;
}

/* ===== HUDEBNÍ TLAČÍTKO ===== */

.music-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.music-btn:hover .music {
    opacity: 0;
    transform: scale(0.6);
}

.music-btn:hover .heart {
    opacity: 1;
    transform: scale(1);
}

.icon {
    position: absolute;
    font-size: 26px;
    transition: 0.3s ease;
}

.music {
    opacity: 1;
    transform: scale(1);
}

.heart {
    opacity: 0;
    transform: scale(0.6);
}

.floating-heart {
    position: fixed;
    color: white;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
}

@keyframes floatV {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) scale(1.4);
        opacity: 0;
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-200px) scale(1.5);
        opacity: 0;
    }
}

/* ===== STORY / TIMELINE ===== */

.story {
    font-size: 18px;
    padding: 60px 20px;
    background: linear-gradient(180deg,
            #6B4445 0%,
            #9A7374 25%,
            #C9A8A8 60%,
            #ffffff 100%);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    /* jedna hodnota řídí VŠECHNY mezery mezi kartami i daty */

    position: relative;
    z-index: 0;
    /* vytváří vlastní stacking context pro tu čáru níž */
}

.story::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg,
            #ffffff 0%,
            #C9A8A8 25%,
            #9A7374 60%,
            #6B4445 100%);
    transform: translateX(-50%);
    z-index: -1;
    /* schová se za fotky/text, vidět je jen v mezerách mezi kartami */
    pointer-events: none;
}

.story h2 {
    font-size: 38px;
    backdrop-filter: blur(10px) saturate(100%);
}

.story-date {
    text-align: center;
    color: #333131;
    letter-spacing: 3px;
    margin: 0;
    /* stejná hodnota jako margin-bottom u .memory-wrap */
}

.memory {
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 0;
    padding: 0;

    cursor: pointer;
    flex-wrap: nowrap;

    transition: gap 0.6s ease;

    position: relative;
}

.memory-wrap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.memory-wrap::before {
    content: "";
    position: absolute;
    top: 0%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #6B4445;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

.memory.active {
    gap: 30px;
    justify-content: center;
}

.memory.left {
    flex-direction: row;
}

.memory.right {
    flex-direction: row-reverse;
}

/* ===== FOTKA ===== */

.memory-photo {
    transition: transform 0.6s ease;
}

.memory-photo img {
    width: 700px;
    max-width: 90vw;
    border-radius: 15px;
    display: block;
    transition: width 0.6s ease, transform 0.6s ease;
}

.memory.active .memory-photo img {
    width: 380px;
    /* pevná velikost po kliknutí, žádný scale() */
}

.memory.left.active .memory-photo {
    transform: translateX(clamp(-5px, -0.8vw, -3px));
}

.memory.right.active .memory-photo {
    transform: translateX(clamp(3px, 0.8vw, 5px));
}

/* ===== TEXT ===== */

.memory-text {
    width: 0;
    max-width: 420px;

    opacity: 0;
    overflow: hidden;
    transform: translateX(30px);

    transition: all 0.6s ease;
    pointer-events: none;
}

.memory.active .memory-text {
    width: 420px;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    padding: 20px;
}

.memory.left.active .memory-text {
    transform: translateX(20px);
}

.memory.right.active .memory-text {
    transform: translateX(-20px);
}

.memory-text h4 {
    font-size: 18px;
    margin: 0 0 6px;
}

.memory-text h3 {
    font-size: 36px;
    margin: 0 0 14px;
}

.memory-text p {
    font-size: 24px;
    line-height: 1.4;
    margin: 0;
}

/* ===== MOBIL – fotka nahoře, text pod ní ===== */

@media (max-width: 700px) {
    .memory {
        flex-direction: column !important;
        gap: 24px !important;
    }

    .memory-photo img {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .memory.active .memory-photo img {
        width: 100%;
        max-width: 100%;
        /* na mobilu se fotka při kliknutí nezmenšuje */
    }

    /*.memory.left.active .memory-photo,
    .memory.right.active .memory-photo {
        transform: none;*/
    /* slide do strany nemá smysl, když je vše pod sebou */


    .memory-text {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

.upload-btn {
    background-color: #6B4445;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 8px 4px;
    cursor: pointer;
}

.guestbook {
    padding: 80px 20px;
    text-align: center;
}

.guestbook input,
.guestbook textarea {
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
    display: block;
    padding: 10px;
}

.guestbook button {
    padding: 10px 20px;
    cursor: pointer;
}

#messages {
    max-width: 700px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 12px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.message strong {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
    color: #333;
}

.message p {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #555;
}

.message {
    border-left: 4px solid #6B4445;
}