/* ========================= */
/* COMPANY MILESTONES SECTION */
/* ========================= */
.milestones-section {
    margin-top: 0px;
    padding: 80px 0 140px 0;
    
    /* Premium Modern Gradient Background fitting the theme */
    background: radial-gradient(circle at center, #ffffff 0%, #f0f6fc 60%, #e1ecf8 100%);
    
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.milestones-container {
    width: 100%;

    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
}

.milestones-wrapper {

    position: relative;
    width: 1000px;
    height: 600px;
    transform-origin: top center;
    margin-top: 40px;
}

/* Premium Header */
.milestones-header {

    text-align: center;
    margin-bottom: 80px;
    z-index: 10;
    position: relative;
}

.milestones-header .section-title {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
}

.milestones-header .section-title .highlight {
    color: #4B78D5;
}

.milestones-header .section-subtitle {
    font-size: 18px;
    color: #64748B;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}


/* The curved track */
.milestone-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 1000px;
    height: 600px;
    pointer-events: none;
    z-index: 1;
}

.milestone-track svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Center Circle */
.milestone-center {
    position: absolute;
    top: 300px;
    left: 500px;
    transform: translate(-50%, -50%);
    width: 290px;
    height: 290px;
    background: rgba(255, 255, 255, 0.85); /* Glassmorphic light background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.05),
        inset 0 0 0 2px rgba(255, 255, 255, 1),
        0 0 50px rgba(75, 120, 213, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

/* Pulsing Halo behind the center circle */
.milestone-center::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(75, 120, 213, 0.15), rgba(252, 42, 104, 0.15), rgba(75, 120, 213, 0.15));
    z-index: -1;
    animation: spinHalo 8s linear infinite;
    filter: blur(15px);
    opacity: 0.8;
}

@keyframes spinHalo {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

.milestone-center:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.1),
        inset 0 0 0 2px rgba(255, 255, 255, 1),
        0 0 60px rgba(75, 120, 213, 0.25);
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.center-content .premium-icon {
    font-size: 44px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #4B78D5 0%, #1A233A 100%);
    /* Deep sleek blue gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 8px rgba(75, 120, 213, 0.2));
}

.milestone-center h2 {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    letter-spacing: 2px;
    margin: 0;
    background: none;
    -webkit-text-fill-color: #111827;
}

.milestone-center p {
    font-size: 14px;
    color: #64748B;
    /* Slate gray/blue */
    margin-top: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Milestone Animated Item */
.milestone-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    offset-path: path("M 500 50 A 250 250 0 0 1 500 550 A 250 250 0 0 1 500 50 Z");
    offset-rotate: 0deg;
    animation: trackMove 30s linear infinite;
}

@keyframes trackMove {
    0% {
        offset-distance: 0%;
    }

    100% {
        offset-distance: 100%;
    }
}

/* Stagger the animation so they are evenly spaced along the track */
.item-1 {
    animation-delay: -0s;
}

.item-2 {
    animation-delay: -5s;
}

.item-3 {
    animation-delay: -10s;
}

.item-4 {
    animation-delay: -15s;
}

.item-5 {
    animation-delay: -20s;
}

.item-6 {
    animation-delay: -25s;
}

/* The Dot */
.track-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 2;
}

/* The Pill */
.milestone-pill {
    position: absolute;
    bottom: 25px;
    /* Sits perfectly above the dot */
    background: #fff;
    border-radius: 30px;
    padding: 12px 25px;
    text-align: center;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
    width: 100%;
    transition: transform 0.3s ease;
    z-index: 3;
}

.milestone-item:hover .milestone-pill {
    transform: translateY(-5px);
}

.milestone-pill .year {
    display: block;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.milestone-pill .title {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

/* The Text */
.milestone-text {
    position: absolute;
    top: 25px;
    /* Sits below the dot */
    text-align: center;
    color: #666;
    width: 100%;
}

.milestone-text h4 {
    font-size: 16px;
    color: #555;
    margin-bottom: 5px;
    font-weight: 600;
}

.milestone-text p {
    font-size: 13px;
    line-height: 1.4;
    color: #888;
}

/* Colors */
.bg-blue,
.dot-blue {
    background: #4B78D5;
}

.bg-pink,
.dot-pink {
    background: #FC2A68;
}

.bg-yellow,
.dot-yellow {
    background: #FFC000;
    color: #fff;
}

.bg-yellow .year {
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.bg-magenta,
.dot-magenta {
    background: #CD00CD;
}

.bg-green,
.dot-green {
    background: #1B9B2E;
}

/* Image Milestone Styles */
.milestone-image-wrapper {
    position: absolute;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    transition: transform 0.3s ease;
}

.milestone-item:hover .milestone-image-wrapper {
    transform: scale(1.15);
}

.milestone-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.12));
    transition: filter 0.3s ease;
}

.milestone-item:hover .milestone-image-wrapper img {
    filter: drop-shadow(0 15px 30px rgba(75, 120, 213, 0.2));
}

.milestone-image-text {
    position: absolute;
    top: 95px;
    /* Sits below the image (80px is half) */
    text-align: center;
    color: #666;
    width: 100%;
}

.milestone-image-text h4 {
    font-size: 15px;
    color: #444;
    margin-bottom: 3px;
    font-weight: 700;
}

.milestone-image-text p {
    font-size: 12px;
    line-height: 1.3;
    color: #777;
}

/* Responsive Scaling for Wrapper */
@media (max-width: 1050px) {
    .milestones-wrapper {
        transform: scale(0.9);
        margin-bottom: -60px;
    }
}

@media (max-width: 900px) {
    .milestones-wrapper {
        transform: scale(0.7);
        margin-bottom: -180px;
    }
}

@media (max-width: 767px) {
    .milestones-wrapper {
        transform: none;
        margin-bottom: 0;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .milestone-track,
    .milestone-center {
        display: none;
    }

    .milestone-item {
        position: relative;
        offset-path: none;
        animation: none !important;
        height: auto;
        margin-bottom: 30px;
        width: 50%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .milestone-item img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .track-dot {
        display: none;
    }

    .milestone-pill {
        position: relative;
        bottom: auto;
        margin-bottom: 10px;
    }

    .milestone-text,
    .milestone-image-text {
        position: relative;
        top: auto;
    }
}