/* Timeline Block Styles */
.timeline-block {
    @apply max-w-4xl mx-auto px-4;
}

/* Timeline Items Alternating Backgrounds */
.timeline-item-even {
    background: linear-gradient(135deg, rgba(102, 70, 255, 0.03) 0%, rgba(168, 85, 247, 0.05) 100%);
    border: 1px solid rgba(102, 70, 255, 0.1);
}

.timeline-item-odd {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.8) 0%, rgba(249, 250, 251, 0.9) 100%);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

/* Dark mode alternating backgrounds */
@media (prefers-color-scheme: dark) {
    .timeline-item-even {
        background: linear-gradient(135deg, rgba(102, 70, 255, 0.08) 0%, rgba(168, 85, 247, 0.12) 100%);
        border-color: rgba(102, 70, 255, 0.2);
    }
    
    .timeline-item-odd {
        background: linear-gradient(135deg, rgba(31, 41, 55, 0.6) 0%, rgba(17, 24, 39, 0.8) 100%);
        border-color: rgba(75, 85, 99, 0.3);
    }
}

/* Hover effects for content areas only */
.timeline-item-even:hover {
    background: linear-gradient(135deg, rgba(102, 70, 255, 0.06) 0%, rgba(168, 85, 247, 0.08) 100%);
    border-color: rgba(102, 70, 255, 0.2);
    transform: translateY(-2px);
}

.timeline-item-odd:hover {
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.9) 0%, rgba(249, 250, 251, 1) 100%);
    border-color: rgba(209, 213, 219, 0.7);
    transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
    .timeline-item-even:hover {
        background: linear-gradient(135deg, rgba(102, 70, 255, 0.12) 0%, rgba(168, 85, 247, 0.16) 100%);
        border-color: rgba(102, 70, 255, 0.3);
    }
    
    .timeline-item-odd:hover {
        background: linear-gradient(135deg, rgba(31, 41, 55, 0.8) 0%, rgba(17, 24, 39, 0.9) 100%);
        border-color: rgba(75, 85, 99, 0.4);
    }
}

/* Timeline Line - Enhanced with GRIM colors and extended for spacing */
.timeline-block .group:not(:last-child) .relative::after {
    background: linear-gradient(to bottom, #8b5cf6, #6646ff, #8b5cf6);
    width: 2px;
    border-radius: 1px;
    opacity: 0.8;
    bottom: -2rem; /* Extend line to connect with next item */
}

@media (prefers-color-scheme: dark) {
    .timeline-block .group:not(:last-child) .relative::after {
        background: linear-gradient(to bottom, #a855f7, #8b5cf6, #a855f7);
        opacity: 0.9;
        bottom: -2rem; /* Extend line to connect with next item */
    }
}

/* Enhanced Timeline Icons */
.timeline-block .size-8 {
    width: 2rem;
    height: 2rem;
    background: white;
    border: 2px solid #8b5cf6;
    border-radius: 50%;
    box-shadow: 0 4px 12px -2px rgba(139, 92, 246, 0.3), 0 0 0 3px rgba(139, 92, 246, 0.1);
    transition: all 0.3s ease;
}

.timeline-block .size-8:hover {
    border-color: #6646ff;
    transform: scale(1.1);
    box-shadow: 0 8px 20px -4px rgba(102, 70, 255, 0.4), 0 0 0 5px rgba(102, 70, 255, 0.15);
}

/* Dark mode icon styling */
@media (prefers-color-scheme: dark) {
    .timeline-block .size-8 {
        background: rgb(30 41 59);
        border-color: #a855f7;
        box-shadow: 0 4px 12px -2px rgba(168, 85, 247, 0.3), 0 0 0 3px rgba(168, 85, 247, 0.1);
    }
    
    .timeline-block .size-8:hover {
        border-color: #c084fc;
        box-shadow: 0 8px 20px -4px rgba(192, 132, 252, 0.4), 0 0 0 5px rgba(192, 132, 252, 0.15);
    }
}

/* Emoji styling - Apple style and grayscale */
.timeline-block .size-8 span {
    font-size: 1.25rem;
    line-height: 1;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
    filter: grayscale(1);
    -webkit-font-feature-settings: "liga" off;
    font-feature-settings: "liga" off;
}

/* Enhanced Typography */
.timeline-block h3 {
    color: #6646ff;
}

.timeline-block p.font-bold {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.timeline-block p.text-base {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

@media (prefers-color-scheme: dark) {
    .timeline-block h3 {
        color: #a855f7;
    }
    
    .timeline-block p.font-bold {
        color: #f9fafb;
    }
    
    .timeline-block p.text-base {
        color: #d1d5db;
    }
}

/* Enhanced Cards with GRIM theme */
.timeline-block .border-violet-100 {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.timeline-block .border-violet-100:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #c4b5fd;
}

@media (prefers-color-scheme: dark) {
    .timeline-block .border-violet-100 {
        background: linear-gradient(135deg, rgba(76, 29, 149, 0.2) 0%, rgba(88, 28, 135, 0.2) 100%);
        border-color: rgba(139, 92, 246, 0.3);
    }
    
    .timeline-block .border-violet-100:hover {
        border-color: rgba(139, 92, 246, 0.5);
        box-shadow: 0 20px 25px -5px rgba(139, 92, 246, 0.1), 0 10px 10px -5px rgba(139, 92, 246, 0.05);
    }
}

/* GRIM Violet links */
.timeline-block .text-violet-600 {
    color: #6646ff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.timeline-block .text-violet-600:hover {
    color: #5534e6;
}

.timeline-block .text-violet-600::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6646ff;
    transition: width 0.3s ease;
}

.timeline-block .text-violet-600:hover::after {
    width: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .timeline-block {
        padding: 0 1rem;
    }
    
    .timeline-block .ms-36 {
        margin-left: 7rem;
    }
    
    .timeline-block .sm\\:ms-52 {
        margin-left: 7rem;
    }
    
    .timeline-block .w-36 {
        width: 6rem;
    }
    
    .timeline-block .sm\\:w-52 {
        width: 6rem;
    }
    
    .timeline-block p.font-bold {
        font-size: 1.125rem;
    }
    
    .timeline-block p.text-base {
        font-size: 0.9375rem;
    }
}

/* Admin edit mode styles */
.timeline-block .bg-gray-100 {
    border: 2px dashed #d1d5db;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    color: #6b7280;
    margin: 2rem 0;
    font-weight: 500;
}

/* List styling improvements */
.timeline-block ul {
    list-style-type: none;
    position: relative;
}

.timeline-block li::before {
    content: '•';
    color: #6646ff;
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}