/* ========================================
   IMPORT ELEGANCKICH CZCIONEK
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Montserrat:wght@300;400;500&display=swap');

/* ========================================
   PODSTAWOWE STYLE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 1s ease;
}

body.envelope-opened {
    background: linear-gradient(135deg, #8a9573 0%, #6b7456 100%);
}

/* ========================================
   EKRAN Z KOPERTĄ
   ======================================== */

.envelope-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.8s ease;
}

.envelope-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.wedding-title {
    font-family: 'Cormorant', serif;
    font-size: 3.5rem;
    color: #c9a87c;
    margin-bottom: 1rem;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 4px;
}

.wedding-date {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #c9a87c;
    margin-bottom: 4rem;
    letter-spacing: 6px;
    font-weight: 300;
}

/* ========================================
   KOPERTA
   ======================================== */

.envelope-wrapper {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope-wrapper:hover {
    transform: scale(1.05);
}

.envelope-image {
    position: relative;
    width: 400px;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.envelope-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.6s ease;
}

.envelope-wrapper.clicked .envelope-image {
    transform: scale(1.1);
    opacity: 0;
}

.seal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #e6c896 0%, #c9a87c 50%, #b8956a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 25px rgba(201, 168, 124, 0.5),
        inset 0 -3px 10px rgba(0, 0, 0, 0.15),
        inset 0 3px 10px rgba(255, 255, 255, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.4);
    transition: all 0.6s ease;
}

.seal span {
    font-family: 'Cormorant', serif;
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 2px;
}

.envelope-wrapper.clicked .seal {
    transform: translate(-50%, -50%) scale(0) rotate(180deg);
    opacity: 0;
}

