/**
 * STK Icons Gallery Styles
 */

.stk-gallery-container {
    position: relative;
    margin: 0px auto;
    width: fit-content;
    max-height: 1000px;
    font-family: Arial, sans-serif;
}

.stk-gallery {
    display: grid;
    grid-template-columns: repeat(5, 234px);
    grid-gap: 0;
    justify-content: center;
    transform: scale(0.55); 
    transform-origin: top left;
    position: relative;
} 

@media (max-width: 1200px) {
    .stk-gallery {
        transform: scale(0.4);
    }
}

@media (max-width: 850px) {
    .stk-gallery {
        transform: scale(0.25);
    }
}

.stk-gallery > .stk-figure-container:nth-child(5n + 1) {
    transform: translate(0px, 131px);
}

.stk-gallery > .stk-figure-container:nth-child(5n + 2) {
    transform: translate(0px, 0px);
}

.stk-gallery > .stk-figure-container:nth-child(5n + 3) {
    transform: translate(0px, 131px);
}

.stk-gallery > .stk-figure-container:nth-child(5n + 4) {
    transform: translate(0px, 261px);
}

.stk-gallery > .stk-figure-container:nth-child(5n + 5) {
    transform: translate(0px, 131px);
}

.stk-figure-container {
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    margin: -11px -16px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.stk-figure-container figure {
    width: 278px;
    height: 240px;
    background-size: contain;
    margin: 0;
    padding: 22px;
}

.stk-category-label {
    position: absolute;
    bottom: 15%;
    left: calc(100% - 20px);
    color: white;
    width: 600px;
    height: 190px;
    z-index: -1;
    padding-left: 100px;
    display: flex;
    align-items: center;
}

.stk-category-label h2 {
    font-size: 43px;
    line-height: 1.1;
    margin: 0px;
}

.stk-figure-container.metacognition .stk-category-label {
    background-color: #D7A151;
}

.stk-figure-container.decision-making .stk-category-label {
    background-color: #115E67;
}

.stk-figure-container.philosophical-underpinnings .stk-category-label {
    background-color: #C64644;
}

.stk-figure-container.probabilistic-reasoning .stk-category-label {
    background-color: #059CBD;
}

.stk-figure-container.can-do-attitude .stk-category-label {
    background-color: #74AA51;
}

.stk-figure-container.philosophical-underpinnings figure {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 260'%3E%3Cpath d='M85 0L235 0L310 130L235 260L85 260L10 130Z' fill='white' stroke='%23C64644' stroke-width='12' stroke-linejoin='miter'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stk-figure-container.probabilistic-reasoning figure {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 260'%3E%3Cpath d='M85 0L235 0L310 130L235 260L85 260L10 130Z' fill='white' stroke='%23059CBD' stroke-width='12' stroke-linejoin='miter'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stk-figure-container.can-do-attitude figure {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 260'%3E%3Cpath d='M85 0L235 0L310 130L235 260L85 260L10 130Z' fill='white' stroke='%2374AA51' stroke-width='12' stroke-linejoin='miter'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stk-figure-container.metacognition figure {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 260'%3E%3Cpath d='M85 0L235 0L310 130L235 260L85 260L10 130Z' fill='white' stroke='%23D7A151' stroke-width='12' stroke-linejoin='miter'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stk-figure-container.decision-making figure {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 260'%3E%3Cpath d='M85 0L235 0L310 130L235 260L85 260L10 130Z' fill='%23E1EAEC' stroke='%23115E67' stroke-width='12' stroke-linejoin='miter'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stk-figure-container img {
    width: 224px;
    height: 212px;
    padding-top: 9px;
    transition: opacity 0.3s ease;
    display: block;
    margin: 0 auto;
}

.stk-figure-container figcaption {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

.stk-gallery > .stk-figure-container:nth-child(5n + 1):hover {
    transform: translate(0px, 131px) scale(1.5);
    z-index: 10;
}

.stk-gallery > .stk-figure-container:nth-child(5n + 2):hover {
    transform: translate(0px, 0px) scale(1.4);
    z-index: 10;
}

.stk-gallery > .stk-figure-container:nth-child(5n + 3):hover {
    transform: translate(0px, 131px) scale(1.4);
    z-index: 10;
}

.stk-gallery > .stk-figure-container:nth-child(5n + 4):hover {
    transform: translate(0px, 261px) scale(1.4);
    z-index: 10;
}

.stk-gallery > .stk-figure-container:nth-child(5n + 5):hover {
    transform: translate(0px, 131px) scale(1.4);
    z-index: 10;
}

.stk-figure-container:hover figcaption {
    position: absolute;
    left: 60%;
    top: 50%;
    width: auto;
    height: auto;
    overflow: visible;
    transform: translate(-50%, -50%);
    margin-top: 0;
    font-size: 25px;
    padding: 8px 12px;
    border-radius: 4px;
}

.stk-figure-container:hover img {
    opacity: 0.3;
}

/* Modal Styles */
.stk-modal {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    width: 500px;
    z-index: 1000;
}

.stk-modal-content {
    background-color: white;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid #ddd;
}

.stk-modal-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stk-modal-icon-container {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.stk-modal-icon {
    width: 160px;
    height: 152px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding-top: 6px;
}

.stk-modal-title {
    font-size: 28px;
    color: #333;
    margin: 0;
    font-weight: bold;
}

.stk-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
}

.stk-modal-description a {
    color: #059CBD;
    text-decoration: none;
}

.stk-modal-description a:hover {
    text-decoration: underline;
}

.stk-modal-units {
    margin-top: 20px;
}

.stk-modal-units-label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
    display: inline;
    margin-right: 8px;
}

.stk-unit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #059CBD;
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    margin-right: 8px;
    vertical-align: middle;
}

.stk-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.stk-close:hover {
    color: #000;
}