/* Toggle Timeline Widget Styles */

.toggle-timeline-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Layout Types */
.toggle-timeline-widget.timeline-vertical {
    max-width: 1200px;
}

.toggle-timeline-widget.timeline-horizontal {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.toggle-timeline-widget.timeline-horizontal::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.timeline-container {
    position: relative;
    padding: 40px 0;
}

.timeline-horizontal .timeline-container {
    display: flex;
    padding: 40px 20px;
    min-width: max-content;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #23346a 0%, #005a87 100%);
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-item:hover {
    opacity: 0.8;
}

.timeline-item.active {
    opacity: 1;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-horizontal .timeline-item {
    flex-direction: column !important;
    min-width: 300px;
    max-width: 400px;
    flex-shrink: 0;
}

.timeline-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 4px solid #23346a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
    cursor: pointer;
}

.timeline-item.active .timeline-icon {
    background: #23346a;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.timeline-icon i {
    font-size: 20px;
    color: #23346a;
    transition: color 0.3s ease;
}

.timeline-item.active .timeline-icon i {
    color: #ffffff;
}

.timeline-content {
    flex: 1;
    max-width: 400px;
    margin: 0 40px;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.timeline-horizontal .timeline-content {
    margin: 20px 0 0 0;
    max-width: none;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.timeline-item.active .timeline-content {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 124, 186, 0.2);
    border-left: 4px solid #23346a;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
    cursor: pointer;
}

.timeline-header-left {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333333;
    line-height: 1.3;
    flex: 1;
    min-width: 200px;
    margin-bottom: 10px;
}

.timeline-date {
    background: #f8f9fa;
    color: #23346a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid #e9ecef;
}

.timeline-description {
    color: #666666;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
}

/* Toggle Icon */
.timeline-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f8f9fa;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.timeline-toggle-icon i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.timeline-item.expanded .timeline-toggle-icon i {
    transform: rotate(180deg);
}

/* Extended Content */
.timeline-extended-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.timeline-item.expanded .timeline-extended-content {
    max-height: 1500px;
    margin-top: 20px;
}

.timeline-extended-inner {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #666666;
    line-height: 1.6;
}

.timeline-extended-inner p:first-child {
    margin-top: 0;
}

.timeline-extended-inner p:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-vertical .timeline-line {
        left: 30px;
        transform: none;
    }
    
    .timeline-vertical .timeline-item {
        flex-direction: row !important;
        margin-left: 60px;
    }
    
    .timeline-vertical .timeline-icon {
        position: absolute;
        left: -45px;
        width: 50px;
        height: 50px;
    }
    
    .timeline-vertical .timeline-content {
        margin: 0;
        max-width: none;
        padding: 20px;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .timeline-title {
        font-size: 1.3rem;
        min-width: auto;
    }
    
    .timeline-date {
        align-self: flex-start;
    }
    
    /* Horizontal layout becomes vertical on mobile */
    .timeline-horizontal {
        overflow-x: visible;
        overflow-y: visible;
    }
    
    .timeline-horizontal .timeline-container {
        flex-direction: column;
        padding: 20px 0;
    }
    
    .timeline-horizontal .timeline-item {
        min-width: auto;
        max-width: none;
        margin-bottom: 40px;
    }
    
    .timeline-horizontal .timeline-content {
        margin: 20px 0 0 0;
    }
}

@media (max-width: 480px) {
    .toggle-timeline-widget {
        padding: 20px 10px;
    }
    
    .timeline-container {
        padding: 20px 0;
    }
    
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-description {
        font-size: 0.9rem;
    }
}

/* Animation for timeline items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }

/* Hover effects for better interactivity */
.timeline-item:hover .timeline-icon {
    transform: scale(1.05);
}

.timeline-item.active:hover .timeline-icon {
    transform: scale(1.15);
}



/* Direct link highlight effect */
.timeline-item.direct-link-highlight {
    animation: directLinkPulse 2s ease-in-out;
}

@keyframes directLinkPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 30px rgba(0, 124, 186, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
}

.timeline-item.direct-link-highlight .timeline-content {
    border-left: 4px solid #007cba;
    background: #f8f9fa;
}

/* Timeline Navigation Menu */
.timeline-navigation {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.timeline-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-nav-item {
    margin: 0;
}

.timeline-nav-link {
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: #333333;
    transition: all 0.3s ease;
    min-width: 120px;
}

.timeline-nav-link:hover {
    background: #007cba;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.timeline-nav-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.timeline-nav-date {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* Responsive navigation */
@media (max-width: 768px) {
    .timeline-nav-list {
        flex-direction: column;
    }
    
    .timeline-nav-link {
        min-width: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .timeline-nav-title {
        font-size: 1rem;
    }
    
    .timeline-nav-date {
        font-size: 0.9rem;
        margin-top: 0;
    }
}

/* Print styles */
@media print {
    .timeline-line {
        background: #000000 !important;
    }
    
    .timeline-icon {
        border-color: #000000 !important;
        background: #ffffff !important;
    }
    
    .timeline-item.active .timeline-icon {
        background: #000000 !important;
    }
    
    .timeline-content {
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
    }
} 