/* ========================================
   TIMELINE STYLES - VISHESH ACADEMY
   ======================================== */

/* Reset and Base Styles */
.vishesh-timeline-container {
    padding: 60px 0;
    position: relative;
    background: #ffffff;
    overflow: hidden;
}

.vishesh-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Central Timeline Line */
.vishesh-timeline::before {
    content: '';
    /* position: absolute; */
    width: 6px;
    background: linear-gradient(180deg, #e31e24 0%, #ff6b6b 50%, #e31e24 100%);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
    box-shadow: 0 0 25px rgba(227, 30, 36, 0.4);
    z-index: 1;
}

/* Timeline Flow Arrows */
.vishesh-timeline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 12px 8px;
    border-color: transparent transparent #e31e24 transparent;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(227, 30, 36, 0.3));
}

/* Flow Direction Indicators */
.vishesh-timeline-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

/* Left side flow arrows (odd items) */
.vishesh-timeline-item:nth-child(odd)::after {
    right: -25px;
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent #e31e24;
    filter: drop-shadow(2px 0 4px rgba(227, 30, 36, 0.3));
}

/* Right side flow arrows (even items) */
.vishesh-timeline-item:nth-child(even)::after {
    left: -25px;
    border-width: 8px 8px 8px 0;
    border-color: transparent #e31e24 transparent transparent;
    filter: drop-shadow(-2px 0 4px rgba(227, 30, 36, 0.3));
}

/* Timeline Items */
.vishesh-timeline-item {
    padding: 30px 50px;
    position: relative;
    width: 50%;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.vishesh-timeline-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Left Side Items (Odd) */
.vishesh-timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 80px;
}

.vishesh-timeline-item:nth-child(odd) .vishesh-timeline-marker {
    right: -40px;
}

.vishesh-timeline-item:nth-child(odd) .vishesh-timeline-content {
    border-right: 5px solid #e31e24;
    border-left: none;
}

.vishesh-timeline-item:nth-child(odd) .vishesh-timeline-header h4::after {
    right: 0;
    left: auto;
}

/* Right Side Items (Even) */
.vishesh-timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 80px;
}

.vishesh-timeline-item:nth-child(even) .vishesh-timeline-marker {
    left: -40px;
}

.vishesh-timeline-item:nth-child(even) .vishesh-timeline-content {
    border-left: 5px solid #e31e24;
    border-right: none;
}

.vishesh-timeline-item:nth-child(even) .vishesh-timeline-header h4::after {
    left: 0;
    right: auto;
}

/* Timeline Markers */
.vishesh-timeline-marker {
    position: absolute;
    top: 30px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e31e24 0%, #ff6b6b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(227, 30, 36, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    border: 4px solid #ffffff;
}

.vishesh-timeline-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 15px 40px rgba(227, 30, 36, 0.7);
    background: linear-gradient(135deg, #ff6b6b 0%, #e31e24 100%);
}

/* Timeline Icons */
.vishesh-timeline-icon {
    color: #ffffff;
    font-size: 28px;
    z-index: 4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Timeline Numbers */
.vishesh-timeline-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffffff;
    color: #e31e24;
    border: 3px solid #e31e24;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Timeline Content */
.vishesh-timeline-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid #f0f0f0;
}

.vishesh-timeline-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: #e31e24;
}

/* Timeline Arrows */
.vishesh-timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    transform: translateY(-50%);
    z-index: 1;
}

/* Left side arrows (odd items) */
.vishesh-timeline-item:nth-child(odd) .vishesh-timeline-content::before {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent #ffffff;
    filter: drop-shadow(2px 0 5px rgba(0, 0, 0, 0.1));
}

.vishesh-timeline-item:nth-child(odd) .vishesh-timeline-content:hover::before {
    border-color: transparent transparent transparent #ffffff;
    filter: drop-shadow(3px 0 8px rgba(0, 0, 0, 0.15));
}

