/* Reset i zmienne globalne */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* --- NAGŁÓWEK --- */
.site-header {
    text-align: center;
    padding: 20px 0 10px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.main-title {
    font-size: 2.4em;
    color: var(--accent-color);
    font-weight: normal;
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.05em;
    color: #7a7268;
    font-style: italic;
}

/* Responsywność dla ekranów telefonów */
@media (max-width: 600px) {
    .main-title {
        font-size: 1.8em;
    }
    .subtitle {
        font-size: 0.95em;
    }
}
:root {
    --bg-color: #f6f3ee;          /* Ciepłe, miękkie tło */
    --card-bg: #fffdfa;           /* Odcień kremowego papieru */
    --text-color: #4a443e;        /* Ciemnoszary, łagodny dla oczu tekst */
    --accent-color: #c0392b;      /* Ciepła czerwień akcentowa */
    --shadow-color: rgba(0, 0, 0, 0.06);
    --border-color: #eae3d9;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    padding: 50px 20px;
    display: flex;
    justify-content: center;
}

/* Główny kontener */
.container {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 60px; /* Odstęp między sekcjami */
}

/* Nagłówki sekcji */
.section-title {
    text-align: center;
    font-size: 1.5em;
    color: #6a625b;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    font-weight: normal;
}

/* --- KROK 1: GALERIA NASZYCH WSPOMNIEŃ --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.gallery-item {
    background-color: #ffffff;
    padding: 12px 12px 18px 12px;
    border-radius: 8px;
    box-shadow: 0 6px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.gallery-caption {
    text-align: center;
    font-size: 0.9em;
    color: #7a7268;
    margin-top: 12px;
    font-style: italic;
}

/* --- KROK 2: WIDEO YOUTUBE --- */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Zachowanie proporcji 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-section {
    margin-bottom: 60px; /* Zwiększ tę wartość (np. do 80px lub 100px), jeśli chcesz jeszcze większy odstęp */
}
.letter-section {
    margin-top: 40px; /* Dodatkowy odstęp od góry sekcji z listem */
}

/* --- KROK 3: LIST PRZEPROSINOWY --- */
.letter-card {
    background-color: var(--card-bg);
    padding: 50px 40px;
    border-radius: 12px;
    box-shadow: 0 12px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Ozdobny pasek kopertowy u góry listu */
.letter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        -45deg,
        #e74c3c,
        #e74c3c 15px,
        #ffffff 15px,
        #ffffff 25px,
        #3498db 25px,
        #3498db 40px,
        #ffffff 40px,
        #ffffff 50px
    );
}

.letter-title {
    text-align: center;
    font-size: 2em;
    color: var(--accent-color);
    margin-bottom: 30px;
    font-weight: normal;
    font-style: italic;
}

.letter-content p {
    font-size: 1.1em;
    margin-bottom: 18px;
    text-indent: 25px;
    color: #3b3530;
}

.letter-footer {
    margin-top: 40px;
    text-align: right;
}

.letter-signature {
    font-size: 1.1em;
    font-style: italic;
    font-weight: bold;
    color: #5a524a;
    line-height: 1.4;
}

/* Responsywność dla urządzeń mobilnych */
@media (max-width: 600px) {
    body {
        padding: 25px 12px;
    }

    .container {
        gap: 40px;
    }

    .letter-card {
        padding: 30px 20px;
    }

    .letter-title {
        font-size: 1.6em;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Styl dla zdjęć, które można kliknąć */
.gallery-item img.zoomable {
    cursor: pointer;
}

/* Okno modalne (tło zciemniające) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* Animacja pojawiania się */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Powiększone zdjęcie */
.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    object-fit: contain;
}

/* Przycisk zamykania (krzyżyk) */
.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #bbb;
}

/* --- KROK 4: SEKCJA Z PRZYCISKIEM --- */
.interactive-section {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

.heart-btn {
    background-color: #e84393;
    color: white;
    font-size: 1.2em;
    font-family: inherit;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(232, 67, 147, 0.3);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.heart-btn:hover {
    background-color: #d63031;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(214, 48, 49, 0.4);
}

.heart-btn:active {
    transform: scale(0.98);
}

/* Wiadomość po kliknięciu */
/* Tło nakładki (overlay) na cały ekran */
.love-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); /* Subtelne przyciemnienie tła */
    z-index: 1500;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

/* Wyskakujące okienko ze środka */
.love-popup {
    animation: popUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Tekst z efektem Bloom / Glow */
.bloom-text {
    font-size: 3.5em;
    font-weight: bold;
    font-style: italic;
    color: #fff;
    text-shadow: 
        0 0 10px #ff75a0,
        0 0 20px #ff75a0,
        0 0 30px #e84393,
        0 0 40px #e84393,
        0 0 60px #e84393;
    letter-spacing: 2px;
    text-align: center;
    display: block;
}

/* Animacja wyskakiwania z powiększeniem */
@keyframes popUp {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Wersja na telefony */
@media (max-width: 600px) {
    .bloom-text {
        font-size: 2.3em;
    }
}

/* Animowane serduszka-balony */
.heart-balloon {
    position: fixed;
    bottom: -50px;
    z-index: 2000;
    pointer-events: none; /* Żeby nie przeszkadzały w klikaniu na stronie */
    animation: floatUp linear forwards;
}

/* Animacja lotu ku górze */
@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-50vh) rotate(15deg);
    }
    100% {
        transform: translateY(-115vh) rotate(-15deg);
        opacity: 0;
    }
}

/* Duży kafelek wideo na 3 kolumny i 2 wiersze */
.gallery-item-large {
    grid-column: span 3; /* Zajmuje 3 kratki w poziomie */
    grid-row: span 2;    /* Zajmuje 2 kratki w pionie */
    display: flex;
    flex-direction: column;
}

.gallery-item-large video {
    width: 100%;
    height: 100%;
    min-height: 380px;  /* Dopasowanie wysokości do dwóch wierszy zdjęć */
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Responsywność dla urządzeń mobilnych (na telefonach rozciągamy na pełną szerokość ekranu) */
@media (max-width: 768px) {
    .gallery-item-large {
        grid-column: span 1; /* Na mniejszych ekranach wraca do 1 kolumny */
        grid-row: span 1;
    }
    
    .gallery-item-large video {
        min-height: 220px;
    }
}