:root {
    /* Core Theme Colors */
    /* Background color #07101c */
    --bg-primary: #07101c; 
    --text-primary: #FFFFFF;
    --text-secondary: #a0a4b8;
    --status-color: #00BF66; /* Green for status dots (25% less bright) */
    
    /* Timeline Colors (Adjusted for new background) */
    --timeline-color-base: #3a4b61; 
    --timeline-color-highlight: #6486a8;

    /* Accent Colors (Stored as RGB values for precise opacity/glow control) */
    --color-yellow: 245, 214, 74;      /* #F5D64A */
    --color-cyan: 74, 234, 245;        /* #4AEAF5 */
    --color-green: 74, 245, 122;       /* #4AF57A */
    --color-purple: 153, 74, 245;      /* #994AF5 */
    --color-pink: 245, 74, 153;        /* #F54A99 */
    --color-teal: 74, 245, 200;        /* #4AF5C8 */
    --color-muted: 80, 85, 120;        /* #505578 */

    /* Settings */
    /* Font changed to Montserrat */
    --font-family: 'Montserrat', sans-serif;
    --transition-speed: 0.5s;
    --glow-intensity: 10px;
    --timeline-width: 40px; /* Space on the left for the timeline */
    --item-gap: 20px; /* Gap between cards, used for animation synchronization */

    /* Define precise dot center positions relative to item top */
    --dot-center-standard: 30px;
    --dot-center-milestone: 45px;
}

/* --- 0. Animations --- */

/* Animation for the green status indicators (Smooth, layered glow) */
@keyframes pulse-status {
    0%, 100% {
        opacity: 0.9;
        box-shadow: 
            0 0 8px 2px rgba(0, 191, 102, 0.15),
            0 0 16px 4px rgba(0, 191, 102, 0.1125),
            0 0 28px 8px rgba(0, 191, 102, 0.075),
            0 0 45px 12px rgba(0, 191, 102, 0.055),
            0 0 70px 18px rgba(0, 191, 102, 0.0375);
    }
    50% {
        opacity: 1;
        box-shadow: 
            0 0 12px 3px rgba(0, 191, 102, 0.1875),
            0 0 24px 6px rgba(0, 191, 102, 0.15),
            0 0 40px 10px rgba(0, 191, 102, 0.1125),
            0 0 65px 16px rgba(0, 191, 102, 0.075),
            0 0 100px 24px rgba(0, 191, 102, 0.055),
            0 0 140px 32px rgba(0, 191, 102, 0.0275);
    }
}

/* Animation for the grey status indicators (Smooth, layered glow) */
@keyframes pulse-status-grey {
    0%, 100% {
        opacity: 0.9;
        box-shadow: 
            0 0 8px 2px rgba(160, 164, 184, 0.8),
            0 0 16px 4px rgba(160, 164, 184, 0.6),
            0 0 28px 8px rgba(160, 164, 184, 0.4),
            0 0 45px 12px rgba(160, 164, 184, 0.3),
            0 0 70px 18px rgba(160, 164, 184, 0.2);
    }
    50% {
        opacity: 1;
        box-shadow: 
            0 0 12px 3px rgba(160, 164, 184, 1),
            0 0 24px 6px rgba(160, 164, 184, 0.8),
            0 0 40px 10px rgba(160, 164, 184, 0.6),
            0 0 65px 16px rgba(160, 164, 184, 0.4),
            0 0 100px 24px rgba(160, 164, 184, 0.3),
            0 0 140px 32px rgba(160, 164, 184, 0.15);
    }
}

/* Animation for text glow - Yellow */
@keyframes text-glow-yellow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(var(--color-yellow), 0.5),
            0 0 20px rgba(var(--color-yellow), 0.3),
            0 0 30px rgba(var(--color-yellow), 0.2);
        opacity: 0.9;
    }
    50% {
        text-shadow: 
            0 0 15px rgba(var(--color-yellow), 0.8),
            0 0 30px rgba(var(--color-yellow), 0.5),
            0 0 45px rgba(var(--color-yellow), 0.3),
            0 0 60px rgba(var(--color-yellow), 0.2);
        opacity: 1;
    }
}

