.achievement {
    display: flex;
    column-gap: 3rem;
    margin-bottom: 5rem;
    align-items: flex-start;

    /* Alternating layout: even items have reversed order */
    &:nth-child(even) {
        flex-direction: row-reverse;
    }

    .achievement-images {
        flex: 0 0 50%;

        .photoswipe-gallery {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;

            a {
                display: block;
                overflow: hidden;
                border-radius: 10px;
                box-shadow: var(--soft-shadow);
                transition: var(--transition-smooth);

                &:hover {
                    transform: scale(1.03);
                    box-shadow: var(--hover-shadow);
                }
            }

            img {
                width: 100%;
                height: 180px;
                object-fit: cover;
                display: block;
            }
        }

        details {
            margin-top: 1.5rem;

            summary {
                display: inline-block;
                padding: 0.6rem 1.5rem;
                background-color: var(--anaigreen);
                color: white;
                border-radius: 25px;
                cursor: pointer;
                font-weight: 500;
                transition: var(--transition-smooth);
                list-style: none;

                &::-webkit-details-marker {
                    display: none;
                }

                &:hover {
                    background-color: var(--anaigreen-light);
                    transform: translateY(-2px);
                }
            }

            &[open] summary {
                margin-bottom: 1rem;
                background-color: var(--anaipurple);
            }

            .photoswipe-gallery {
                margin-top: 1rem;
            }
        }
    }

    .achievement-description {
        flex: 1;
        padding-top: 0.5rem;

        h3 {
            font-family: 'Logo', cursive;
            font-size: 2rem;
            color: var(--anaigreen);
            margin-bottom: 1rem;
            margin-top: 0;
        }

        p {
            color: #444;
            line-height: 1.8;
        }
    }
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .achievement {
        flex-direction: column !important;
        row-gap: 1.5rem;

        .achievement-images {
            flex: 0 0 100%;
        }

        .achievement-description {
            padding-top: 0;
        }
    }
}
