/* Highlighted Term Style */
.s-one-tech-term {
    border-bottom: 2px solid var(--color-primary, #FFD700);
    cursor: help;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    /* Prevent layout shifts */
    display: inline-block;
}

.s-one-tech-term:hover {
    background-color: rgba(var(--color-primary-rgb), 0.2);
    color: #111;
}

/* Popup Container */
#s-one-tech-popup {
    position: fixed;
    width: 280px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--color-primary, #FFD700);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 99999;
    /* Increased z-index */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    /* Let clicks pass through if needed, though usually we want interactions */
    font-family: var(--font-main, sans-serif);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #eee;
}

#s-one-tech-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Popup Content */
.s-one-tech-popup-logo {
    display: block;
    max-width: 100px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
}

.s-one-tech-popup-desc {
    font-size: 0.9rem;
    color: #ccc;
}

/* --- Added Grid Styles --- */
.s-one-glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.s-one-glossary-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.s-one-glossary-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary, #FFD700);
}

.s-one-glossary-img {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.s-one-glossary-img img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.s-one-glossary-img.placeholder {
    background: #f9f9f9;
    border-radius: 8px;
    color: #ddd;
}

.s-one-glossary-img.placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

.s-one-glossary-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
}

.s-one-glossary-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}