*, ::before, ::after {
    box-sizing: border-box;
}
.hex-grid__wrap {
    background-image: url('../assets/images/grid_back.png');
    background-repeat: no-repeat;
    background-size: 81%;
    background-position: 120px -100px;
}

.hex-grid__list {
    --amount: 6;  /* Changed from 5 to 6 */
    position: relative;
    margin: 0 auto;
    list-style-type: none;
    font-family: 'Roboto', sans-serif;
    display: grid;
    grid-template-columns: repeat(var(--amount), 1fr 2fr) 1fr;
    font-size: 16px;
    grid-gap: 0.625em 1.25em;
    max-width: 80vw;  /* Increased from 810px to accommodate 6 items */
}

.hex-grid__item {
    position: relative;
    grid-column: 1 / span 3;
    grid-row: calc(var(--counter) + var(--counter)) / span 2;
    height: 0;
    padding-top: 80%;
    filter: drop-shadow(0px 0px 2px #002543);
    transition: 0.7s;
}

.hex-grid__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background-color:#c2c2c257;
    overflow: hidden;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: 0.5s;
}

.hex-grid__item--blank {
    display: none;
}

.hex-grid__item--fake {
    pointer-events: none;
    transform: scale(0.7);
}

.hex-grid__item--light {
    color: #002543;
}

.hex-grid__item--light::before {
    background-color: #c2c2c257;
}


.hex-grid__item--career {
    color: #fff;
}

.hex-grid__item--career::before {
    background-color: #636ae8;
}

.hex-grid__item--academic {
    color: #fff;
}

.hex-grid__item--academic::before {
    background-color: #7DBDEEFF;
}

.hex-grid__item--highschool {
    color: #fff;
}

.hex-grid__item--highschool::before {
    background-color: #7F55E0E6;
}

.hex-grid__item--certificate {
    color: #fff;
}

.hex-grid__item--certificate::before {
    background-color: #7F55E08C;
}

.hex-grid__item--bootcamp {
    color: #fff;
}

.hex-grid__item--bootcamp::before {
    background-color: #7DBDEEFF;
}

.hex-grid__item--standards {
    color: #fff;
}

.hex-grid__item--standards::before {
    background-color: #636ae8;
}

.hex-grid__item--diploma{
    color: #fff;
}

.hex-grid__item--diploma::before {
    background-color: #7F55E08C;
}

.hex-grid__item--languages{
    color: #fff;
}

.hex-grid__item--languages::before {
    background-color: #7F55E0FF;
}






.hex-grid__item:hover {
    transform: scale(1.3);
    z-index: 9;
}

.hex-grid__item:hover::before {
    clip-path: polygon(25% 100%, 0 50%, 25% 0, 75% 0, 100% 50%, 75% 100%);
}

.hex-grid__content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    line-height: 1.2;
    padding: 1em 1.5em;
}