.tap-text {
    margin-top: 3rem;
    color: #c9a87c;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ========================================
   GŁÓWNA ZAWARTOŚĆ
   ======================================== */

.main-content {
    visibility: hidden;
    padding: 3rem 2rem 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.main-content.visible {
    visibility: visible;
}

/* ========================================
   PIĘTRO Z KARTAMI - JEDNOLITE ODSTĘPY
   ======================================== */

.card-tier {
    position: relative;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.card-tier:first-child {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.main-content.visible .card-tier {
    opacity: 1;
    transform: translateY(0);
}

.card-tier:nth-child(1) { transition-delay: 0s; }
.card-tier:nth-child(2) { transition-delay: 0.4s; }

/* ========================================
   KWIATKI DEKORACYJNE - OSOBNE DLA KAŻDEGO
   ======================================== */

.flower-decoration {
    position: absolute;
    width: 220px;
    height: auto;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* PIĘTRO 1 - KWIATKI */
.flower-tier1-left {
    left: 100px;
    top: 88%;
    transform: translateY(-50%) rotate(-15deg) scaleX(-1);
}

/* PIĘTRO 2 - KWIATKI */
.flower-tier2-left {
    left: -58px;
    top: 30%;
    transform: translateY(-50%) rotate(-15deg);
}

/* PIĘTRO 3 - KWIATKI */
.flower-tier3-left {
    left: -45px;
    top: 40%;
    transform: translateY(-50%) rotate(-30deg);
}

/* PIĘTRO 4 - KWIATKI */
.flower-tier4-left {
    left: -58px;
    top: 60%;
    transform: translateY(-50%) rotate(-20deg);
}

/* ========================================
   POZYCJONOWANIE KART W PIĘTRZE
   ======================================== */

.card-wrapper {
    position: relative;
    z-index: 1;
}

.center-single {
    margin: 0 auto;
}

.left-side {
    flex: 0 0 auto;
}

.right-side {
    flex: 0 0 auto;
}

/* ========================================
   OBRAZY KART - BAZOWE STYLE
   ======================================== */

.card-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    position: relative;
    z-index: 1;
}

.card-image.clickable {
    cursor: pointer;
}

.card-image.clickable:hover,
.card-wrapper:hover .card-image {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.35),
        0 12px 30px rgba(0, 0, 0, 0.25);
}

/* ========================================
   PERSONALIZACJA KAŻDEJ KARTY
   ======================================== */

.card-3 {
    box-shadow: none;
}

.card-5 {
    box-shadow: none;
}

.card-7 {
    box-shadow: none;
}

/* ========================================
   SEKCJA ROZWIJANA
   ======================================== */

.expandable-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 1s ease;
}

.expandable-section.expanded {
    max-height: 5000px;
    overflow: visible;
}

.expandable-tier {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    margin: 1.5rem 0;
}

.expandable-section.expanded .expandable-tier {
    opacity: 1;
    transform: translateY(0);
}

.expandable-section.expanded .expandable-tier:nth-child(1) { transition-delay: 0.2s; }
.expandable-section.expanded .expandable-tier:nth-child(2) { transition-delay: 0.5s; }

/* ========================================
   LICZNIK ODLICZANIA - prawy górny róg
   ======================================== */

.countdown-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 1.2rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease 1.5s, visibility 1s ease 1.5s;
}

body.envelope-opened .countdown-container {
    opacity: 1;
    visibility: visible;
}

.countdown-title {
    font-family: 'Cormorant', serif;
    font-size: 1rem;
    color: #8a9573;
    text-align: center;
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.countdown-display {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.countdown-item span:first-child {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: #6b7456;
    line-height: 1;
}

.countdown-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    color: #8a9573;
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   IKONA PREZENTU - lewy dolny róg
   ======================================== */

.gift-container {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #c9a87c 0%, #b8956a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(201, 168, 124, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

body.envelope-opened .gift-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease 2s, visibility 1s ease 2s;
    animation: pulse-gift 2s infinite 2s;
}

.gift-container:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(201, 168, 124, 0.6);
    animation: none;
}

.gift-container svg {
    width: 30px;
    height: 30px;
    color: white;
    flex-shrink: 0;
}

@keyframes pulse-gift {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   DYMEK PREZENTU
   ======================================== */

.gift-modal {
    display: none;
    position: fixed;
    bottom: 100px;
    left: 25px;
    z-index: 1001;
}

.gift-modal.show {
    display: block;
    animation: bubbleSlideIn 0.3s ease;
}

@keyframes bubbleSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gift-modal-content {
    background: white;
    padding: 0;
    border-radius: 20px;
    width: 280px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Strzałka dymka */
.gift-modal-content::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 30px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid white;
}

.gift-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.5rem;
    color: #8a9573;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.gift-modal-close:hover {
    color: #6b7456;
}

/* Obrazek z góry */
.gift-modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px 20px 0 0;
}

.gift-text-content {
    padding: 1.5rem;
}

.gift-modal-content h2 {
    font-family: 'Cormorant', serif;
    font-size: 1.4rem;
    color: #8a9573;
    margin-bottom: 0.8rem;
    text-align: center;
}

.gift-modal-content p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.8rem;
    text-align: center;
}

.gift-modal-content ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.gift-modal-content ul li {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #6b7456;
    padding: 0.6rem;
    margin: 0.4rem 0;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
}

.gift-note {
    font-style: italic;
    color: #8a9573;
    margin-top: 1rem;
    font-size: 0.8rem;
}

/* ========================================
   RESPONSYWNOŚĆ
   ======================================== */

@media (max-width: 968px) {
    .card-tier {
        gap: 1rem;
        margin: 1.2rem 0;
    }

    .expandable-tier {
        margin: 1.2rem 0;
    }

    .card-image {
        max-width: 280px;
    }

    .flower-decoration {
        width: 140px;
    }

    /* Dostosowanie kwiatków dla średnich ekranów */
    .flower-tier1-left {
        left: 50px;
    }

    .flower-tier2-left {
        left: -35px;
    }

    .flower-tier3-left {
        left: -25px;
    }

    .flower-tier4-left {
        left: -35px;
    }
}

