/* --- Główny kontener i nagłówek --- */
.timeline-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.timeline-header {
    text-align: center;
    margin-bottom: 40px;
}

.timeline-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.timeline-header p {
    font-size: 1.1rem;
    color: #666;
}

/* --- Siatka Galerii (Responsywna) --- */
.timeline-grid-container {
    display: grid;
    grid-template-columns: 1fr; /* 1 kolumna na mobilnych */
    gap: 30px;
}

/* 2 kolumny na desktopie */
@media (min-width: 768px) {
    .timeline-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Karta Posta --- */
.post-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Obraz Posta (Letterbox) --- */
.post-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Kwadratowy "letterbox" */
    overflow: hidden;
    cursor: pointer;
    background-color: #f0f0f0; /* Domyślne tło, zostanie nadpisane przez 'style' */
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 'contain' aby pokazać cały obraz w "letterboxie" */
    transition: transform 0.3s ease;
}

.post-image-wrapper:hover .post-image {
    transform: scale(1.05);
}

/* --- Treść Posta --- */
.post-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Rozciąga treść, aby stopka była zawsze na dole */
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.post-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Wypycha stopkę na dół */
}

/* --- Stopka Posta (Tagi i Udostępnianie) --- */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto; /* Kluczowe dla trzymania się dołu */
}

.post-tags {
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.post-share-buttons {
    display: flex;
    gap: 10px;
}

.post-share-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.post-share-buttons button:hover {
    background-color: #f0f0f0;
}

.post-share-buttons svg {
    width: 22px;
    height: 22px;
    fill: #777;
}

/* --- Strona Pojedynczego Posta (.post-detail.html) --- */
.post-detail-wrapper {
    max-width: 700px; /* Węższy kontener na desktopie */
    margin: 40px auto; /* Centrowanie i marginesy */
    padding: 0 20px;
}

.post-detail-wrapper .post-card {
    box-shadow: none; /* Opcjonalnie: usuń cień na stronie szczegółów */
}

.post-detail-wrapper .post-title {
    font-size: 2rem; /* Większy tytuł na stronie szczegółów */
}

.back-to-gallery-wrapper {
    text-align: center;
    margin-top: 30px;
}

.back-to-gallery-button {
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.back-to-gallery-button:hover {
    background-color: #f0f0f0;
}


/* --- Globalny Lightbox --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(5px); /* Rozmycie tła dla Safari */
    backdrop-filter: blur(5px);
    padding: 10px;
    box-sizing: border-box;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh; /* Ograniczenie wysokości na mobilnych */
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.lightbox-close-button {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    z-index: 1001;
    line-height: 30px;
    text-align: center;
}

/* --- Tooltip "Skopiowano link!" --- */
.copied-tooltip {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    pointer-events: none; /* Aby nie blokował kliknięć */
}

.copied-tooltip.show {
    opacity: 1;
    bottom: 50px;
}