@media screen and (min-width: 1441px) {
    .hex-grid__list {
        --amount: 6;  /* Changed from 5 to 6 */
        --counter: 1;
    }
    .hex-grid__item:nth-of-type(6n + 1) {
        grid-column: 1 / span 3;
    }
    .hex-grid__item:nth-of-type(6n + 2) {
        grid-column: 3 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    .hex-grid__item:nth-of-type(6n + 3) {
        grid-column: 5 / span 3;
    }
    .hex-grid__item:nth-of-type(6n + 4) {
        grid-column: 7 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    .hex-grid__item:nth-of-type(6n + 5) {
        grid-column: 9 / span 3;
    }
    .hex-grid__item:nth-of-type(6n + 6) {
        grid-column: 11 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    /* Update counter increments for 6 items per row */
    .hex-grid__item:nth-of-type(n + 7) { --counter: 2; }
    .hex-grid__item:nth-of-type(n + 13) { --counter: 3; }
    .hex-grid__item:nth-of-type(n + 19) { --counter: 4; }
    .hex-grid__item:nth-of-type(n + 25) { --counter: 5; }
    .hex-grid__item:nth-of-type(n + 31) { --counter: 6; }
    .hex-grid__item:nth-of-type(n + 37) { --counter: 7; }
    .hex-grid__item:nth-of-type(n + 43) { --counter: 8; }
    .hex-grid__item:nth-of-type(n + 49) { --counter: 9; }
    .hex-grid__item:nth-of-type(n + 55) { --counter: 10; }
    .hex-grid__item:nth-of-type(n + 61) { --counter: 11; }
    .hex-grid__item:nth-of-type(n + 67) { --counter: 12; }
    .hex-grid__item:nth-of-type(n + 73) { --counter: 13; }
    .hex-grid__item:nth-of-type(n + 79) { --counter: 14; }
    .hex-grid__item:nth-of-type(n + 85) { --counter: 15; }
    .hex-grid__item:nth-of-type(n + 91) { --counter: 16; }
    .hex-grid__item:nth-of-type(n + 97) { --counter: 17; }
    .hex-grid__item:nth-of-type(n + 103) { --counter: 18; }
    .hex-grid__item:nth-of-type(n + 109) { --counter: 19; }
    .hex-grid__item:nth-of-type(n + 115) { --counter: 20; }
    .hex-grid__item:nth-of-type(n + 121) { --counter: 21; }
}

@media screen and (min-width: 1281px) and (max-width: 1440px) {
    .hex-grid__list {
        --amount: 5;
        --counter: 1;
    }
    .hex-grid__item:nth-of-type(4n + 1) {
        grid-column: 1 / span 3;
    }
    .hex-grid__item:nth-of-type(4n + 2) {
        grid-column: 3 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    .hex-grid__item:nth-of-type(4n + 3) {
        grid-column: 5 / span 3;
    }
    .hex-grid__item:nth-of-type(4n + 4) {
        grid-column: 7 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    .hex-grid__item:nth-of-type(n + 5) {
        --counter: 2;
    }
    .hex-grid__item:nth-of-type(n + 9) {
        --counter: 3;
    }
    .hex-grid__item:nth-of-type(n + 13) {
        --counter: 4;
    }
    .hex-grid__item:nth-of-type(n + 17) {
        --counter: 5;
    }
    .hex-grid__item:nth-of-type(n + 21) {
        --counter: 6;
    }
    .hex-grid__item:nth-of-type(n + 25) {
        --counter: 7;
    }
    .hex-grid__item:nth-of-type(n + 29) {
        --counter: 8;
    }
    .hex-grid__item:nth-of-type(n + 33) {
        --counter: 9;
    }
    .hex-grid__item:nth-of-type(n + 37) {
        --counter: 10;
    }
    .hex-grid__item:nth-of-type(n + 41) {
        --counter: 11;
    }
    .hex-grid__item:nth-of-type(n + 45) {
        --counter: 12;
    }
    .hex-grid__item:nth-of-type(n + 49) {
        --counter: 13;
    }
    .hex-grid__item:nth-of-type(n + 53) {
        --counter: 14;
    }
    .hex-grid__item:nth-of-type(n + 57) {
        --counter: 15;
    }
    .hex-grid__item:nth-of-type(n + 61) {
        --counter: 16;
    }
    .hex-grid__item:nth-of-type(n + 65) {
        --counter: 17;
    }
    .hex-grid__item:nth-of-type(n + 69) {
        --counter: 18;
    }
    .hex-grid__item:nth-of-type(n + 73) {
        --counter: 19;
    }
    .hex-grid__item:nth-of-type(n + 77) {
        --counter: 20;
    }
    .hex-grid__item:nth-of-type(n + 81) {
        --counter: 21;
    }
}
@media screen and (min-width: 850px) and (max-width: 1280px) {
    .hex-grid__list {
        max-width: 700px;
        --amount: 3;
        --counter: 1;
        grid-gap: 1.5rem 3rem;
    }
    .hex-grid__item:nth-of-type(3n + 1) {
        grid-column: 1 / span 3;
    }
    .hex-grid__item:nth-of-type(3n + 2) {
        grid-column: 3 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    .hex-grid__item:nth-of-type(3n + 3) {
        grid-column: 5 / span 3;
    }
    .hex-grid__item:nth-of-type(n + 4) {
        --counter: 2;
    }
    .hex-grid__item:nth-of-type(n + 7) {
        --counter: 3;
    }
    .hex-grid__item:nth-of-type(n + 10) {
        --counter: 4;
    }
    .hex-grid__item:nth-of-type(n + 13) {
        --counter: 5;
    }
    .hex-grid__item:nth-of-type(n + 16) {
        --counter: 6;
    }
    .hex-grid__item:nth-of-type(n + 19) {
        --counter: 7;
    }
    .hex-grid__item:nth-of-type(n + 22) {
        --counter: 8;
    }
    .hex-grid__item:nth-of-type(n + 25) {
        --counter: 9;
    }
    .hex-grid__item:nth-of-type(n + 28) {
        --counter: 10;
    }
    .hex-grid__item:nth-of-type(n + 31) {
        --counter: 11;
    }
    .hex-grid__item:nth-of-type(n + 34) {
        --counter: 12;
    }
    .hex-grid__item:nth-of-type(n + 37) {
        --counter: 13;
    }
    .hex-grid__item:nth-of-type(n + 40) {
        --counter: 14;
    }
    .hex-grid__item:nth-of-type(n + 43) {
        --counter: 15;
    }
    .hex-grid__item:nth-of-type(n + 46) {
        --counter: 16;
    }
    .hex-grid__item:nth-of-type(n + 49) {
        --counter: 17;
    }
    .hex-grid__item:nth-of-type(n + 52) {
        --counter: 18;
    }
    .hex-grid__item:nth-of-type(n + 55) {
        --counter: 19;
    }
    .hex-grid__item:nth-of-type(n + 58) {
        --counter: 20;
    }
    .hex-grid__item:nth-of-type(n + 61) {
        --counter: 21;
    }
}
@media screen and (min-width: 550px) and (max-width: 849px) {
    .hex-grid__list {
        max-width: 500px;
        --amount: 2;
        --counter: 1;
        grid-gap: 1.5rem 3rem;
    }
    .hex-grid__item:nth-of-type(2n + 1) {
        grid-column: 1 / span 3;
    }
    .hex-grid__item:nth-of-type(2n + 2) {
        grid-column: 3 / span 3;
        grid-row: calc(var(--counter) + var(--counter) - 1) / span 2;
    }
    .hex-grid__item:nth-of-type(n + 3) {
        --counter: 2;
    }
    .hex-grid__item:nth-of-type(n + 5) {
        --counter: 3;
    }
    .hex-grid__item:nth-of-type(n + 7) {
        --counter: 4;
    }
    .hex-grid__item:nth-of-type(n + 9) {
        --counter: 5;
    }
    .hex-grid__item:nth-of-type(n + 11) {
        --counter: 6;
    }
    .hex-grid__item:nth-of-type(n + 13) {
        --counter: 7;
    }
    .hex-grid__item:nth-of-type(n + 15) {
        --counter: 8;
    }
    .hex-grid__item:nth-of-type(n + 17) {
        --counter: 9;
    }
    .hex-grid__item:nth-of-type(n + 19) {
        --counter: 10;
    }
    .hex-grid__item:nth-of-type(n + 21) {
        --counter: 11;
    }
    .hex-grid__item:nth-of-type(n + 23) {
        --counter: 12;
    }
    .hex-grid__item:nth-of-type(n + 25) {
        --counter: 13;
    }
    .hex-grid__item:nth-of-type(n + 27) {
        --counter: 14;
    }
    .hex-grid__item:nth-of-type(n + 29) {
        --counter: 15;
    }
    .hex-grid__item:nth-of-type(n + 31) {
        --counter: 16;
    }
    .hex-grid__item:nth-of-type(n + 33) {
        --counter: 17;
    }
    .hex-grid__item:nth-of-type(n + 35) {
        --counter: 18;
    }
    .hex-grid__item:nth-of-type(n + 37) {
        --counter: 19;
    }
    .hex-grid__item:nth-of-type(n + 39) {
        --counter: 20;
    }
    .hex-grid__item:nth-of-type(n + 41) {
        --counter: 21;
    }
    .hex-grid__item:hover {
        transform: none;
    }
    .hex-grid__item:hover::before {
        clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    }
}
@media screen and (max-width: 549px) {
    .hex-grid__list {
        max-width: 350px;
        --amount: 1;
        grid-gap: 1.5rem 3rem;
    }
    .hex-grid__item--fake {
        display: none;
    }
    .hex-grid__content {
        left: 50%;
        transform: translateX(-50%);
        max-width: 250px;
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

.hex-grid__content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.hex-content__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.hex-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.hex-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
    color: #ffffff !important;
}

.hex-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    color: #ffffff !important;
}

/* Specific icon colors if needed */
.hex-icon--career { color: ##ffffff; }
.hex-icon--academic { color: #ffffff; }
.hex-icon--certificate { color: #ffffff; }
.hex-icon--bootcamp { color: #ffffff; }
.hex-icon--diploma { color: #ffffff; }
.hex-icon--highschool { color: #ffffff; }
.hex-icon--standards { color: #ffffff; }
.hex-icon--languages { color: #ffffff; }