/* Right side arrows (even items) */
.vishesh-timeline-item:nth-child(even) .vishesh-timeline-content::before {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent #ffffff transparent transparent;
    filter: drop-shadow(-2px 0 5px rgba(0, 0, 0, 0.1));
}

.vishesh-timeline-item:nth-child(even) .vishesh-timeline-content:hover::before {
    border-color: transparent #ffffff transparent transparent;
    filter: drop-shadow(-3px 0 8px rgba(0, 0, 0, 0.15));
}

/* Timeline Headers */
.vishesh-timeline-header h4 {
    color: #e31e24;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 700;
    position: relative;
    line-height: 1.3;
}

.vishesh-timeline-header h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #e31e24, #ff6b6b);
    border-radius: 2px;
}

/* Timeline Body */
.vishesh-timeline-body p {
    color: #555555;
    line-height: 1.7;
    margin: 0;
    font-size: 15px;
    font-weight: 400;
}

/* Animation Delays */
.vishesh-timeline-item.animate:nth-child(1) { transition-delay: 0.1s; }
.vishesh-timeline-item.animate:nth-child(2) { transition-delay: 0.2s; }
.vishesh-timeline-item.animate:nth-child(3) { transition-delay: 0.3s; }
.vishesh-timeline-item.animate:nth-child(4) { transition-delay: 0.4s; }
.vishesh-timeline-item.animate:nth-child(5) { transition-delay: 0.5s; }
.vishesh-timeline-item.animate:nth-child(6) { transition-delay: 0.6s; }
.vishesh-timeline-item.animate:nth-child(7) { transition-delay: 0.7s; }