/* Animation for text glow - Cyan */
@keyframes text-glow-cyan {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(74, 234, 245, 0.5),
            0 0 20px rgba(74, 234, 245, 0.3),
            0 0 30px rgba(74, 234, 245, 0.2);
        opacity: 0.9;
    }
    50% {
        text-shadow: 
            0 0 15px rgba(74, 234, 245, 0.8),
            0 0 30px rgba(74, 234, 245, 0.5),
            0 0 45px rgba(74, 234, 245, 0.3),
            0 0 60px rgba(74, 234, 245, 0.2);
        opacity: 1;
    }
}

/* Animation for the timeline nodes (Shrink and Expand) */
/* The outer glow and the inset border are animated together in box-shadow */
@keyframes pulse-node {
    0%, 100% {
        /* Shrink slightly (Scale 0.85) */
        transform: translate(-50%, -50%) scale(0.85);
        /* Subtle outer glow + Inset border */
        box-shadow: 0 0 5px rgba(var(--item-color-rgb), 0.5), 
                    inset 0 0 0 3px rgb(var(--item-color-rgb));
    }
    50% {
        /* Expand slightly (Scale 1.15) */
        transform: translate(-50%, -50%) scale(1.15);
         /* Enhanced outer glow + Inset border */
        box-shadow: 0 0 20px rgba(var(--item-color-rgb), 0.9),
                    inset 0 0 0 3px rgb(var(--item-color-rgb));
    }
}

/* Animation for the futuristic timeline flow */
@keyframes timeline-flow {
  0% {
    background-position: 0 0;
  }
  100% {
    /* Moves the background gradient downwards slowly (matching the gradient size) */
    background-position: 0 100px; 
  }
}



/* --- 1. Reset and Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    padding: 50px 0;
    position: relative;
}


.proposal-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* --- 2. Header --- */
.proposal-header {
    text-align: center;
    margin-bottom: 80px;
}

.partners {
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-weight: 400;
}

.partners::before {
    content: "ESTETIC INTERNATIONAL";
    color: rgb(var(--color-yellow));
    animation: text-glow-yellow 3s ease-in-out infinite;
}

.partners::after {
    content: " & NEUROLIS";
    color: #4AEAF5;
    animation: text-glow-cyan 3s ease-in-out infinite;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #4AEAF5 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-glow 4s ease-in-out infinite;
}

/* Animation for main title glow */
@keyframes title-glow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(74, 234, 245, 0.3)) 
                drop-shadow(0 0 20px rgba(74, 234, 245, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(74, 234, 245, 0.6)) 
                drop-shadow(0 0 35px rgba(74, 234, 245, 0.4))
                drop-shadow(0 0 50px rgba(74, 234, 245, 0.2));
    }
}

