/* css/achievements.css */

/* Page Layout & Toolbar (Similar to other list pages) */
.achievements-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    /* Increased back to 40px */
}

/* Achievement Grid - Masonry Style Layout */
.achievements-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: 10px;
    /* Small row height for flexible positioning */
    gap: 20px;
    align-items: start;
}

/* Unique Achievement Card Style - Masonry Layout */
.achievement-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Override default card padding */
    overflow: hidden;
    position: relative;
    height: fit-content;
    /* Grid positioning will be handled by JavaScript */
}

.card-banner {
    position: absolute;
    top: 15px;
    right: -30px;
    background-color: var(--accent-color);
    color: #fff;
    padding: 4px 30px;
    font-size: 13px;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.ach-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-card, 6px) var(--radius-card, 6px) 0 0;
}

.ach-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

.achievement-card:hover .ach-image img {
    transform: scale(1.05);
}

.ach-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ach-content h3 {
    color: var(--title-color);
    font-size: 22px;
    margin-bottom: 0;
    line-height: 1.2;
}

.ach-content .issuer {
    font-size: 13px;
    color: var(--paragraph-color);
    margin-bottom: 0;
}

.ach-content .issuer strong {
    color: var(--title-color);
    font-weight: 500;
}

.ach-content p:last-of-type {
    font-size: 14px;
    line-height: 1.6;
    color: var(--paragraph-color);
    margin: 0;
}

.ach-footer {
    padding: 0 20px 20px;
    margin-top: auto;
    padding-top: 10px;
}

.credential-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--accent-color);
    text-decoration: none;
}

.credential-link:hover {
    text-decoration: underline;
    color: var(--accent-color-hover);
}

/* Animations */


/* Responsive */
@media (max-width: 768px) {

    /* Typography inherits from base.css responsive styles */
    .achievements-container {
        gap: 35px;
    }

    /* Increased from 25px */

    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        grid-auto-rows: 8px;
        gap: 15px;
    }

    .ach-image {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .achievements-container {
        gap: 30px;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 6px;
        gap: 15px;
    }

    .ach-image {
        height: 160px;
    }

    .ach-content {
        padding: 15px;
    }

    .ach-footer {
        padding: 0 15px 15px;
    }
}

@media (max-width: 400px) {
    .achievement-card {
        padding: 0;
    }

    .ach-content h3 {
        font-size: 18px;
    }

    .ach-content p {
        font-size: 13px;
    }

    .credential-link {
        font-size: 13px;
    }
}