@media (max-width: 768px) {
    /* Ekran koperty */
    .wedding-title {
        font-size: 2.2rem;
        letter-spacing: 3px;
    }

    .wedding-date {
        font-size: 0.85rem;
        letter-spacing: 4px;
        margin-bottom: 3rem;
    }

    .envelope-image {
        width: 260px;
    }

    .seal {
        width: 55px;
        height: 55px;
    }

    .seal span {
        font-size: 1.4rem;
    }

    .tap-text {
        font-size: 0.8rem;
        margin-top: 2.5rem;
    }

    /* Główna zawartość */
    .main-content {
        padding: 2rem 0.5rem;
        max-width: 100%;
        overflow: visible;
    }

    /* Karty - ZACHOWUJEMY układ bok-o-bok */
    .card-tier {
        gap: 0.8rem;
        margin: 1.2rem 0;
    }

    .card-tier:first-child {
        margin-bottom: 1.2rem;
    }

    .expandable-tier {
        margin: 1.2rem 0;
    }

    /* Karty mniejsze na mobile */
    .card-image {
        max-width: 160px;
        width: 100%;
    }

    /* Kwiatki - mniejsze i bliżej */
    .flower-decoration {
        width: 100px;
        opacity: 0.5;
    }

    .flower-tier1-left {
        left: 30px;
        top: 88%;
    }

    .flower-tier2-left {
        left: -25px;
        top: 30%;
    }

    .flower-tier3-left {
        left: -20px;
        top: 40%;
    }

    .flower-tier4-left {
        left: -25px;
        top: 60%;
    }

    /* Licznik - mobile - WĘŻSZY */
    .countdown-container {
        top: 8px;
        right: 8px;
        left: auto;
        width: auto;
        max-width: 200px;
        padding: 0.5rem 0.6rem;
    }

    .countdown-title {
        font-size: 0.6rem;
        margin-bottom: 0.4rem;
    }

    .countdown-display {
        gap: 0.4rem;
    }

    .countdown-item {
        min-width: 26px;
    }

    .countdown-item span:first-child {
        font-size: 1rem;
    }

    .countdown-label {
        font-size: 0.48rem;
    }

    /* Prezent - mobile */
    .gift-container {
        width: 45px;
        height: 45px;
        bottom: 18px;
        left: 18px;
    }

    .gift-container svg {
        width: 22px;
        height: 22px;
    }

    /* Dymek prezentu - mobile */
    .gift-modal {
        left: 8px;
        bottom: 75px;
    }

    .gift-modal-content {
        width: 240px;
    }

    .gift-modal-content::after {
        left: 20px;
    }

    .gift-text-content {
        padding: 1rem;
    }

    .gift-modal-content h2 {
        font-size: 1.1rem;
    }

    .gift-modal-content p {
        font-size: 0.75rem;
    }

    .gift-modal-content ul li {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .gift-note {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    /* Bardzo małe ekrany */
    .wedding-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .wedding-date {
        font-size: 0.75rem;
        letter-spacing: 3px;
    }

    .envelope-image {
        width: 220px;
    }

    .seal {
        width: 48px;
        height: 48px;
    }

    .seal span {
        font-size: 1.2rem;
    }

    .tap-text {
        font-size: 0.7rem;
    }

    .main-content {
        padding: 1.5rem 0.3rem;
    }

    .card-tier {
        gap: 0.6rem;
        margin: 1rem 0;
    }

    /* Karty jeszcze mniejsze */
    .card-image {
        max-width: 145px;
    }

    /* Kwiatki jeszcze mniejsze */
    .flower-decoration {
        width: 85px;
    }

    .flower-tier1-left {
        left: 25px;
    }

    .flower-tier2-left {
        left: -20px;
    }

    .flower-tier3-left {
        left: -15px;
    }

    .flower-tier4-left {
        left: -20px;
    }

    /* Licznik - bardzo mały ekran - JESZCZE WĘŻSZY */
    .countdown-container {
        padding: 0.4rem 0.5rem;
        max-width: 180px;
        top: 5px;
        right: 5px;
    }

    .countdown-title {
        font-size: 0.55rem;
    }

    .countdown-display {
        gap: 0.35rem;
    }

    .countdown-item {
        min-width: 24px;
    }

    .countdown-item span:first-child {
        font-size: 0.9rem;
    }

    .countdown-label {
        font-size: 0.45rem;
    }

    /* Prezent - bardzo mały ekran */
    .gift-container {
        width: 40px;
        height: 40px;
        bottom: 15px;
        left: 15px;
    }

    .gift-container svg {
        width: 20px;
        height: 20px;
    }

    .gift-modal {
        left: 5px;
        bottom: 65px;
    }

    .gift-modal-content {
        width: 220px;
    }

    .gift-text-content {
        padding: 0.8rem;
    }

    .gift-modal-content h2 {
        font-size: 1rem;
    }

    .gift-modal-content p {
        font-size: 0.7rem;
    }

    .gift-modal-content ul li {
        font-size: 0.75rem;
    }
}

/* ========================================
   ORIENTACJA POZIOMA (LANDSCAPE) NA MOBILE
   ======================================== */

@media (max-width: 968px) and (orientation: landscape) {
    .main-content {
        padding: 1rem 0.5rem 2rem 0.5rem;
    }

    .card-tier {
        margin: 0.8rem 0;
    }

    .card-image {
        max-width: 140px;
    }

    .flower-decoration {
        width: 80px;
    }

    .countdown-container {
        padding: 0.4rem 0.6rem;
        max-width: 180px;
    }

    .countdown-title {
        font-size: 0.55rem;
        margin-bottom: 0.3rem;
    }

    .countdown-display {
        gap: 0.35rem;
    }

    .countdown-item {
        min-width: 24px;
    }

    .countdown-item span:first-child {
        font-size: 0.9rem;
    }

    .countdown-label {
        font-size: 0.45rem;
    }
}

/* ========================================
   MODAL PODGLĄDU KARTY - PEŁNY EKRAN
   ======================================== */

.card-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(138, 149, 115, 0.85); /* Przezroczyste oliwkowe tło */
    backdrop-filter: blur(10px); /* Rozmycie tła */
    -webkit-backdrop-filter: blur(10px); /* Safari */
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card-preview-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

/* Zablokuj scroll gdy modal otwarty */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.card-preview-modal img {
    max-width: 95%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.2);
    animation: cardZoomIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardZoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.card-preview-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    color: #8a9573;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 2001;
    line-height: 1;
    padding: 0;
}

.card-preview-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.card-preview-close:active {
    transform: scale(0.95);
}

/* Tylko na desktop - bez modalu */
@media (min-width: 769px) {
    .card-preview-modal {
        display: none !important;
    }
}

/* Mobile - dostosowania */
@media (max-width: 768px) {
    .card-preview-modal {
        padding: 15px;
    }

    .card-preview-modal img {
        max-height: 80vh;
        max-width: 92%;
    }

    .card-preview-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .card-preview-modal img {
        max-width: 90%;
    }

    .card-preview-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
}

/* ========================================
   PRZYCISK MUZYKI
   ======================================== */

.music-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

body.envelope-opened .music-toggle {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease 2.5s, visibility 1s ease 2.5s;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.music-toggle svg {
    width: 24px;
    height: 24px;
    color: #8a9573;
}

.music-toggle .music-off {
    display: none;
}

.music-toggle.muted .music-on {
    display: none;
}

.music-toggle.muted .music-off {
    display: block;
}

/* Mobile */
@media (max-width: 768px) {
    .music-toggle {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    .music-toggle svg {
        width: 22px;
        height: 22px;
    }
}

/* ========================================
   PRZYCISK SERDUSZKA - NASZA HISTORIA
   ======================================== */

.heart-button {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.5;
    padding: 0;
}

.heart-button:hover {
    transform: scale(1.2);
    opacity: 1;
}

.heart-button svg {
    width: 18px;
    height: 18px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ========================================
   HINT Z BIAŁYM KWADRACIKIEM - GALERIA
   ======================================== */

.gallery-hint-badge {
    position: absolute;
    top: 0;
    left: -210px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    z-index: 20;
}

.hint-badge-box {
    background: white;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 150px;
}

.hint-badge-text {
    font-family: 'Cormorant', serif;
    font-size: 1.1rem;
    color: #2d3a1f;
    text-align: center;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

.hint-connecting-arrow {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    animation: arrowSlideRight 2s ease-in-out infinite;
    margin-top: -30px;
}

.hint-connecting-arrow line {
    stroke: white;
    stroke-linecap: round;
}

.hint-connecting-arrow polygon {
    fill: white;
}

@keyframes arrowSlideRight {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.7;
    }
    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}


/* Mobile */
@media (max-width: 768px) {
    .heart-button {
        width: 24px;
        height: 24px;
        top: 6px;
        left: 6px;
        opacity: 0.3;
    }

    .heart-button:hover {
        opacity: 0.8;
    }

    .heart-button svg {
        width: 12px;
        height: 12px;
    }

    .gallery-hint-badge {
        top: -10px;
        left: -160px;
        flex-direction: row;
        gap: 0.8rem;
    }

    .hint-badge-box {
        padding: 0.7rem 0.9rem;
        min-width: 130px;
    }

    .hint-badge-text {
        font-size: 0.9rem;
    }

    .hint-connecting-arrow {
        width: 50px;
        height: 50px;
    }
}

/* ========================================
   MODAL - NASZA HISTORIA
   ======================================== */

.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(138, 149, 115, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3000;
    overflow-y: auto;
    padding: 80px 20px 40px 20px;
}

.history-modal.show {
    display: block;
    animation: historyFadeIn 0.4s ease;
}

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

.history-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    color: #8a9573;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 3001;
    line-height: 1;
    padding: 0;
}

.history-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: rgba(255, 255, 255, 1);
}

.history-content {
    max-width: 900px;
    margin: 0 auto;
}

.history-title {
    font-family: 'Cormorant', serif;
    font-size: 3rem;
    font-style: italic;
    color: white;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ========================================
   TIMELINE - OSA CZASU
   ======================================== */

.timeline {
    position: relative;
    padding: 2rem 0;
}

/* Linia pionowa */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 60px 1fr;
    gap: 2rem;
    align-items: center;
}

/* Data po lewej */
.timeline-date {
    text-align: right;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    line-height: 1.4;
}

/* Łącznik - kropka */
.timeline-connector {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    border: 4px solid #c9a87c;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    }
}

/* Treść po prawej */
.timeline-content {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timeline-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-content img {
    width: 100%;
    max-width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    filter: blur(10px);
}

.timeline-content img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.timeline-text {
    font-family: 'Cormorant', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #2d3a1f;
    margin: 0;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.92);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-align: center;
    border: 2px solid rgba(201, 168, 124, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.timeline-text-italic {
    font-style: italic;
}

.timeline-text-highlight {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(201, 168, 124, 0.95), rgba(230, 200, 150, 0.95));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(201, 168, 124, 0.4);
}

.timeline-joke {
    font-size: 0.75rem;
    font-style: normal;
    opacity: 0.7;
    display: block;
    margin-top: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

/* Elementy po prawej stronie */
.timeline-item-right {
    grid-template-columns: 1fr 60px 1fr;
}

.timeline-item-right .timeline-date {
    text-align: left;
    grid-column: 3;
    grid-row: 1;
}

.timeline-item-right .timeline-connector {
    grid-column: 2;
    grid-row: 1;
}

.timeline-item-right .timeline-content {
    grid-column: 1;
    grid-row: 1;
    text-align: center;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timeline-item-right .timeline-content.visible {
    opacity: 1;
    transform: translateX(0);
}


/* ========================================
   SPECJALNE ELEMENTY TIMELINE
   ======================================== */

/* Podwójne zdjęcia - pełnoletność */
.timeline-double .timeline-content-double {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-photo-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.timeline-photo-duo img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    margin: 0;
    filter: blur(10px);
}

/* Dwa zdjęcia pionowo */
.timeline-photo-duo-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-photo-duo-vertical img {
    width: 100%;
    max-width: 280px;
    height: 280px;
    object-fit: cover;
    margin: 0 auto;
    filter: blur(10px);
}

/* Siatka 3 zdjęć - lata mijały */
.timeline-photo-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.timeline-photo-grid img {
    width: 100%;
    max-width: 280px;
    height: 280px;
    object-fit: cover;
    margin: 0 auto;
    filter: blur(10px);
}

/* Przerywana linia dla "lata mijały" */
.timeline-connector-dotted {
    background: transparent;
    border: 3px dashed rgba(255, 255, 255, 0.5);
}

/* Highlight dla zaręczyn i wesela */
.timeline-highlight .timeline-connector {
    width: 30px;
    height: 30px;
    background: #c9a87c;
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(201, 168, 124, 0.6);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(201, 168, 124, 0.6);
    }
    14% {
        transform: scale(1.15);
        box-shadow: 0 0 30px rgba(201, 168, 124, 0.8);
    }
    28% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(201, 168, 124, 0.6);
    }
    42% {
        transform: scale(1.15);
        box-shadow: 0 0 30px rgba(201, 168, 124, 0.8);
    }
    56% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(201, 168, 124, 0.6);
    }
}

/* Znak zapytania dla wesela */
.timeline-question {
    width: 100%;
    max-width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    border: 5px dashed #c9a87c;
}

.timeline-question-mark {
    font-family: 'Cormorant', serif;
    font-size: 10rem;
    color: #8a9573;
    font-weight: 300;
}

/* Zakończenie - nieskończoność */
.timeline-ending {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.timeline-infinity {
    font-size: 4rem;
    color: white;
    margin-bottom: 1rem;
}

.timeline-ending-text {
    font-family: 'Cormorant', serif;
    font-size: 1.8rem;
    font-style: italic;
    color: white;
    margin: 0;
    line-height: 1.6;
}

/* ========================================
   RESPONSYWNOŚĆ - HISTORIA
   ======================================== */

@media (max-width: 968px) {
    .history-title {
        font-size: 2.5rem;
    }

    .timeline-item {
        gap: 1.5rem;
    }

    .timeline-content img {
        max-width: 240px;
        height: 240px;
    }

    .timeline-photo-duo-vertical img {
        max-width: 240px;
        height: 240px;
    }

    .timeline-photo-grid img {
        max-width: 240px;
        height: 240px;
    }

    .timeline-question {
        max-width: 240px;
        height: 240px;
    }

    .timeline-question-mark {
        font-size: 7rem;
    }
}

@media (max-width: 768px) {
    .history-modal {
        padding: 70px 15px 30px 15px;
    }

    .history-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        color: white;
    }

    .history-close {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
        font-size: 1.8rem;
    }

    /* Timeline dwukierunkowa na mobile - tak jak na desktop */
    .timeline::before {
        left: 50%;
    }

    .timeline-item {
        grid-template-columns: 1fr 60px 1fr;
        gap: 0.8rem;
        margin-bottom: 3rem;
    }

    .timeline-item-right {
        grid-template-columns: 1fr 60px 1fr;
    }

    .timeline-date {
        text-align: right;
        font-size: 0.85rem;
        grid-column: 1;
        grid-row: 1;
    }

    .timeline-connector {
        grid-column: 2;
        grid-row: 1;
        margin: 0 auto;
    }

    .timeline-content {
        grid-column: 3;
        grid-row: 1;
        text-align: left;
    }

    .timeline-item-right .timeline-date {
        text-align: left;
        grid-column: 3;
        grid-row: 1;
    }

    .timeline-item-right .timeline-connector {
        grid-column: 2;
        grid-row: 1;
    }

    .timeline-item-right .timeline-content {
        grid-column: 1;
        grid-row: 1;
        text-align: right;
    }

    .timeline-content img {
        max-width: 100%;
        height: 200px;
    }

    .timeline-text {
        font-size: 1.1rem;
        padding: 0.7rem 1rem;
    }

    .timeline-joke {
        font-size: 0.68rem;
    }

    .timeline-photo-duo {
        grid-template-columns: 1fr;
    }

    .timeline-photo-duo img {
        height: 200px;
    }

    .timeline-photo-duo-vertical img {
        height: 200px;
        max-width: 100%;
    }

    .timeline-photo-grid img {
        height: 200px;
        max-width: 100%;
    }

    .timeline-question {
        height: 200px;
        max-width: 100%;
    }

    .timeline-question-mark {
        font-size: 5rem;
    }

    .timeline-infinity {
        font-size: 3rem;
    }

    .timeline-ending-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .history-title {
        font-size: 1.6rem;
    }

    .timeline-date {
        font-size: 0.85rem;
    }

    .timeline-text {
        font-size: 1rem;
        padding: 0.6rem 0.8rem;
    }

    .timeline-text-highlight {
        font-size: 1.2rem;
    }

    .timeline-joke {
        font-size: 0.65rem;
    }

    .timeline-connector {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .timeline-highlight .timeline-connector {
        width: 24px;
        height: 24px;
    }

    .timeline-question {
        height: 200px;
    }

    .timeline-question-mark {
        font-size: 5rem;
    }
}