.date-range {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* --- 3. Phases --- */
.phase {
    margin-bottom: 60px;
}

.phase-header {
    margin-bottom: 30px;
     /* Align header with the cards, accounting for timeline offset */
    padding-left: var(--timeline-width);
}

.phase-header h2 {
    font-size: 1.2rem;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #4AEAF5 0%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-glow 4s ease-in-out infinite;
}

.phase-dates {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- 4. Timeline Structure and Indicators (ANIMATED REBUILD LOGIC) --- */
.timeline {
    display: flex;
    flex-direction: column;
    /* Gap is handled by margin on items for animation synchronization */
    position: relative;
    /* Padding ensures content doesn't overlap the timeline line */
    padding-left: var(--timeline-width);
}

.timeline-item {
    display: flex;
    position: relative;
    /* Add margin-bottom to create the gap between items */
    margin-bottom: var(--item-gap);

    /* Default color if data-color is missing */
    --item-color-rgb: var(--color-muted);

    /* Set the default dot center position for this item type */
    --dot-center: var(--dot-center-standard);
    
    /* Initial state for scroll animation (set by JS) */
    opacity: 0;
    transform: translateY(40px);
}

/* Remove the gap for the very last item in a timeline */
.timeline-item:last-child {
    margin-bottom: 0;
}

/* The Vertical Connector Line Segment (::after) */
.timeline-item::after {
    content: '';
    position: absolute;
    left: calc(var(--timeline-width) / -2);
    
    /* Default (Middle elements): Span the entire height + gap. */
    top: 0;
    height: calc(100% + var(--item-gap));
    
    width: 2px;
    transform: translateX(-50%);
    z-index: 1; /* Positioned below the dots */

    /* Futuristic Design - Energy Flow Gradient */
    /* Creates a repeating gradient pattern (100px height) that animates */
    background: repeating-linear-gradient(
        to bottom,
        var(--timeline-color-base) 0%,
        var(--timeline-color-base) 30%,
        var(--timeline-color-highlight) 50%,
        var(--timeline-color-base) 70%,
        var(--timeline-color-base) 100%
    );
    background-size: 2px 100px;
    
    /* Subtle glow matching the line color */
    box-shadow: 0 0 8px rgba(100, 134, 168, 0.3);
}

/* Precise control for the FIRST item in a timeline */
/* Start the line from the center of the first dot downwards */
.timeline-item:first-child::after {
    top: var(--dot-center);
    /* Adjust height to compensate for the new top position */
    height: calc(100% + var(--item-gap) - var(--dot-center));
}

/* Precise control for the LAST item in a timeline */
/* End the line at the center of the last dot */
.timeline-item:last-child::after {
     /* Start from the top (default) */
    top: 0;
    /* End exactly at the center of the dot */
    height: var(--dot-center);
}

/* Handle the ONLY item (both first and last) */
/* If there's only one item (e.g., FAZ 2), there should be no connecting line */
.timeline-item:first-child:last-child::after {
    display: none;
}


/* The Timeline Nodes (Dots) (::before) */
.timeline-item::before {
    content: '';
    position: absolute;
    /* Position the dot centered on the connector line (using negative offset) */
    left: calc(var(--timeline-width) / -2);

    /* Vertically center the dot using the dynamic variable */
    top: var(--dot-center);
    
    width: 16px;
    height: 16px;
    border-radius: 50%;
    
    /* Dot styling: Background MUST match main BG to mask the line segment. 
       Using inset box-shadow instead of 'border' ensures the background fills the entire area. */
    background-color: var(--bg-primary);

    z-index: 2; /* Ensure dot is above the vertical line segment */
    
    /* Transition allows smooth change when the active state overrides the animation */
    transition: box-shadow 0.3s ease, transform 0.3s ease;

     /* Set initial transform and box-shadow matching the animation start (0%) */
    transform: translate(-50%, -50%) scale(0.85);
    box-shadow: 0 0 5px rgba(var(--item-color-rgb), 0.5), 
                inset 0 0 0 3px rgb(var(--item-color-rgb));
}


/* Dynamic color assignment based on data-attributes */
.timeline-item[data-color="yellow"] { --item-color-rgb: var(--color-yellow); }
.timeline-item[data-color="cyan"] { --item-color-rgb: var(--color-cyan); }
.timeline-item[data-color="green"] { --item-color-rgb: var(--color-green); }
.timeline-item[data-color="purple"] { --item-color-rgb: var(--color-purple); }
.timeline-item[data-color="pink"] { --item-color-rgb: var(--color-pink); }
.timeline-item[data-color="teal"] { --item-color-rgb: var(--color-teal); }
.timeline-item[data-color="muted"] { --item-color-rgb: var(--color-muted); }
/* Special case for the milestone gradient dot color (use purple for the dot itself) */
.timeline-item[data-color="milestone-gradient"] { --item-color-rgb: var(--color-purple); }


/* Hover/Active State for Dots - Intensify glow and reset scale */
.timeline-item:hover::before,
.timeline-item.is-expanded::before {
    /* Strong static glow overrides the animated pulse values. */
    box-shadow: 0 0 35px rgba(var(--item-color-rgb), 1),
                inset 0 0 0 3px rgb(var(--item-color-rgb));
    /* Reset scale to normal when active. This overrides the animation transform value. */
    transform: translate(-50%, -50%) scale(1);
    
    /* We do NOT pause the animation (animation-play-state: paused;). 
       This allows the animation timer to continue running in sync across all dots. */
}


/* --- 5. Item Card (The Box) --- */
.item-card {
    flex-grow: 1;
    /* Background color is a pale tint of the accent color */
    background-color: rgba(var(--item-color-rgb), 0.05);
    border-radius: 8px;
    /* Border using the dynamic RGB variable */
    border: 1px solid rgb(var(--item-color-rgb));
    overflow: hidden; /* Ensures content doesn't bleed during animation */
    
    /* Added transform to the transition for the hover scale effect */
    transition: box-shadow var(--transition-speed) ease-out, background-color var(--transition-speed) ease-out, transform 0.3s ease-out;

    /* Base neon glow effect */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
                0 0 var(--glow-intensity) rgba(var(--item-color-rgb), 0.3),
                inset 0 0 calc(var(--glow-intensity) / 3) rgba(var(--item-color-rgb), 0.15);
}

/* Hover Interaction & Active State - Intensify glow and background */

/* Apply enhanced glow effects on hover OR when expanded */
.timeline-item:not(.milestone):hover .item-card,
.timeline-item.is-expanded .item-card {
    /* Slightly increase background tint when active/hovered */
    background-color: rgba(var(--item-color-rgb), 0.1);

    /* ENHANCED GLOW - Increased intensity, opacity, and spread using multiple layers */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5),
                /* Main colored glow (Intense) */
                0 0 calc(var(--glow-intensity) * 2.5) rgba(var(--item-color-rgb), 0.7),
                /* Secondary colored spread (Subtle outer aura) */
                0 0 calc(var(--glow-intensity) * 4) rgba(var(--item-color-rgb), 0.2),
                /* Inset glow */
                inset 0 0 calc(var(--glow-intensity) / 1.5) rgba(var(--item-color-rgb), 0.3);
}

/* Item Toggle (Button) */
.item-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    /* Padding (18px 25px) results in approx 60px height */
    padding: 18px 25px;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-family);
    letter-spacing: 0.5px;
}

