/* Advanced Professional Timeline Widget - Enhanced UI/UX */
.ma-timeline-pro {
    position: relative;
    padding: 60px 0;
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Performance optimizations */
.gpu-accelerated * {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Timeline Steps - Enhanced */
.ma-timeline-pro .timeline-step {
    display: flex;
    align-items: center;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ma-timeline-pro .timeline-step:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.ma-timeline-pro .timeline-step.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animation Types */
.ma-timeline-pro .timeline-step[data-animation="fadeInLeft"] {
    transform: translateX(-50px);
}

.ma-timeline-pro .timeline-step[data-animation="fadeInRight"] {
    transform: translateX(50px);
}

.ma-timeline-pro .timeline-step[data-animation="slideInUp"] {
    transform: translateY(50px);
}

.ma-timeline-pro .timeline-step[data-animation="zoomIn"] {
    transform: scale(0.8);
}

.ma-timeline-pro .timeline-step[data-animation="bounceIn"] {
    transform: scale(0.3);
}

/* Image Container - Enhanced */
.ma-timeline-pro .step-image {
    flex: 0 0 auto;
    margin-right: 50px;
}

.ma-timeline-pro .step-image-inner {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 420px;
    height: 320px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ma-timeline-pro .step-image-inner:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ma-timeline-pro .step-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ma-timeline-pro .step-image-inner:hover img {
    transform: scale(1.08);
}

/* Placeholder Image */
.ma-timeline-pro .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.ma-timeline-pro .placeholder-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Step Number/Icon - Enhanced */
.ma-timeline-pro .step-number {
    position: absolute;
    top: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2);
    color: #333;
    transition: all 0.3s ease;
}

.ma-timeline-pro .step-number:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 1);
}

.ma-timeline-pro .step-number i {
    font-size: 18px;
    color: #667eea;
}

/* Step Date - Enhanced */
.ma-timeline-pro .step-date {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ma-timeline-pro .step-date:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Content - Enhanced */
.ma-timeline-pro .step-content {
    flex: 1;
    padding: 0 50px;
}

.ma-timeline-pro .step-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ma-timeline-pro .step-description {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Rich Text Formatting */
.ma-timeline-pro .step-description p {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.7;
}

.ma-timeline-pro .step-description p:last-child {
    margin-bottom: 0;
}

.ma-timeline-pro .step-description strong {
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
}

.ma-timeline-pro .step-description em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.95);
}

.ma-timeline-pro .step-description ul,
.ma-timeline-pro .step-description ol {
    margin: 16px 0;
    padding-left: 24px;
}

.ma-timeline-pro .step-description li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.ma-timeline-pro .step-description blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(102, 126, 234, 0.8);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.ma-timeline-pro .step-description blockquote p {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.ma-timeline-pro .step-description a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ma-timeline-pro .step-description a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.ma-timeline-pro .step-description h1,
.ma-timeline-pro .step-description h2,
.ma-timeline-pro .step-description h3,
.ma-timeline-pro .step-description h4,
.ma-timeline-pro .step-description h5,
.ma-timeline-pro .step-description h6 {
    color: rgba(255, 255, 255, 1);
    margin-bottom: 12px;
    font-weight: 600;
}

.ma-timeline-pro .step-description code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.ma-timeline-pro .step-description pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.ma-timeline-pro .step-description pre code {
    background: none;
    padding: 0;
}

/* Reverse Layout - Enhanced */
.ma-timeline-pro .timeline-step.reverse {
    flex-direction: row-reverse;
}

.ma-timeline-pro .timeline-step.reverse .step-image {
    margin-right: 0;
    margin-left: 50px;
}

.ma-timeline-pro .timeline-step.reverse .step-content {
    text-align: left;
    padding: 0 0 0 50px;
}

/* Center Line - Enhanced */
.ma-timeline-pro.animate-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8), transparent);
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    animation: lineGlow 4s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% { 
        opacity: 0.4;
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    50% { 
        opacity: 1;
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    }
}

/* Center Dots - Enhanced */
.ma-timeline-pro .timeline-step::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.ma-timeline-pro .timeline-step:hover::before {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 0 35px rgba(102, 126, 234, 0.8), 0 6px 20px rgba(0, 0, 0, 0.3);
}

.ma-timeline-pro.hide-center-line::before {
    display: none;
}

.ma-timeline-pro.hide-center-dots .timeline-step::before {
    display: none;
}

/* Link Styles - Enhanced */
.ma-timeline-pro .step-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
    transition: all 0.3s ease;
    border-radius: 24px;
}

.ma-timeline-pro .step-link:hover {
    transform: scale(1.01);
}

.ma-timeline-pro .step-link:hover .step-image-inner {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(102, 126, 234, 0.3);
}

/* Responsive Design - Enhanced */
@media (max-width: 768px) {
    .ma-timeline-pro {
        padding: 40px 0;
    }
    
    .ma-timeline-pro .timeline-step {
        flex-direction: column;
        text-align: center;
        margin-bottom: 50px;
        padding: 30px 20px;
    }
    
    .ma-timeline-pro .timeline-step.reverse {
        flex-direction: column;
    }
    
    .ma-timeline-pro .step-image {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 30px;
    }
    
    .ma-timeline-pro .timeline-step.reverse .step-image {
        margin-right: 0;
        margin-left: 0;
        margin-bottom: 30px;
    }
    
    .ma-timeline-pro .step-image-inner {
        width: 100%;
        max-width: 320px;
        height: 240px;
        margin: 0 auto;
    }
    
    .ma-timeline-pro .step-content {
        padding: 0;
        text-align: center;
    }
    
    .ma-timeline-pro .timeline-step.reverse .step-content {
        text-align: center;
        padding: 0;
    }
    
    .ma-timeline-pro .step-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .ma-timeline-pro .step-description {
        font-size: 16px;
    }
    
    .ma-timeline-pro::before {
        display: none;
    }
    
    .ma-timeline-pro .timeline-step::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .ma-timeline-pro .step-image-inner {
        height: 200px;
        max-width: 280px;
    }
    
    .ma-timeline-pro .step-title {
        font-size: 22px;
    }
    
    .ma-timeline-pro .step-description {
        font-size: 15px;
    }
    
    .ma-timeline-pro .timeline-step {
        padding: 20px 15px;
        margin-bottom: 40px;
    }
}

/* Loading Animation - Enhanced */
.ma-timeline-pro .step-image-inner img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ma-timeline-pro .step-image-inner img[loading="lazy"].loaded {
    opacity: 1;
}

/* Empty State */
.ma-timeline-pro .timeline-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.ma-timeline-pro .timeline-empty-state i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 24px;
    display: block;
}

.ma-timeline-pro .timeline-empty-state h3 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
}

.ma-timeline-pro .timeline-empty-state p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 16px;
}

/* Print Styles */
@media print {
    .ma-timeline-pro .timeline-step {
        opacity: 1;
        transform: none;
        break-inside: avoid;
        page-break-inside: avoid;
        background: white;
        color: black;
    }
    
    .ma-timeline-pro .step-title {
        color: black;
        -webkit-text-fill-color: black;
    }
    
    .ma-timeline-pro .step-description {
        color: #333;
    }
}