/* Timeline Pillars Section */
.timeline-section {
    position: relative;
    width: 100%;
    background: transparent;
    padding: 15rem 0;
    overflow: visible;
}


.timeline-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.timeline-path-backer {
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 7;
    fill: none;
}

.timeline-path-filler {
    stroke: hsl(var(--primary));
    stroke-width: 7;
    fill: none;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px hsla(var(--primary), 0.8));
}

.pillars-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 30vh;
    /* Controlled spacing for the path to zigzag */
}

.pillar-item {
    width: 100%;
    display: flex;
    padding: 0 5%;
}

.pillar-item.left {
    justify-content: flex-start;
    text-align: left;
}

.pillar-item.right {
    justify-content: flex-end;
    text-align: right;
}

.pillar-info {
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2rem;
    transition: all 0.5s ease;
    z-index: 10;
}

.pillar-item.active .pillar-info {
    border-color: hsl(var(--primary));
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 30px hsla(var(--primary), 0.1);
}

.pillar-item.right .pillar-info {
    align-items: flex-end;
}

.pillar-icon-box {
    width: 4.5rem;
    height: 4.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    /* Prevent spill */
}

.pillar-icon-box img {
    max-width: 80%;
    max-height: 80%;
}

.pillar-item.active .pillar-icon-box {
    background: hsla(var(--primary), 0.1);
    border-color: hsl(var(--primary));
    color: hsl(var(--primary));
    box-shadow: 0 0 30px hsla(var(--primary), 0.2);
    transform: scale(1.1);
}

.pillar-item h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0;
    color: #fff;
    transition: color 0.4s ease;
}

.pillar-item p {
    font-size: 1.15rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
    margin: 0;
}

/* Public Asymmetric Bento Grid */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 1.5rem;
    margin-top: 4rem;
}

.masonry-item {
    position: relative;
    height: 100%;
}

.masonry-item .feature-card {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Asymmetric alternating layout */
.masonry-item:nth-child(1) {
    grid-column: span 2;
}

.masonry-item:nth-child(2) {
    grid-column: span 1;
}

.masonry-item:nth-child(3) {
    grid-column: span 1;
}

.masonry-item:nth-child(4) {
    grid-column: span 2;
}

@media (max-width: 992px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .masonry-item:nth-child(1),
    .masonry-item:nth-child(2),
    .masonry-item:nth-child(3),
    .masonry-item:nth-child(4) {
        grid-column: span 2;
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .pillar-item {
        padding: 0;
    }

    .pillar-info {
        padding: 2rem;
    }

    .pillar-item.right .pillar-info {
        align-items: flex-start;
        text-align: left;
    }

    .pillar-item.right {
        justify-content: flex-start;
    }
}