.item-title {
    margin-right: 15px;
}

.status-indicator {
    /* Smaller physical dot size */
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--status-color);
    flex-shrink: 0;

    /* Initial layered glow effect matching the animation start (25% brightness) */
    opacity: 0.9;
    box-shadow: 
        0 0 8px 2px rgba(0, 191, 102, 0.15),
        0 0 16px 4px rgba(0, 191, 102, 0.1125),
        0 0 28px 8px rgba(0, 191, 102, 0.075),
        0 0 45px 12px rgba(0, 191, 102, 0.055),
        0 0 70px 18px rgba(0, 191, 102, 0.0375);
}

.status-indicator-grey {
    /* Grey dot with same size */
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    flex-shrink: 0;

    /* Initial layered glow effect matching the animation start */
    opacity: 0.9;
    box-shadow: 
        0 0 8px 2px rgba(160, 164, 184, 0.8),
        0 0 16px 4px rgba(160, 164, 184, 0.6),
        0 0 28px 8px rgba(160, 164, 184, 0.4),
        0 0 45px 12px rgba(160, 164, 184, 0.3),
        0 0 70px 18px rgba(160, 164, 184, 0.2);
}

.toggle-icon {
    width: 24px;
    height: 24px;
    margin-left: auto;
    /* Smooth rotation animation with a slight bounce effect */
    transition: transform var(--transition-speed) cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Rotate the arrow when expanded */
.item-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

/* --- 6. Item Details (Animation Logic) --- */
/* We use CSS grid-template-rows to animate the height efficiently. */
.item-details {
    display: grid;
    grid-template-rows: 0fr; /* Start collapsed (0 fraction of available space) */
    /* Smooth, high-quality easing function for the expansion */
    transition: grid-template-rows var(--transition-speed) cubic-bezier(0.65, 0, 0.35, 1);
    overflow: visible; /* Allow content to expand sideways */
}

/* When expanded, change grid-template-rows to 1fr (auto height) */
.item-toggle[aria-expanded="true"] + .item-details {
     grid-template-rows: 1fr;
}

/* The wrapper inside the grid item must have overflow: hidden for the animation to work */
.details-wrapper {
    overflow: hidden;
}

.details-content {
    padding: 28px 30px;
    /* Separator line below the header */
    border-top: 1px solid rgba(var(--item-color-rgb), 0.2);
    
    /* Fade-in/Slide animation for the content itself - now slides from left */
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    
    /* Ensure text doesn't overflow */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fade in the content only when expanded, slightly delayed - slides in from left */
.item-toggle[aria-expanded="true"] + .item-details .details-content {
     opacity: 1;
     transform: translateX(0);
     transition-delay: 0.2s;
}


/* --- 7. Inner Content Styling (Matching the Figma design) --- */

.details-date {
    font-size: 0.75rem;
    color: rgb(var(--item-color-rgb));
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 0;
    border-bottom: none;
    opacity: 0.9;
}

.details-description {
    margin-bottom: 20px;
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.9rem;
    opacity: 0.88;
    font-weight: 400;
}

.details-description strong {
    display: block;
    color: rgb(var(--item-color-rgb));
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.6;
    position: relative;
    padding-left: 0;
    line-height: 1.4;
}

.details-description strong:first-child {
    margin-top: 0;
    font-size: 0.92rem;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
    padding-left: 0;
    font-weight: 600;
}

.details-description strong:first-child::before {
    display: none;
}

.details-description br {
    display: none;
}

.details-description em {
    display: block;
    margin-top: 12px;
    padding: 10px 15px;
    background: rgba(var(--item-color-rgb), 0.08);
    border-left: 3px solid rgb(var(--item-color-rgb));
    border-radius: 4px;
    font-style: normal;
    font-size: 0.84rem;
    opacity: 0.92;
    line-height: 1.6;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 25px;
    padding-top: 0;
    border-top: none;
}

.tag {
    /* Styling inherits the card's accent color */
    background-color: rgba(var(--item-color-rgb), 0.12);
    color: rgb(var(--item-color-rgb));
    padding: 5px 13.6px;
    /* Fully rounded corners (Pill shape) */
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid rgba(var(--item-color-rgb), 0.25);
    text-transform: uppercase;
    letter-spacing: 0.42px;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: rgba(var(--item-color-rgb), 0.2);
    border-color: rgba(var(--item-color-rgb), 0.4);
    transform: translateY(-1px);
}

/* Budget */
/* Live Technology Button */
.live-tech-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin: 20px 0;
    background: rgba(var(--item-color-rgb), 0.15);
    border: 2px solid rgb(var(--item-color-rgb));
    border-radius: 8px;
    color: rgb(var(--item-color-rgb));
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 15px rgba(var(--item-color-rgb), 0.3),
        inset 0 0 15px rgba(var(--item-color-rgb), 0.1);
}

.live-tech-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--item-color-rgb), 0.3), transparent);
    transition: left 0.5s ease;
}