/* Enhanced Hover Effects */
.vishesh-timeline-item:hover .vishesh-timeline-content {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.vishesh-timeline-item:hover .vishesh-timeline-marker {
    transform: scale(1.2);
    box-shadow: 0 20px 50px rgba(227, 30, 36, 0.8);
}

/* Timeline Line Animation */
.vishesh-timeline::before {
    animation: vishesh-timeline-glow 4s ease-in-out infinite alternate;
}

@keyframes vishesh-timeline-glow {
    0% {
        box-shadow: 0 0 25px rgba(227, 30, 36, 0.4);
        background: linear-gradient(180deg, #e31e24 0%, #ff6b6b 50%, #e31e24 100%);
    }
    100% {
        box-shadow: 0 0 35px rgba(227, 30, 36, 0.7);
        background: linear-gradient(180deg, #ff6b6b 0%, #e31e24 50%, #ff6b6b 100%);
    }
}

/* Animated Arrow Indicators */
.vishesh-timeline-item.completed::after {
    animation: vishesh-arrow-pulse 2s ease-in-out infinite;
}

@keyframes vishesh-arrow-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* Progress Arrow Animation */
.vishesh-timeline-item.animate::after {
    animation: vishesh-arrow-appear 0.6s ease-out forwards;
}

@keyframes vishesh-arrow-appear {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

/* Success State */
.vishesh-timeline-item.completed .vishesh-timeline-marker {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.5);
}

.vishesh-timeline-item.completed .vishesh-timeline-number {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
}

/* Loading State */
.vishesh-timeline-item.loading {
    opacity: 0.6;
    transform: scale(0.98);
}

/* Progress Indicator */
.vishesh-timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top: 3px solid rgba(255, 255, 255, 0.4);
    animation: vishesh-progress-rotate 2s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

@keyframes vishesh-progress-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 991px) {
    .vishesh-timeline::before {
        left: 40px;
    }
    
    .vishesh-timeline-item {
        width: 100%;
        padding: 20px 20px 20px 80px;
        text-align: left;
        left: 0;
    }
    
    .vishesh-timeline-item:nth-child(odd),
    .vishesh-timeline-item:nth-child(even) {
        left: 0;
        text-align: left;
        padding: 20px 20px 20px 80px;
    }
    
    .vishesh-timeline-item:nth-child(odd) .vishesh-timeline-marker,
    .vishesh-timeline-item:nth-child(even) .vishesh-timeline-marker {
        left: -40px;
        right: auto;
    }
    
    .vishesh-timeline-item:nth-child(odd) .vishesh-timeline-content,
    .vishesh-timeline-item:nth-child(even) .vishesh-timeline-content {
        border-left: 5px solid #e31e24;
        border-right: none;
    }
    
    .vishesh-timeline-item:nth-child(odd) .vishesh-timeline-header h4::after,
    .vishesh-timeline-item:nth-child(even) .vishesh-timeline-header h4::after {
        left: 0;
        right: auto;
    }
    
    /* Mobile Arrow Adjustments */
    .vishesh-timeline-item:nth-child(odd)::after,
    .vishesh-timeline-item:nth-child(even)::after {
        left: -20px;
        right: auto;
        border-width: 6px 6px 6px 0;
        border-color: transparent #e31e24 transparent transparent;
    }
    
    .vishesh-timeline-item:nth-child(odd) .vishesh-timeline-content::before,
    .vishesh-timeline-item:nth-child(even) .vishesh-timeline-content::before {
        left: -12px;
        right: auto;
        border-width: 12px 12px 12px 0;
        border-color: transparent #ffffff transparent transparent;
    }
}

@media (max-width: 768px) {
    .vishesh-timeline-container {
        padding: 40px 0;
    }
    
    .vishesh-timeline {
        padding: 0 15px;
    }
    
    .vishesh-timeline::before {
        left: 35px;
    }
    
    .vishesh-timeline-item {
        padding: 15px 15px 15px 70px;
        margin-bottom: 20px;
    }
    
    .vishesh-timeline-item:nth-child(odd),
    .vishesh-timeline-item:nth-child(even) {
        padding: 15px 15px 15px 70px;
    }
    
    .vishesh-timeline-item:nth-child(odd) .vishesh-timeline-marker,
    .vishesh-timeline-item:nth-child(even) .vishesh-timeline-marker {
        left: -35px;
        width: 70px;
        height: 70px;
    }
    
    .vishesh-timeline-icon {
        font-size: 24px;
    }
    
    .vishesh-timeline-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
        top: -8px;
        right: -8px;
    }
    
    .vishesh-timeline-content {
        padding: 20px;
    }
    
    .vishesh-timeline-header h4 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .vishesh-timeline-body p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .vishesh-timeline-container {
        padding: 30px 0;
    }
    
    .vishesh-timeline::before {
        left: 30px;
    }
    
    .vishesh-timeline-item {
        padding: 15px 15px 15px 60px;
        margin-bottom: 15px;
    }
    
    .vishesh-timeline-item:nth-child(odd),
    .vishesh-timeline-item:nth-child(even) {
        padding: 15px 15px 15px 60px;
    }
    
    .vishesh-timeline-item:nth-child(odd) .vishesh-timeline-marker,
    .vishesh-timeline-item:nth-child(even) .vishesh-timeline-marker {
        left: -30px;
        width: 60px;
        height: 60px;
    }
    
    .vishesh-timeline-icon {
        font-size: 20px;
    }
    
    .vishesh-timeline-number {
        width: 22px;
        height: 22px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }
    
    .vishesh-timeline-content {
        padding: 15px;
    }
    
    .vishesh-timeline-header h4 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .vishesh-timeline-body p {
        font-size: 13px;
    }
    
    /* Reduce hover effects on mobile */
    .vishesh-timeline-item:hover .vishesh-timeline-content {
        transform: translateY(-3px) scale(1.01);
    }
    
    .vishesh-timeline-item:hover .vishesh-timeline-marker {
        transform: scale(1.05);
    }
}

/* Print Styles */
@media print {
    .vishesh-timeline::before {
        background: #000000;
        box-shadow: none;
    }
    
    .vishesh-timeline-item {
        opacity: 1;
        transform: none;
        page-break-inside: avoid;
    }
    
    .vishesh-timeline-marker {
        background: #000000 !important;
        box-shadow: none;
    }
    
    .vishesh-timeline-content {
        box-shadow: none;
        border: 1px solid #000000;
    }
}

/* Additional Keyframes for JavaScript */
@keyframes vishesh-checkmark-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes vishesh-celebration {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced Mobile Styles */
@media (max-width: 480px) {
    .vishesh-timeline-item {
        margin-bottom: 15px;
    }
    
    .vishesh-timeline-content {
        border-radius: 15px;
    }
    
    .vishesh-timeline-header h4::after {
        width: 25px;
        height: 2px;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .vishesh-timeline-marker {
        border-width: 2px;
    }
    
    .vishesh-timeline-number {
        border-width: 1.5px;
    }
}

/* Accessibility Improvements */
.vishesh-timeline-header h4:focus {
    outline: 2px solid #e31e24;
    outline-offset: 2px;
}

.vishesh-timeline-content:focus-within {
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.3);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .vishesh-timeline-item,
    .vishesh-timeline-content,
    .vishesh-timeline-marker {
        transition: none;
        animation: none;
    }
    
    .vishesh-timeline::before {
        animation: none;
    }
}

/* Enhanced Arrow Styles */
.vishesh-timeline-item:hover::after {
    filter: drop-shadow(0 0 8px rgba(227, 30, 36, 0.6));
    transform: translateY(-50%) scale(1.1);
}

.vishesh-timeline-item:hover .vishesh-timeline-content::before {
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.2));
}

