.achievement-section {
    max-width: 1280px;
    height: auto;
    margin: 0 auto;
    margin-top: 42px;
    font-family: Verdana;
    background-color: #ffffff;
    color: #ffffff;
}

.achievement-headline {
    font-size: 16px;
    font-weight: bold;
    padding: 0 !important;
}

.achievement-airline-section,
.achievement-airport-section,
.achievement-aircraft-section {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    margin-top: 5px;
    background-color: #112839;
    border-radius: 10px;
    padding: 5px 0 20px 20px;
    margin-bottom: 5px;
}

.achievement-airline-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.achievement-airline-container {
    position: relative;
    width: 84px;
    height: auto; /* allow taller content for multi-line titles */
    background-color: #1c3b57;
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 10px 10px 5px 10px;
    text-align: center;
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.achievement-airline-container:hover { background-color: #112839; }

/* Active press feedback when clicking the tile */
.achievement-airline-container:active,
.achievement-airline-container-link:active .achievement-airline-container {
    background-color: #2c3e50;
    transform: scale(0.98);
}

.achievement-image-wrapper {
    position: relative;
    width: 64px;
    height: 61px;
    margin: 0 auto;
}

.airline-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
}

.achievement-ribbon {
    position: absolute;
    top: 0;
    left: 1px;
    width: 64px;
    height: 62px;
    z-index: 1;
}

.achievement-airline-container-link {
    text-decoration: none;
    color: inherit;
}
.achievement-airline-container-link:visited { color: inherit; text-decoration: none; }

.achievement-logo-container,
.achievement-title-container,
.achievement-progress-container {
    display: block;
    width: 100%;
}

.achievement-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4em;
    padding: 0 1px;
}

.ach-tooltip {
    width: 80px;
    height: auto;
    background-color: #555;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    visibility: hidden;
    position: relative;
    display: inline-block;
    z-index: 2;
    color: #ffffff;
    top: -20px;
    left: -13px;
    opacity: 0;
    transition: opacity 0.3s;
}
.achievement-image-wrapper:hover .ach-tooltip { visibility: visible; opacity: 1; }

/* Progress bar for aircraft achievements */
.progress-bar {
    background-color: #ccc;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 5px;
}

.progress {
    height: 7px;
    background-color: #4caf50;
    border-radius: 10px;
}

/* Multi-line title under logo (max 4 lines) */
.achievement-title {
    margin: 0;
    line-height: 12px;
    max-height: calc(12px * 4);
    overflow: hidden;
    word-break: break-word;
}
.achievement-title .ach-line { display: block; }