.live-tech-button:hover::before {
    left: 100%;
}

.live-tech-button:hover {
    background: rgba(var(--item-color-rgb), 0.25);
    border-color: rgb(var(--item-color-rgb));
    box-shadow: 
        0 0 25px rgba(var(--item-color-rgb), 0.6),
        0 0 40px rgba(var(--item-color-rgb), 0.3),
        inset 0 0 20px rgba(var(--item-color-rgb), 0.2);
    transform: translateY(-2px);
}

.live-tech-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.live-tech-button:hover .live-tech-icon {
    transform: translate(2px, -2px);
}

.budget {
    padding-top: 0;
    margin-top: 24px;
    /* Separator line removed */
    border-top: none;
}

.budget-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.3px;
}

.budget-amount {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    /* Budget color inherits the card's accent color */
    color: rgb(var(--item-color-rgb));
}

.aide-text {
    color: rgb(var(--color-muted));
    font-weight: 400;
}

/* --- 8. Milestone Styling --- */

/* Override dot center position specifically for milestones */
.milestone {
     --dot-center: var(--dot-center-milestone);
}

.milestone .item-card {
    /* Enhanced gradient background with animated shimmer effect */
    background: linear-gradient(135deg, 
        rgba(var(--color-purple), 0.15) 0%, 
        rgba(var(--color-pink), 0.15) 25%,
        rgba(var(--color-purple), 0.15) 50%,
        rgba(var(--color-pink), 0.15) 75%,
        rgba(var(--color-purple), 0.15) 100%);
    background-size: 200% 200%;
    border: 2px solid;
    border-image: linear-gradient(90deg, 
        rgb(var(--color-purple)), 
        rgb(var(--color-pink)), 
        rgb(var(--color-purple))) 1;
    position: relative;
    overflow: hidden;
    
    /* Multi-layered epic glow */
    box-shadow: 
        0 0 20px rgba(var(--color-purple), 0.4),
        0 0 40px rgba(var(--color-pink), 0.3),
        0 0 60px rgba(var(--color-purple), 0.2),
        inset 0 0 40px rgba(var(--color-purple), 0.1);
}

/* Animated gradient background */
@keyframes milestone-shimmer {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.milestone .item-card {
    animation: milestone-shimmer 8s ease infinite;
}

/* Glowing border animation */
@keyframes milestone-border-glow {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(var(--color-purple), 0.4),
            0 0 40px rgba(var(--color-pink), 0.3),
            0 0 60px rgba(var(--color-purple), 0.2),
            inset 0 0 40px rgba(var(--color-purple), 0.1);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(var(--color-purple), 0.6),
            0 0 60px rgba(var(--color-pink), 0.5),
            0 0 90px rgba(var(--color-purple), 0.3),
            inset 0 0 60px rgba(var(--color-pink), 0.15);
    }
}