/* Arrow Color Variations */
.vishesh-timeline-item:nth-child(1)::after { border-color: transparent transparent transparent #e31e24; }
.vishesh-timeline-item:nth-child(2)::after { border-color: transparent #e31e24 transparent transparent; }
.vishesh-timeline-item:nth-child(3)::after { border-color: transparent transparent transparent #e31e24; }
.vishesh-timeline-item:nth-child(4)::after { border-color: transparent #e31e24 transparent transparent; }
.vishesh-timeline-item:nth-child(5)::after { border-color: transparent transparent transparent #e31e24; }
.vishesh-timeline-item:nth-child(6)::after { border-color: transparent #e31e24 transparent transparent; }
.vishesh-timeline-item:nth-child(7)::after { border-color: transparent transparent transparent #e31e24; }

/* Mobile adjustments for arrow colors */
@media (max-width: 991px) {
    .vishesh-timeline-item:nth-child(1)::after,
    .vishesh-timeline-item:nth-child(2)::after,
    .vishesh-timeline-item:nth-child(3)::after,
    .vishesh-timeline-item:nth-child(4)::after,
    .vishesh-timeline-item:nth-child(5)::after,
    .vishesh-timeline-item:nth-child(6)::after,
    .vishesh-timeline-item:nth-child(7)::after {
        border-color: transparent #e31e24 transparent transparent;
    }
}

/* Arrow Glow Effects */
.vishesh-timeline-item.completed::after {
    box-shadow: 0 0 15px rgba(227, 30, 36, 0.8);
}

.vishesh-timeline-item.completed .vishesh-timeline-content::before {
    filter: drop-shadow(0 0 8px rgba(227, 30, 36, 0.4));
}

/* Timeline Progress Indicator */
.vishesh-timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #28a745 0%, #20c997 100%);
    border-radius: 2px;
    z-index: 0;
    transition: height 0.5s ease;
}

.vishesh-timeline-container.progress-25::before { height: 25%; }
.vishesh-timeline-container.progress-50::before { height: 50%; }
.vishesh-timeline-container.progress-75::before { height: 75%; }
.vishesh-timeline-container.progress-100::before { height: 100%; }

