:root {
    --primary-color: #0a192f;
    --secondary-color: #112240;
    --accent-color: #64ffda;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --shadow-outer: 0 6px 28px rgba(0, 0, 0, 0.19);
    --shadow-glow: 0 0 0 8px rgba(100, 255, 218, 0.06);
}

body {
    background-color: var(--primary-color);
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
}

.qual-main-section {
    padding: 64px 0 32px 0;
    max-width: 100vw;
    box-sizing: border-box;
}

.qual-heading {
    color: var(--accent-color);
    text-align: center;
    font-size: 2.3rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    letter-spacing: 1px;
}

/* Container with two cards per row, centered within grid cells */
.qual-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.3rem 3rem; /* vertical and horizontal spacing */
    width: 100%;
    justify-items: center;
    padding: 0 1rem; /* optional horizontal padding */
    box-sizing: border-box;
}

/* Individual qualification card */
.qual-card {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 680px; /* increased width for balanced card*/
    background: rgba(17, 34, 64, 0.82);
    border: 1.5px solid var(--accent-color);
    border-radius: 2rem;
    box-shadow: var(--shadow-outer), var(--shadow-glow);
    overflow: hidden;
    transition: transform 0.19s, box-shadow 0.18s;
    box-sizing: border-box;
}

.qual-card:hover {
    transform: translateY(-7px) scale(1.019);
    box-shadow:
        0 16px 36px 0 rgba(100, 255, 218, 0.12),
        0 1px 18px 6px rgba(17, 34, 64, 0.10),
        var(--shadow-glow);
}

.qual-img-area {
    flex: 0 0 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 18%, #223040 100%);
    min-height: auto; /* dynamic height */
    max-width: 220px;
}

.qual-img {
    width: 175px;
    height: 175px;
    object-fit: contain; /* avoid cropping */
    border-radius: 50%;
    background: #181e2a;
    box-shadow:
        0 2px 28px 0 rgba(100, 255, 218, 0.14),
        0 0 0 8px #112240 inset;
    border: 5px solid #16213f;
    display: block;
    transition: box-shadow 0.21s, transform 0.14s;
}

.qual-img:hover {
    box-shadow:
        0 2px 48px 0 rgba(100, 255, 218, 0.16),
        0 0 0 8px var(--accent-color) inset;
    transform: scale(1.04);
}

.qual-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* horizontally center contents */
    justify-content: center;
    padding: 2.2rem 2rem;
    gap: 1.1rem;
    min-width: 0;
    text-align: center;
    box-sizing: border-box;
}

.qual-title {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.58rem;
    margin: 0 0 0.6rem 0;
    letter-spacing: 0.7px;
}

.qual-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1.5rem; /* tighter spacing */
    width: 100%;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
    text-align: left;
}

.qual-info-grid > div {
    word-break: break-word;
}

.qual-license-link-area {
    width: 100%;
    display: flex;
    justify-content: center; /* center license link */
    margin-top: 0.2rem;
}

.qual-license-link {
    color: var(--accent-color);
    background: rgba(100, 255, 218, 0.09);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    border-radius: 15px;
    transition: background 0.18s, box-shadow 0.2s, color 0.18s;
    padding: 0.53em 1.3em;
    font-size: 1.13rem;
    letter-spacing: 0.4px;
    box-shadow: 0 1.5px 6px rgba(100, 255, 218, 0.09);
    border: none;
    outline: none;
    display: inline-block;
}

.qual-license-link:hover,
.qual-license-link:focus {
    background: var(--accent-color);
    color: #183b3b;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(100, 255, 218, 0.13);
}

/* Responsive: stack on smaller screens */
@media (max-width: 900px) {
    .qual-list {
        grid-template-columns: 1fr; /* single column */
        gap: 2.2rem;
        padding: 0 0.8rem;
    }
    .qual-card {
        max-width: 98vw;
    }
}

/* Mobile: stacked cards with adjusted image size and padding */
@media (max-width: 650px) {
    .qual-card {
        flex-direction: column;
        border-radius: 1.5rem;
        max-width: 98vw;
    }
    .qual-img-area {
        max-width: 100vw;
        min-height: auto;
        border-radius: 1.5rem 1.5rem 0 0;
        background-position: center center;
    }
    .qual-img {
        border-radius: 1.5rem 1.5rem 0 0;
        width: 80%;
        max-height: 140px;
    }
    .qual-details {
        padding: 1.3rem 1.2rem 1.3rem 1.2rem;
        gap: 0.9rem;
    }
    .qual-info-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem 0;
        text-align: center;
    }
}