.milestone .item-card {
    animation: milestone-shimmer 8s ease infinite, milestone-border-glow 4s ease-in-out infinite;
}

.milestone:hover .item-card {
    /* ENHANCED: Even stronger glow on hover */
    box-shadow: 
        0 0 40px rgba(var(--color-purple), 0.8),
        0 0 80px rgba(var(--color-pink), 0.6),
        0 0 120px rgba(var(--color-purple), 0.4),
        inset 0 0 80px rgba(var(--color-pink), 0.2);
    transform: scale(1.02);
}

.milestone-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 25px;
    position: relative;
    z-index: 1;
}

.milestone-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--color-purple), 0.3), rgba(var(--color-pink), 0.3));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin-right: 25px;
    flex-shrink: 0;
    position: relative;
    box-shadow: 
        0 0 20px rgba(var(--color-purple), 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Rotating glow effect around icon */
@keyframes icon-rotate-glow {
    0% {
        box-shadow: 
            0 0 20px rgba(var(--color-purple), 0.5),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
        transform: rotate(0deg);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(var(--color-pink), 0.7),
            inset 0 0 30px rgba(255, 255, 255, 0.15);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(var(--color-purple), 0.5),
            inset 0 0 20px rgba(255, 255, 255, 0.1);
        transform: rotate(360deg);
    }
}

.milestone-icon::before {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(var(--color-purple), 0.6);
    border-right-color: rgba(var(--color-pink), 0.6);
    animation: icon-rotate-glow 3s linear infinite;
}

.milestone-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.milestone-text {
    flex: 1;
}

.milestone-title {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff 0%, rgb(var(--color-pink)) 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: milestone-text-shimmer 3s linear infinite;
    text-shadow: 0 0 20px rgba(var(--color-pink), 0.3);
    margin-bottom: 8px;
}

@keyframes milestone-text-shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.milestone-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(90deg, rgba(var(--color-purple), 0.4), rgba(var(--color-pink), 0.4));
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- 9. Scroll Animation Styles (Handled by JS) --- */
/* This class is added by JS when the item scrolls into view (or immediately if motion is reduced) */
.timeline-item.animate-in {
    /* Smooth animation with a slightly springy easing */
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: translateY(0);
}

/* --- 10. Accessibility and Reduced Motion --- */
/* Apply continuous animations and hover effects only if the user has no preference for reduced motion */
@media (prefers-reduced-motion: no-preference) {
    /* Apply subtle scale effect only on hover */
    .timeline-item:not(.milestone):hover .item-card,
    .milestone:hover .item-card {
        transform: scale(1.01);
    }

    /* Apply the scaling animation (3 seconds duration - slow but visible) */
    .timeline-item::before {
         animation: pulse-node 3s infinite ease-in-out;
    }

     /* Apply the pulsing animation (3 seconds duration - smooth and visible) */
    .status-indicator {
        animation: pulse-status 3s infinite ease-in-out;
    }
    
    .status-indicator-grey {
        animation: pulse-status-grey 3s infinite ease-in-out;
    }
    
    /* Apply the energy flow animation to the timeline connector */
    .timeline-item::after {
         animation: timeline-flow 5s linear infinite;
    }
}


/* --- 11. Responsive adjustments --- */
@media (max-width: 600px) {
    :root {
        --timeline-width: 30px; /* Reduce offset on small screens */

        /* Recalculate dot positions based on new responsive heights (approximate) */
        /* Adjusted slightly for Montserrat font height differences */
        --dot-center-standard: 29px; 
        --dot-center-milestone: 44px; 
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    .item-toggle {
        /* New padding results in approx 58px height */
        padding: 15px 20px;
        font-size: 1rem;
    }
    .milestone-content {
         /* New padding results in approx 88px height */
        padding: 18px 20px;
    }
    .details-content {
        padding: 20px;
    }

    /* Remove scale transform on mobile regardless of motion preference, as it can look busy */
     .timeline-item:not(.milestone):hover .item-card,
     .milestone:hover .item-card {
        transform: none;
    }
}