/* Achievements Section Styles */

/* ── Section ─────────────────────────────── */
#achievements {
    background: white;
}

/* ── Header & Title ──────────────────────────────── */
.achievements-header {
    text-align: center;
    margin-bottom: 60px;
}

.achievements-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

.achievements-header p {
    color: var(--text-dark);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ── Carousel Container ──────────────────────────────── */
.achievements-carousel-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, white 0%, white 5%, white 95%, white 100%);
    padding: 30px 0;
}

.achievements-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.achievements-carousel-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to right, white, transparent);
    z-index: 10;
    pointer-events: none;
}

.achievements-carousel-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to left, white, transparent);
    z-index: 10;
    pointer-events: none;
}

.achievements-carousel-track {
    will-change: transform;
    display: flex;
    gap: 30px;
}

/* ── Achievement Card ────────────────────────────────── */
.achievement-card {
    flex: 0 0 250px;
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-top: 3px solid var(--accent-color);
    background: #0B162C;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.achievement-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2) !important;
}

.achievement-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.achievement-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(11,22,44,1) 0%, rgba(11,22,44,0.85) 50%, transparent 100%);
    z-index: 3;
}

.achievement-card-title {
    color: white;
    font-size: 1rem;
    margin: 0 0 5px 0;
    font-family: 'Oswald';
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    word-wrap: break-word;
}

.achievement-card-description {
    color: rgba(255,255,255,0.85);
    font-size: 0.75rem;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── Empty State ─────────────────────────────── */
.achievement-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    width: 100%;
}

.achievement-empty p {
    color: #999;
    font-size: 1.1rem;
    margin: 0;
}

/* ── Animation ───────────────────────────────── */
/* Note: The scroll keyframe is defined dynamically in the blade component
   because the offset depends on the PHP count of achievements */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-280px); }
}

/* Pause animation on hover */
.achievements-carousel-wrapper:hover .achievements-carousel-track {
    animation-play-state: paused;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
    .achievement-card {
        flex: 0 0 200px !important;
        height: 160px !important;
    }
}

@media (max-width: 768px) {
    .achievement-card {
        flex: 0 0 160px !important;
        height: 130px !important;
    }

    .achievement-card-title {
        font-size: 0.85rem !important;
    }

    .achievement-card-description {
        font-size: 0.7rem !important;
    }
}
