/* Timeline Styles */
.timeline-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.timeline-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.timeline-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #333;
}

.timeline-intro {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Timeline Controls */
.timeline-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.timeline-search {
    position: relative;
    flex: 1;
    min-width: 250px;
    order: 1;
}

.timeline-filters {
    order: 2;
    flex: 0 1 auto;
    width: fit-content;
}

.timeline-sort {
    order: 4;
    flex: 0 1 auto;
    width: fit-content;
}

.timeline-cpt-filter {
    order: 3;
    flex: 0 1 auto;
    width: fit-content;
}

.timeline-results-info {
    order: 5;
    white-space: nowrap;
}



@media (max-width: 768px) {
    .timeline-controls {
        gap: 1rem;
    }

    .timeline-search {
        flex: 1 1 100%;
    }

    .timeline-filters select {
        width: auto;
    }
}

.timeline-search input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.timeline-search input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    display: none;
}

.search-clear:hover {
    color: #333;
}

.timeline-filters select,
.timeline-cpt-filter select {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    min-width: 150px;
}

.timeline-results-info {
    color: #666;
    font-size: 14px;
}

.sort-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-toggle-btn:hover {
    border-color: #0073aa;
    background: #f8f9fa;
}

.sort-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.sort-toggle-btn[data-order="desc"] .sort-icon {
    transform: rotate(180deg);
}

/* Admin Action Links */
.timeline-admin-actions {
    display: inline-flex;
    gap: 0.75rem;
    margin-left: 1rem;
    font-size: 0.85rem;
}

.timeline-admin-actions a {
    color: #0073aa;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.timeline-admin-actions a:hover {
    background-color: #f0f0f0;
    text-decoration: underline;
}

.timeline-admin-actions .remove-link {
    color: #d63638;
}

.timeline-admin-actions .remove-link:hover {
    background-color: #fef0f0;
}

/* Timeline Entries */
.timeline-entries {
    position: relative;
}

.timeline-entry {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-marker {
    position: relative;
    z-index: 2;
    width: 120px;
    flex-shrink: 0;
    text-align: center;
}

.timeline-date {
    display: inline-block;
    padding: 6px 16px;
    background: #666;
    color: white;
    font-weight: 400;
    font-size: 16px;
    background: transparent;
    color: #bbb;
    font-size: 20px;
    position: relative;
    border-radius: 0;
}

.timeline-content-card {
    flex: 1;
    background: white;
    /*border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;*/
    transition: box-shadow 0.3s ease;
    max-width: 800px;
    border-bottom: 1px solid #eee;
}

.timeline-content-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.timeline-image {
    max-width: 100%;
    width:auto;
    max-height: 60vh;
    height: auto;
    object-fit: cover;
    display: block;
}

.timeline-card-content {
    padding: 1.5rem;
}

.timeline-post-type {
    display: inline-block; /* HIDE */
    display: none;
    padding: 4px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-post-type.type-work {
    background: #e3f2fd;
    color: #1976d2;
}

.timeline-post-type.type-event {
    background: #f3e5f5;
    color: #7b1fa2;
}

.timeline-entry-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0;
    color: #333;
    line-height: 1.4;
}

.timeline-story {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-read-more {
    display: inline-block;
    color: #0073aa;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    /*border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;*/
}

.timeline-read-more:hover {
    /*border-color: #0073aa;*/
    text-decoration: none;
    color: #000;
}

/* Accordion Content */
.timeline-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    transition: max-height 0.6s ease-in-out, padding 0.6s ease-in-out; /* */
    border-top: 1px solid #e0e0e0;
}

.timeline-accordion.expanded {
    max-height: 2000px;
    transition: max-height 1.8s ease-in-out, padding 1.8s ease-in-out; /* */
}

.timeline-accordion-content {
    padding: 1.5rem;
    background: #fafafa;
    transition: padding 0.6s ease-in-out;
}

.timeline-accordion.expanded .timeline-accordion-content {
    padding: 1.5rem; /* Add full padding when expanded */
}

/* Optional: Add a subtle fade effect */
.timeline-accordion-content {
    opacity: 0;
    transition: opacity 0.4s ease-in-out 0.2s; /* Delay opacity change */
}

.timeline-accordion.expanded .timeline-accordion-content {
    opacity: 1;
    transition: opacity 0.4s ease-in-out 0.3s; /* Slight delay for smoother appearance */
}

.timeline-accordion-content .wp-block-image,
.timeline-accordion-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

/* Loading States */
.timeline-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.timeline-no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.load-more-btn {
    display: block;
    margin: 3rem auto;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    background: white;
    color: #333333;
	border: 1px solid #999;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.load-more-btn:hover {
    background: #005a87;
    background: #455a58;
    color: white;
}

.load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-page {
        padding: 0 15px;
    }

    .timeline-title {
        font-size: 2rem;
    }

    /*.timeline-controls {
        flex-direction: column;
        align-items: stretch;
    }*/

    .timeline-results-info {
        margin-left: 0;
        text-align: left;
    }

    .timeline-entries::before {
        left: 30px;
    }

    .timeline-entry {
        gap: 1rem;
    }

    .timeline-marker {
        width: 60px;
    }

    .timeline-date {
        font-size: 12px;
        padding: 6px 8px;
    }

    .timeline-date::after {
        width: 12px;
        height: 12px;
        right: -6px;
    }
}

/* Screen Reader Only */
.screen-reader-text {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Carousel */
.tl-carousel {
    position: relative;
    overflow: hidden;
    background: #000;
}

.tl-slides {
    display: flex;
    transition: none;
}

.tl-slide {
    display: none;
    width: 100%;
    flex-shrink: 0;
}

.tl-slide.active {
    display: block;
}

.tl-slide img {
    width: 100%;
    max-height: 60vh;
    height: auto;
    object-fit: contain;
    display: block;
}

.tl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    font-size: 2rem;
    line-height: 1;
    padding: 0.2em 0.5em;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s;
}

.tl-arrow:hover {
    background: rgba(0,0,0,0.7);
}

.tl-prev { left: 0; }
.tl-next { right: 0; }

.tl-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    background: #111;
}

.tl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #666;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.tl-dot.active {
    background: #fff;
}
